Skip to content

Conversation

@carla-was-not-available
Copy link

@carla-was-not-available carla-was-not-available commented Nov 20, 2025

This PR

  • adds this new feature

Related Issues

Fixes #1234523

Notes

Follow-up Tasks

How to test

resolves: #1619

@gemini-code-assist
Copy link

Summary of Changes

Hello @carla-was-not-available, 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 configuration flexibility for flagd in-process providers by introducing a dedicated environment variable, FLAGD_SYNC_PORT, for specifying the synchronization port. This change ensures that in-process providers can be configured with a specific sync port while maintaining backward compatibility with existing FLAGD_PORT configurations.

Highlights

  • New Environment Variable: Introduced FLAGD_SYNC_PORT to specify the synchronization port for in-process flagd providers.
  • Port Resolution Logic: Updated FlagdOptions to prioritize FLAGD_SYNC_PORT for IN_PROCESS resolvers, falling back to FLAGD_PORT for backward compatibility.
  • Test Coverage: Added new unit tests to validate the correct usage of FLAGD_SYNC_PORT and its fallback mechanism.
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.

…pen-feature#1619

Signed-off-by: Carla Köberl <carla.freitas.92@hotmail.com>
Signed-off-by: Carla Köberl <carla.freitas.92@hotmail.com>
Copy link

@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 for in-process providers, ensuring backward compatibility with FLAGD_PORT. The implementation is correct, and the addition of tests is appreciated. I've provided a few suggestions to enhance the code's readability and improve test coverage for edge cases. Specifically, I've recommended refactoring the port resolution logic in FlagdOptions.java to make it cleaner and more maintainable. In FlagdOptionsTest.java, I've suggested using constants for environment variable keys and adding a test case to verify the precedence of FLAGD_SYNC_PORT over FLAGD_PORT.

@carla-was-not-available carla-was-not-available changed the title Feat: Add FLAGD_SYNC_PORT support for in-process providers with backwards compatibility feat: Add FLAGD_SYNC_PORT support for in-process providers with backwards compatibility Nov 20, 2025
…feature#1651

Signed-off-by: Carla Köberl <carla.freitas.92@hotmail.com>
Signed-off-by: Carla Köberl <carla.freitas.92@hotmail.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
Copy link
Member

@aepfli aepfli left a comment

Choose a reason for hiding this comment

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

The code changes look really great, but i think the readme.md needs some update too, as it is not 100% accurate now

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.

[flagd] Fix in-process provider to use FLAGD_SYNC_PORT (not FLAGD_PORT) for port configuration (backwards compatibility)

6 participants