-
Notifications
You must be signed in to change notification settings - Fork 68
feat(flagd): Configure in-process provider using FLAGD_SYNC_PORT environment variable #804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…allback Co-authored-by: aepfli <[email protected]>
Co-authored-by: aepfli <[email protected]>
|
@copilot please revert all your go.mod and go.sum updates, there is no need to do this within this pullrequest |
Co-authored-by: aepfli <[email protected]>
|
/gemini review |
There was a problem hiding this 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 correctly implements the use of FLAGD_SYNC_PORT for the in-process provider, with a fallback to FLAGD_PORT for backward compatibility. The changes are well-documented in the README, and the new logic is thoroughly covered by unit tests.
I have one suggestion to refactor the new updatePortFromEnvVar function in providers/flagd/pkg/configuration.go to make it more concise and improve maintainability. The rest of the changes look good.
Signed-off-by: Simon Schrottner <[email protected]>
Removed duplicate variable declarations for portS and envVarName. Signed-off-by: Simon Schrottner <[email protected]>
|
@aepfli Could you please change the PR and issue title? |
erka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be better to use table driven tests here.
|
I will update the repo, we actually do have gherkin tests in the testbed, and this test by copilot is not needed. |
|
@erka i removed the test generated by copilot - and added the gherkin testsuite tests for this kind of action - which was good because it catched issues in the gherkin files, and in the implementation (as we did not know which resolver we are in, at the previous implementation) |
| { | ||
| name: "RPC", | ||
| tags: "@rpc", | ||
| tags: "@rpc && ~@forbidden", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this relates to the fatalstatuscodes, which are currently also another open pr
Signed-off-by: Simon Schrottner <[email protected]>
0b73dbf to
1359170
Compare
FLAGD_SYNC_PORTenvironment variable constantupdateFromEnvVar()to readFLAGD_SYNC_PORTfirst, then fallback toFLAGD_PORTfor backwards compatibilityFLAGD_SYNC_PORTfunctionalityOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.