-
Notifications
You must be signed in to change notification settings - Fork 118
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
Add flag to select the kibana version in elastic-package status #590
Conversation
Nice. Later this could also be expanded that |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
cmd/status.go
Outdated
@@ -37,6 +37,7 @@ func setupStatusCommand() *cobraext.Command { | |||
RunE: statusCommandAction, | |||
} | |||
cmd.Flags().BoolP(cobraext.ShowAllFlagName, "a", false, cobraext.ShowAllFlagDescription) | |||
cmd.Flags().String(cobraext.StackVersionFlagName, "", cobraext.StackVersionFlagDescription) |
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 flag might be misleading here. In elastic-package status apache --version 8.0.0
the version flag may suggest that this is Apache 8.0.0, not Kibana.
What do you think about replacing it with --kibana-version
?
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.
Or kibana.version
? Thinking of it as the filters you can apply on epr, for example https://epr.elastic.co/search?experimental=true&kibana.version=8.0.0 It would become a more generic feature ...
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 think that --kibana-version
will look more like a command option. I haven't seen options with dots, I guess it's a standard?
But calling for a query is also an option: --query="kibana.version=8.0.0"
.
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.
BTW do we really need the experimental flag? It's always enabled...
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 used --version
because it is the flag used to specify the stack version in the stack subcomand, but I see how it can be confusing here.
I have opted for --kibana-version
, I also prefer it to the version with the dot. How the kibana version is finally encoded in the query is an implementation detail.
But calling for a query is also an option:
--query="kibana.version=8.0.0"
.
--kibana-version
covers a very specific use case, so I prefer to have a specific flag for that. Also, package developers don't need to know the registry API to use this command, so I don't think we need generic options by now.
Humans needing to write url query parameters is a call for problems.
I haven't seen options with dots, I guess it's a standard?
This is not very common, but I am pretty sure it is possible to have options with dots, take a look to metricbeat --help
🙂
BTW do we really need the experimental flag? It's always enabled...
I hope we can get rid of this soon elastic/package-spec#225 🔥
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.
Thanks for adjusting this!
With this flag elastic-package status can be used to check the versions
available of a package for a given version of the stack.
For example: