Change usages of RunningSha to RunningSha256 (#17266)
Some PRs got crossed and somehow these were missed in the build checks for #17182.
This commit is contained in:
parent
4e51491f7a
commit
895f2c9f3d
|
@ -171,7 +171,7 @@ func (c *Core) enableCredentialInternal(ctx context.Context, entry *MountEntry,
|
|||
var backend logical.Backend
|
||||
// Create the new backend
|
||||
sysView := c.mountEntrySysView(entry)
|
||||
backend, entry.RunningSha, err = c.newCredentialBackend(ctx, entry, sysView, view)
|
||||
backend, entry.RunningSha256, err = c.newCredentialBackend(ctx, entry, sysView, view)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -795,7 +795,7 @@ func (c *Core) setupCredentials(ctx context.Context) error {
|
|||
// Initialize the backend
|
||||
sysView := c.mountEntrySysView(entry)
|
||||
|
||||
backend, entry.RunningSha, err = c.newCredentialBackend(ctx, entry, sysView, view)
|
||||
backend, entry.RunningSha256, err = c.newCredentialBackend(ctx, entry, sysView, view)
|
||||
if err != nil {
|
||||
c.logger.Error("failed to create credential entry", "path", entry.Path, "error", err)
|
||||
plug, plugerr := c.pluginCatalog.Get(ctx, entry.Type, consts.PluginTypeCredential, "")
|
||||
|
|
|
@ -277,8 +277,8 @@ func TestCore_EnableExternalPlugin_MultipleVersions(t *testing.T) {
|
|||
t.Errorf("Expected mount to have no running version but got %s", raw.(*routeEntry).mountEntry.RunningVersion)
|
||||
}
|
||||
|
||||
if raw.(*routeEntry).mountEntry.RunningSha == "" {
|
||||
t.Errorf("Expected RunningSha to be present: %+v", raw.(*routeEntry).mountEntry.RunningSha)
|
||||
if raw.(*routeEntry).mountEntry.RunningSha256 == "" {
|
||||
t.Errorf("Expected RunningSha256 to be present: %+v", raw.(*routeEntry).mountEntry.RunningSha256)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -609,7 +609,7 @@ func (c *Core) mountInternal(ctx context.Context, entry *MountEntry, updateStora
|
|||
var backend logical.Backend
|
||||
sysView := c.mountEntrySysView(entry)
|
||||
|
||||
backend, entry.RunningSha, err = c.newLogicalBackend(ctx, entry, sysView, view)
|
||||
backend, entry.RunningSha256, err = c.newLogicalBackend(ctx, entry, sysView, view)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -1420,7 +1420,7 @@ func (c *Core) setupMounts(ctx context.Context) error {
|
|||
var backend logical.Backend
|
||||
// Create the new backend
|
||||
sysView := c.mountEntrySysView(entry)
|
||||
backend, entry.RunningSha, err = c.newLogicalBackend(ctx, entry, sysView, view)
|
||||
backend, entry.RunningSha256, err = c.newLogicalBackend(ctx, entry, sysView, view)
|
||||
if err != nil {
|
||||
c.logger.Error("failed to create mount entry", "path", entry.Path, "error", err)
|
||||
if !c.builtinRegistry.Contains(entry.Type, consts.PluginTypeSecrets) {
|
||||
|
|
|
@ -174,12 +174,12 @@ func (c *Core) reloadBackendCommon(ctx context.Context, entry *MountEntry, isAut
|
|||
}
|
||||
|
||||
var backend logical.Backend
|
||||
oldSha := entry.RunningSha
|
||||
oldSha := entry.RunningSha256
|
||||
if !isAuth {
|
||||
// Dispense a new backend
|
||||
backend, entry.RunningSha, err = c.newLogicalBackend(ctx, entry, sysView, view)
|
||||
backend, entry.RunningSha256, err = c.newLogicalBackend(ctx, entry, sysView, view)
|
||||
} else {
|
||||
backend, entry.RunningSha, err = c.newCredentialBackend(ctx, entry, sysView, view)
|
||||
backend, entry.RunningSha256, err = c.newCredentialBackend(ctx, entry, sysView, view)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -189,7 +189,7 @@ func (c *Core) reloadBackendCommon(ctx context.Context, entry *MountEntry, isAut
|
|||
}
|
||||
|
||||
// update the mount table since we changed the runningSha
|
||||
if oldSha != entry.RunningSha && MountTableUpdateStorage {
|
||||
if oldSha != entry.RunningSha256 && MountTableUpdateStorage {
|
||||
if isAuth {
|
||||
err = c.persistAuth(ctx, c.auth, &entry.Local)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue