Skip to content
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

Switch to using Engines for the engine parameter #571

Merged
merged 1 commit into from
Apr 28, 2022

Conversation

josephschorr
Copy link
Member

No description provided.

@josephschorr josephschorr requested a review from a team as a code owner April 28, 2022 16:25
@github-actions github-actions bot added the area/CLI Affects the command line label Apr 28, 2022
Copy link
Contributor

@ecordell ecordell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also want this for the migrate and head commands?

Comment on lines 92 to 93
engines := append([]string{}, datastore.Engines...)
sort.Strings(engines) // Sort for stability.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
engines := append([]string{}, datastore.Engines...)
sort.Strings(engines) // Sort for stability.
sort.Strings(datastore.Engines) // Sort for stability.

I don't think we really care if the original list gets sorted?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not change it, as its defined to be "static", for lack of a better term.

@josephschorr
Copy link
Member Author

@ecordell Updated

@github-actions github-actions bot added the area/datastore Affects the storage system label Apr 28, 2022
@@ -13,6 +14,13 @@ import (

var Engines = []string{}

// SortedEngineIDs returns the full set of engine IDs, sorted.
func SortedEngineIDs() []string {
engines := append([]string{}, Engines...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will drop the quotes around each engine. Previously it was

"memory", "postgres" ...

But now it will be

memory, postgres ...

Nothing blocking, but it will look different from other flags that list valid options.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Contributor

@ecordell ecordell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@josephschorr josephschorr merged commit 7bd2af5 into authzed:main Apr 28, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 28, 2022
@josephschorr josephschorr deleted the engine-param branch April 28, 2022 23:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/CLI Affects the command line area/datastore Affects the storage system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants