-
Notifications
You must be signed in to change notification settings - Fork 17
refactor: rename flag-source-url to provider-url for consistency #181
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
Conversation
Summary of ChangesHello @kriscoleman, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the OpenFeature CLI to standardize the naming of flag sources/destinations to 'provider'. This change enhances consistency and clarity across the CLI, making it more intuitive for users by aligning with established OpenFeature terminology. The implementation ensures a smooth transition by maintaining full backward compatibility for existing configurations and command-line usages, while guiding users towards the new, preferred naming convention. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
a726fe0 to
1f91cd2
Compare
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.
Code Review
This PR is a solid refactoring that improves consistency and clarity by renaming --flag-source-url to --provider. The changes are well-implemented across all commands, documentation, and configuration. The inclusion of backward compatibility with a dedicated test for the pull command is excellent. I've made a couple of suggestions to further improve consistency in the CLI help text and to enhance test coverage. Overall, this is a high-quality contribution.
refactors flag source url to provider and maintains backward compatibility. This commit transitions from using `flag-source-url` to `provider` across the codebase, enhancing clarity and consistency in referencing the flag provider. The previous flag is still kept for backwards compatibility. Signed-off-by: Kris Coleman <kriscodeman@gmail.com>
1f91cd2 to
69a32f2
Compare
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Summary
This PR refactors the CLI flag naming for better consistency and clarity across all commands. The primary change is renaming
--flag-source-urlto--providerto:pull,push, andinitcommandsChanges
CLI Flag Changes
--providerreplaces--flag-source-urlacross all commands (init,pull,push)--flag-source-urlflag still works but shows deprecation warningproviderkey replacesflagSourceUrlin.openfeature.yamlUpdated Commands
internal/cmd/init.go:27): Uses new--providerflag and generates updated config templateinternal/cmd/pull.go:45): Uses new--providerflag with improved error messagesinternal/cmd/push.go:58): Uses new--providerflag with updated examplesDocumentation
docs/commands/to reference--providerpushcommand example to config templateTesting
internal/cmd/pull_test.go:351-405)--providerflagTechnical Details
The refactoring maintains full backward compatibility through a fallback mechanism:
Flag resolution order (in
GetFlagSourceUrl):--providerflag (highest priority)--flag-source-urlflagproviderconfig keyflagSourceUrlconfig key (lowest priority)Configuration handling: Template generation updated to use
providerkey while maintaining support for legacy configurationsTest Plan
--providerflag works on all commands (init, pull, push)--flag-source-urlstill works with deprecation warningproviderkey works correctlyflagSourceUrlkey still works