Skip to content

Conversation

@thomaspoignant
Copy link
Owner

@thomaspoignant thomaspoignant commented Nov 5, 2025

Description

This PR is here to support starting the relay proxy as a unix socket.

The PR contains a new format for the configuration of the relayproxy.
Moving the listen option into a server option, allowing to have a more fine grained configuration.

Closes issue(s)

Resolve #4244

Checklist

  • I have tested this code
  • I have added unit test to cover this code
  • I have updated the documentation (README.md and /website/docs)
  • I have followed the contributing guide

@netlify
Copy link

netlify bot commented Nov 5, 2025

Deploy Preview for go-feature-flag-doc-preview canceled.

Name Link
🔨 Latest commit 7f26aba
🔍 Latest deploy log https://app.netlify.com/projects/go-feature-flag-doc-preview/deploys/690d0e4a1e66160008ac084a

@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.96%. Comparing base (de4d46d) to head (7f26aba).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
cmd/relayproxy/api/server.go 55.55% 14 Missing and 6 partials ⚠️
cmd/relayproxy/main.go 0.00% 7 Missing ⚠️
cmd/relayproxy/config/config_validator.go 72.22% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4261      +/-   ##
==========================================
- Coverage   84.96%   84.96%   -0.01%     
==========================================
  Files         140      141       +1     
  Lines        5660     5739      +79     
==========================================
+ Hits         4809     4876      +67     
- Misses        644      651       +7     
- Partials      207      212       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thomaspoignant
Copy link
Owner 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 a significant feature by adding support for running the relay proxy as a Unix socket. The configuration has been thoughtfully refactored into a more structured server block, which greatly improves clarity and future extensibility. The implementation is solid, with comprehensive updates to tests and documentation to match the new functionality. I've included a few suggestions to enhance error handling, logging consistency, and the robustness of the tests. Overall, this is an excellent and well-executed contribution.

@thomaspoignant
Copy link
Owner 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 starting the relay proxy as a Unix socket, which is a great addition for certain deployment scenarios. The changes include a significant and well-executed refactoring of the configuration structure, moving server-related options under a new server block. Backward compatibility is thoughtfully maintained by using getter methods that handle deprecated fields and issue warnings. The documentation, examples, and Helm charts have been updated accordingly, and comprehensive tests for the new Unix socket functionality have been added. My review includes a couple of suggestions to improve test robustness and make the configuration validation logic more resilient to future changes.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

@thomaspoignant thomaspoignant marked this pull request as ready for review November 6, 2025 21:10
@thomaspoignant
Copy link
Owner Author

The CI failing for the Helm Check is normal because we need to release the new version of the relay proxy to make the changes works.

@thomaspoignant thomaspoignant merged commit 7b369b4 into main Nov 10, 2025
22 of 24 checks passed
@thomaspoignant thomaspoignant deleted the unix-socket-support branch November 10, 2025 19:01
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.

(feature) Add Unix socket support for GO Feature Flag relay proxy

2 participants