Skip to content

add the use_config_threshold_for_spanner_embedding feature flag to prod following the flag for other env setup - #6548

Merged
shixiao-coder merged 19 commits into
datacommonsorg:masterfrom
shixiao-coder:spanner-threshold-prod-feature-flag
Aug 18, 2026
Merged

add the use_config_threshold_for_spanner_embedding feature flag to prod following the flag for other env setup#6548
shixiao-coder merged 19 commits into
datacommonsorg:masterfrom
shixiao-coder:spanner-threshold-prod-feature-flag

Conversation

@shixiao-coder

Copy link
Copy Markdown
Contributor

This PR add the feature flag in prod environment and default to false

When false, we will read default value 0.7 from the code,
When true, we will set config value to be 0.6 based on test result https://docs.google.com/spreadsheets/d/12d9BPJagWS5z2WA8En9JY71TyGrCYpIBQ4LqI0JJ2v4/edit?gid=1132426848#gid=1132426848

@shixiao-coder
shixiao-coder requested a review from a team as a code owner July 30, 2026 17:29
@gemini-code-assist

Copy link
Copy Markdown
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 introduces a new feature flag to the production environment to control the threshold logic for Spanner embeddings. By gating this functionality, the team can safely toggle between the hardcoded default threshold and a configurable value based on recent testing results.

Highlights

  • Feature Flag Addition: Added the 'use_config_threshold_for_spanner_embedding' feature flag to the production configuration.
  • Default Configuration: Set the default state of the new feature flag to 'false' to ensure backward compatibility with the existing threshold logic.
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 the 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 counterproductive. 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.

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.

@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 a new feature flag configuration 'use_config_threshold_for_spanner_embedding' to the production environment, which is initially disabled. This flag gates the use of the 'SPANNER_EMBEDDING_THRESHOLD' configuration. There are no review comments, and I have no feedback to provide.

@shixiao-coder
shixiao-coder requested a review from gmechali July 30, 2026 17:30

@gmechali gmechali 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.

Can you ping us when your PR made it to production github.com//pull/6533
So we can approve this then. A bit too early for this PR :)

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

⚠️ PRODUCTION FEATURE FLAG CHANGE — REVIEW CHECKLIST

Please conduct a careful review before merging this production change & coordinate with the oncaller.
Merging this PR will trigger a rolling restart of all Kubernetes pods in production.

Things to check before approving:

  • Staging Validated: Have these exact flag changes been tested and verified in staging?
  • Cache Invalidation: If API responses change, remember to clear the Redis cache after merging.
  • Time Window: Ensure updates occur during global working hours; request lead approval for Friday–Sunday updates.
  • Oncall Communication: Please additionally announce this update on the oncall thread.
  • Type Safety: Verify that flag value types match what the server binary expects.

@gmechali gmechali 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.

approved, thanks!

@shixiao-coder
shixiao-coder merged commit 7b80bbd into datacommonsorg:master Aug 18, 2026
17 of 18 checks passed
@shixiao-coder
shixiao-coder deleted the spanner-threshold-prod-feature-flag branch August 18, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants