Skip to content

docs: update docs for graceful defaulting#1902

Open
toddbaert wants to merge 4 commits intomainfrom
chore/graceful-default-docs
Open

docs: update docs for graceful defaulting#1902
toddbaert wants to merge 4 commits intomainfrom
chore/graceful-default-docs

Conversation

@toddbaert
Copy link
Member

Add docs about graceful defaulting.

@toddbaert toddbaert requested review from a team as code owners March 11, 2026 13:46
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 11, 2026
@netlify
Copy link

netlify bot commented Mar 11, 2026

Deploy Preview for polite-licorice-3db33c ready!

Name Link
🔨 Latest commit adfd5f0
🔍 Latest deploy log https://app.netlify.com/projects/polite-licorice-3db33c/deploys/69b1d0a6380dd600082a835a
😎 Deploy Preview https://deploy-preview-1902--polite-licorice-3db33c.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 significantly enhances the documentation around flag evaluation, specifically focusing on the concept of graceful defaulting. It clarifies how flagd handles cases where a defaultVariant is explicitly set to null or entirely omitted, ensuring that client SDKs can reliably use code-defined defaults. Additionally, it updates all API examples to use the v2 evaluation service and improves code block highlighting for better user experience.

Highlights

  • Graceful Defaulting Documentation: Expanded and clarified the documentation for defaultVariant behavior, particularly when it is null or omitted, to explain how flagd gracefully falls back to code-defined defaults and the resulting evaluation response format.
  • API Version Update in Examples: Updated all cURL and grpcurl examples in the documentation from flagd.evaluation.v1.Service to flagd.evaluation.v2.Service to reflect the latest API version.
  • JSON Code Block Highlighting: Converted all json code blocks to jsonc (JSON with comments) in the documentation for improved readability and syntax highlighting.
  • New Troubleshooting Section: Added a new troubleshooting section explaining why value and variant fields might be omitted from flag evaluation responses, linking it to graceful defaulting.
Changelog
  • docs/assets/cheat-sheet-flags.json
    • Added a new code-default-flag entry with defaultVariant: null to demonstrate graceful defaulting.
  • docs/quick-start.md
    • Updated cURL commands from v1 to v2 evaluation services.
    • Changed JSON code block syntax highlighting from json to jsonc.
  • docs/reference/cheat-sheet.md
    • Updated grpcurl commands from v1 to v2 evaluation services.
    • Removed an outdated ResolveAll example with a selector.
    • Changed JSON code block syntax highlighting from json to jsonc.
  • docs/reference/flag-definitions.md
    • Expanded the explanation of defaultVariant to detail graceful defaulting when null or omitted.
    • Added new examples for defaultVariant: null and omitted defaultVariant configurations.
    • Introduced a 'Resolution Format' section to clarify evaluation responses for configured vs. code defaults.
    • Removed a note regarding reason=ERROR for omitted defaultVariant as the behavior is now clarified.
    • Changed JSON code block syntax highlighting from json to jsonc.
  • docs/troubleshooting.md
    • Updated cURL commands from v1 to v2 evaluation services.
    • Added a new section 'Variant/value not included in response' to explain graceful defaulting behavior.
Activity
  • No specific activity (comments, reviews, or progress updates) has been recorded for this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 does a good job of updating the documentation to reflect the new 'graceful defaulting' feature and the upgrade to the v2 evaluation API. The explanations are clear and the examples are helpful.

I've left a few specific comments for minor improvements. Additionally, I noticed that the Evaluate All Flags section in docs/reference/cheat-sheet.md (lines 335-343) still contains a grpcurl example using flagd.evaluation.v1.Service/ResolveAll. Since other parts of the documentation are being updated to v2 and ResolveAll has been removed from the v2 evaluation service, this example is now inconsistent and potentially misleading. It would be great to address this to ensure all documentation is aligned with the v2 API.

Note: Security Review has been skipped due to the limited scope of the PR.

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@toddbaert toddbaert force-pushed the chore/graceful-default-docs branch from bc0d813 to a2964af Compare March 11, 2026 13:56
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants