Skip to content

docs: add docs for selector, metadata#1829

Merged
toddbaert merged 27 commits into
mainfrom
new-docs
Dec 24, 2025
Merged

docs: add docs for selector, metadata#1829
toddbaert merged 27 commits into
mainfrom
new-docs

Conversation

@toddbaert

@toddbaert toddbaert commented Nov 27, 2025

Copy link
Copy Markdown
Member

This PR:

Fixes: #1828

@toddbaert toddbaert requested review from a team as code owners November 27, 2025 20:41
@netlify

netlify Bot commented Nov 27, 2025

Copy link
Copy Markdown

Deploy Preview for polite-licorice-3db33c ready!

Name Link
🔨 Latest commit 99704be
🔍 Latest deploy log https://app.netlify.com/projects/polite-licorice-3db33c/deploys/6949b74ac3312900083788bb
😎 Deploy Preview https://deploy-preview-1829--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.

@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Nov 27, 2025
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @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 significantly enhances the documentation for flagd's selector features, which allow for more granular and efficient filtering of flag configurations. The updates cover the core concepts of selectors and flag sets, provide practical guidance for their usage, and include a detailed migration path for existing users. Additionally, it addresses potential troubleshooting scenarios and clarifies the syntax and precedence of selectors across various flagd components.

Highlights

  • New Selector Concepts Documentation: Introduced a new conceptual document explaining flagd's selector features, detailing flag sources, flag sets, metadata reflection, and their decoupling for more flexible flag management.
  • Migration Guide for Flag Sets: Added a comprehensive guide to assist users in transitioning from legacy source-based selector patterns to the new, recommended flag set-based patterns, ensuring backward compatibility.
  • Detailed Selector Syntax Reference: Provided a technical specification for selector syntax, including supported keys like flagSetId and source, precedence rules, and how metadata reflection works.
  • Updated Provider and Sync Configuration Docs: Enhanced existing documentation for provider and sync configurations to reflect the new selector capabilities, including usage examples and precedence for different selector input methods.
  • Troubleshooting for Selector Issues: Expanded the troubleshooting guide with a dedicated section for common selector-related problems, offering debugging steps for issues like no flags returned, wrong flags, or ignored selectors.
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.

@toddbaert toddbaert marked this pull request as draft November 27, 2025 20:41

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 adds extensive and well-structured documentation for the new selector features, covering concepts, migration, syntax, and troubleshooting. The new documentation is a great addition. I've identified a few minor issues, such as a list numbering error and several instances of trailing whitespace that should be corrected for consistency. More significantly, there's a section on selector precedence in sync-configuration.md that appears to be confusing and potentially incorrect in its context, which I've flagged as a high-severity issue to ensure clarity.

Comment thread docs/reference/sync-configuration.md Outdated
Comment thread docs/concepts/selectors.md Outdated
Comment thread docs/concepts/selectors.md Outdated
Comment thread docs/guides/migrating-to-flag-sets.md Outdated
Comment thread docs/guides/migrating-to-flag-sets.md Outdated
Comment thread docs/reference/selector-syntax.md Outdated
Comment thread docs/reference/specifications/providers.md Outdated
Comment thread docs/reference/specifications/providers.md Outdated
Comment thread docs/reference/specifications/providers.md Outdated
Comment thread docs/reference/sync-configuration.md Outdated
Comment thread docs/guides/migrating-to-flag-sets.md Outdated
Comment thread docs/guides/migrating-to-flag-sets.md Outdated
Comment thread docs/reference/specifications/providers.md Outdated
Comment thread docs/reference/specifications/providers.md Outdated
Comment thread docs/reference/specifications/providers.md Outdated
@toddbaert toddbaert marked this pull request as ready for review November 28, 2025 18:29
Comment thread docs/concepts/selectors.md

@guidobrei guidobrei left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ Fine for me with some suggestions.

One thing we should add in a follow up: All the examples use map-based flag configurations. We do not talk about the possibility of a more flexible flags: [].

Comment thread docs/concepts/metadata.md Outdated
Comment thread docs/concepts/metadata.md Outdated
Comment thread docs/concepts/metadata.md
}
},
"metadata": {
"flagSetId": "payment-service" // Reflected from selector

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mark this as experimental?
If we decide to support a more flexible selector logic, metadata reflection might not be so easy anymore.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you suggest we do so? Since it's a behavior/payload?

Comment thread docs/concepts/metadata.md
Comment thread docs/concepts/selectors.md
Comment thread docs/concepts/selectors.md
Comment thread docs/reference/selector-syntax.md Outdated
Comment thread docs/reference/selector-syntax.md Outdated
@toddbaert

Copy link
Copy Markdown
Member Author

@guidobrei Thanks for the thorough review! 🙏

Comment thread docs/concepts/metadata.md Outdated
Comment thread docs/concepts/metadata.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't any mention of the new list-based flag structure. Will that be covered in a follow-up doc? It seems like an important concept because it's the only way to support multiple environment configuration from a single flagd instance

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guidobrei mentioned this too. I will add it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added: 7260fad

toddbaert and others added 10 commits December 22, 2025 16:25
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
toddbaert and others added 17 commits December 22, 2025 16:25
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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>
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>
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>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Guido Breitenhuber <guido.breitenhuber@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Guido Breitenhuber <guido.breitenhuber@dynatrace.com>
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>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@sonarqubecloud

Copy link
Copy Markdown

@toddbaert toddbaert requested a review from beeme1mr December 23, 2025 16:36

@beeme1mr beeme1mr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but we should release the update before merging this.

@toddbaert

Copy link
Copy Markdown
Member Author

Looks good but we should release the update before merging this.

Yep, agreed.

@toddbaert toddbaert merged commit 87183f5 into main Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] Create documentation for selector and related metadata features

5 participants