Conversation
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Summary of ChangesHello @toddbaert, 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 system's error handling by allowing the configuration of 'forbidden' responses. It introduces an option to specify which status codes should be considered fatal, thereby improving the flexibility and robustness of how the system reacts to such conditions. The change is reflected in an updated Gherkin test scenario that now explicitly sets a fatal status code before simulating a forbidden provider. 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
|
| Given an option "fatalStatusCodes" of type "StringList" with value "PERMISSION_DENIED" | ||
| And a forbidden flagd provider |
There was a problem hiding this comment.
I mimicked the same setup for other tests (option first, provider state second).
There was a problem hiding this comment.
Perfect, because we actually initialize on this provider step
There was a problem hiding this comment.
Code Review
This pull request introduces a new option to configure fatal status codes for the flagd provider and updates the test suite to cover this new functionality. The change is straightforward, but I have one suggestion to improve the Gherkin step to make the test scenario more readable and maintainable by abstracting away implementation details, which aligns better with BDD best practices.
| # This test ensures that a forbidden response from flagd results in a fatal client state | ||
| Scenario: Provider forbidden | ||
| Given a forbidden flagd provider | ||
| Given an option "fatalStatusCodes" of type "StringList" with value "PERMISSION_DENIED" |
There was a problem hiding this comment.
While this step is functional, it exposes implementation details like the option name (fatalStatusCodes) and type (StringList), making the scenario less readable from a business perspective. To align better with BDD principles, consider creating a more descriptive, domain-specific step that hides these details. A more readable step could be something like Given the provider is configured to treat 'PERMISSION_DENIED' as a fatal status code. This would make the scenario's intent clearer and more resilient to changes in the underlying option implementation.
Given the provider is configured to treat 'PERMISSION_DENIED' as a fatal status code
Adds options to forbidden.