-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: reinstate support for [setup.object_stores] #918
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some comments for anyone reviewing this PR...
NonInteractive: c.Globals.Flags.NonInteractive, | ||
ServiceID: serviceID, | ||
ServiceVersion: serviceVersion, | ||
Setup: c.Manifest.File.Setup.ObjectStores, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're effectively aliasing [setup.object_stores]
to the kv_stores implementation. Discussed internally, and it was decided this was OK to do as an interim solution.
@@ -1282,6 +1313,9 @@ func pingServiceURL(serviceURL string, httpClient api.HTTPClient, expectedStatus | |||
if err != nil { | |||
return false, 0, err | |||
} | |||
defer func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The gosec CI tool started complaining.
err := b.Spinner.StopFail() | ||
if err != nil { | ||
return err | ||
spinErr := b.Spinner.StopFail() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discovered a bunch of these issues where the actual API error was being accidentally overridden by a separate error and so (as a user) you wouldn't see an error related to what had gone wrong.
@@ -107,7 +108,7 @@ func (o *KVStores) Configure() error { | |||
func (o *KVStores) Create() error { | |||
if o.Spinner == nil { | |||
return errors.RemediationError{ | |||
Inner: fmt.Errorf("internal logic error: no text.Progress configured for setup.KVStores"), | |||
Inner: fmt.Errorf("internal logic error: no spinner configured for setup.KVStores"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have been fixed in an older PR but I think a bad rebase meant this old implementation detail was left in.
@@ -6,6 +6,7 @@ type Setup struct { | |||
Backends map[string]*SetupBackend `toml:"backends,omitempty"` | |||
ConfigStores map[string]*SetupConfigStore `toml:"config_stores,omitempty"` | |||
Loggers map[string]*SetupLogger `toml:"log_endpoints,omitempty"` | |||
ObjectStores map[string]*SetupKVStore `toml:"object_stores,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is where we're again parsing [setup.object_stores]
.
We weren't quite ready to drop support for
[setup.object_store]
.Tested with...