-
Notifications
You must be signed in to change notification settings - Fork 8
feat(core): Add namespace get/query by FQN #729
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @Doom4535, 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 enhances the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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
|
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 pull request introduces a valuable feature for querying namespaces by FQN. The implementation is solid, including a well-commented workaround for cobra's flag handling limitations. The documentation updates are also clear and helpful.
However, a critical aspect is missing: tests. The end-to-end tests in e2e/namespaces.bats have not been updated to reflect these changes. This will likely break existing tests for the get command and leaves the new functionality untested. This is a high-severity issue that should be addressed. Please add tests for the --fqn flag, including success cases and failure cases (e.g., using --id and --fqn together), and update existing tests as needed.
I've also left one comment with a suggestion to make the code a bit more concise.
|
For details on the need to add custom logic for the mutually exclusive flags, see: #728 |
23f093e to
156b2b5
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 pull request introduces a valuable feature by allowing namespaces to be queried by their Fully Qualified Name (FQN). The implementation correctly adds a new flag and handles the mutual exclusivity with the existing ID flag. My review focuses on improving code clarity, ensuring correct error handling, and fixing issues in the e2e tests to make them more robust and ensure they accurately validate the new functionality. There are some minor opportunities for code improvement and more significant issues with the test cases, including a potentially fragile assumption in the test setup and incorrect assertions for error messages.
156b2b5 to
315ebe7
Compare
|
Thanks for opening this, and for adding unit tests and examples! Much appreciated. Would you please update this enhancement to employ the patterns set here to utilize the Cobra markings during initialization and its own error messaging? |
Signed-off-by: Aaron Covrig <[email protected]>
315ebe7 to
4b051ef
Compare
Awesome, done. |
This adds support for querying the results based on the namespace FQN. I was originally planning to target the returned 'name' but the
platform/sdkdoesn't currently provide a nice way to do that with out adding in some new logic. This code adds a new flag option forpolicy attributes namespace getof-nand--fqn; I nearly put these down as-uand--urlas the current behavior of the sdk forces the FQN to be treated as a URL.Usage example: