Skip to content

add the mixer feature flags in Dockerfile and use the custom.yaml in DCP#6327

Open
shixiao-coder wants to merge 8 commits into
datacommonsorg:masterfrom
shixiao-coder:update-dcp-script-to-read-spanner-embeddings
Open

add the mixer feature flags in Dockerfile and use the custom.yaml in DCP#6327
shixiao-coder wants to merge 8 commits into
datacommonsorg:masterfrom
shixiao-coder:update-dcp-script-to-read-spanner-embeddings

Conversation

@shixiao-coder
Copy link
Copy Markdown
Contributor

This PR copy the feature flag folder in custom DC Dockerfile

It also add logic to include feature_flags_path for DCP only case, it will read the feature flag when use spanner graph.

We also add the logic to read an env variable RESOLVE_WITH_SPANNER_EMBEDDINGS to tune the yaml to do resolve through spanner embeddings

… DCP, when spanner embedding is set to true, the custom.yaml is updated to read from Spanner embeddings
@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 enhances the mixer service deployment by integrating custom feature flag management. It ensures that the necessary configuration files are available within the container and provides a mechanism to programmatically tune feature flags at runtime to support spanner-based embedding resolution.

Highlights

  • Docker Configuration: Updated the Dockerfile to include the mixer feature flags directory in the image build.
  • Mixer Initialization: Configured the mixer startup script to utilize custom feature flags via the feature_flags_path argument.
  • Dynamic YAML Tuning: Added logic to dynamically update the custom.yaml feature flag file based on the RESOLVE_WITH_SPANNER_EMBEDDINGS environment variable.
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.

Copy link
Copy Markdown
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 configures the CDC services to use custom feature flags by copying the deploy/featureflags directory in the Dockerfile and updating run.sh to pass the feature flags path to the mixer. Additionally, it adds shell logic to enable Spanner search embeddings in the custom configuration if a specific environment variable is set. The review feedback points out a critical issue where the Docker build will fail because the deploy/featureflags directory is copied from a stage where it does not exist, and notes an inconsistency between the environment variable checked in the script and the one mentioned in the pull request description.

Comment thread build/cdc_services/Dockerfile
Comment thread build/cdc_services/run.sh
@shixiao-coder shixiao-coder requested a review from gmechali June 3, 2026 16:19
Comment thread build/cdc_services/run.sh
# 3. Use mixer custom feature flags
MIXER_ARGS+=('--feature_flags_path=deploy/featureflags/custom.yaml')

if [[ $RESOLVE_WITH_SPANNER_EMBEDDINGS == "true" ]]; then
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.

Why do you need this?

For website we needed it because the feature_flags file is also used by the CDC stable image, so we couldnt just override that file.

The custom.yaml you added is only for DCP. So is there a reason why you can't just set the variables in the custom.yaml?

FYI this override logic for website feature flags is meant to be deleted when we stop building the CDC stable image.

…th into the INFO log instead of directly into the high level debug log
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.

2 participants