Skip to content

Conversation

@marcozabel
Copy link
Contributor

This PR

This PR adds the FLAGD_SYNC_PORT environment variable option to set the port for flagd. If both FLAGD_SYNC_PORT and FLAGD_PORT are given, FLAGD_SYNC_PORT will be preferred.

Related Issues

Fixes #139

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @marcozabel, 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 addresses an issue by implementing a dedicated environment variable, FLAGD_SYNC_PORT, for configuring the synchronization port of the in-process flagd provider. This change allows for more granular control over port assignments, ensuring that the synchronization port can be explicitly set and prioritized over the general FLAGD_PORT when both are defined. The update includes necessary configuration logic adjustments and new test cases to validate the intended behavior.

Highlights

  • New Environment Variable: Introduced FLAGD_SYNC_PORT as a dedicated environment variable to specify the synchronization port for flagd.
  • Port Precedence: FLAGD_SYNC_PORT will now be preferred over FLAGD_PORT if both environment variables are provided, ensuring explicit control over the sync port.
  • Configuration Logic Update: The configuration parsing logic has been updated to correctly identify and prioritize FLAGD_SYNC_PORT when determining the active port.
  • Enhanced Test Coverage: Added new unit tests to verify the precedence of FLAGD_SYNC_PORT and confirm that invalid port values from environment variables are gracefully ignored.
  • E2E Test Refinements: Updated end-to-end tests to include checks for provider status and to filter out additional unsupported scenarios, improving test suite robustness.
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.

@marcozabel marcozabel changed the title InProcess provider should be using FLAGD_SYNC_PORT over FLAGD_PORT feat: Add FLAGD_SYNC_PORT support for in-process providers with backwards compatibility Nov 24, 2025
@marcozabel
Copy link
Contributor Author

/gemini review

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 introduces support for the FLAGD_SYNC_PORT environment variable, prioritizing it over FLAGD_PORT for configuring the flagd provider. The changes include updating the configuration logic, adding corresponding tests, and enhancing the e2e test suite. The implementation correctly prefers FLAGD_SYNC_PORT. My review identifies a minor issue in how numeric environment variables are parsed, which could affect configurations using port 0, and includes a suggestion to make the parsing more robust.

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 adds support for the FLAGD_SYNC_PORT environment variable, giving it precedence over FLAGD_PORT. The changes look good and include relevant tests. I've found a few issues: a potential bug in handling port 0, a minor typo in a test description, and an opportunity to improve type safety in a test helper function. My detailed comments are below.

marcozabel and others added 3 commits November 24, 2025 17:35
Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Marco Zabel <49674991+marcozabel@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Marco Zabel <49674991+marcozabel@users.noreply.github.com>
Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
@toddbaert toddbaert merged commit 8feffee into open-feature:main Nov 24, 2025
7 checks passed
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