fix(sync): synchronize readiness state#2006
Conversation
✅ Deploy Preview for polite-licorice-3db33c canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThe gRPC and HTTP sync implementations now use atomic readiness flags. New concurrency tests exercise readiness checks during startup, and HTTP tests update callbacks to use ChangesSync readiness concurrency
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Use atomic readiness state for gRPC and HTTP sync paths, and add production-path race regressions. Signed-off-by: Konstantin Baltsat <baltsat2002@mail.ru>
30ef582 to
e67f001
Compare
|
🤖 I have created a release *beep* *boop* --- <details><summary>flagd: 0.16.1</summary> ## [0.16.1](flagd/v0.16.0...flagd/v0.16.1) (2026-07-27) ### 🐛 Bug Fixes * add server ReadTimeouts, update security deps ([#1980](#1980)) ([0e1e8b3](0e1e8b3)) * handle invalid selector errors ([#1976](#1976)) ([409a62e](409a62e)) * **security:** update module google.golang.org/grpc to v1.82.1 [security] ([#2005](#2005)) ([4281adf](4281adf)) * **security:** update vulnerability-updates [security] ([#1984](#1984)) ([2a5a6b6](2a5a6b6)) ### ✨ New Features * **sync:** configurable gRPC keepalive enforcement on sync server ([#1999](#1999)) ([19e57b9](19e57b9)) </details> <details><summary>flagd-proxy: 0.9.7</summary> ## [0.9.7](flagd-proxy/v0.9.6...flagd-proxy/v0.9.7) (2026-07-27) ### 🐛 Bug Fixes * add server ReadTimeouts, update security deps ([#1980](#1980)) ([0e1e8b3](0e1e8b3)) * **security:** update module google.golang.org/grpc to v1.82.1 [security] ([#2005](#2005)) ([4281adf](4281adf)) * **security:** update vulnerability-updates [security] ([#1984](#1984)) ([2a5a6b6](2a5a6b6)) </details> <details><summary>core: 0.16.1</summary> ## [0.16.1](core/v0.16.0...core/v0.16.1) (2026-07-27) ### 🐛 Bug Fixes * **certreloader:** re-check reload condition under write lock ([#1994](#1994)) ([86489da](86489da)) * handle invalid selector errors ([#1976](#1976)) ([409a62e](409a62e)) * readyz never true of multiple gRPC syncs are used ([#1985](#1985)) ([29833e8](29833e8)) * **security:** update module google.golang.org/grpc to v1.82.1 [security] ([#2005](#2005)) ([4281adf](4281adf)) * **security:** update vulnerability-updates [security] ([#1984](#1984)) ([2a5a6b6](2a5a6b6)) * **sync:** avoid send on closed channel in fileinfo watcher Close ([#1992](#1992)) ([a7339ea](a7339ea)) * **sync:** handle non-string YAML map keys in config parsing ([#1990](#1990)) ([3c72e6f](3c72e6f)) * **sync:** re-establish file watch after delete and restore ([#2001](#2001)) ([d434adf](d434adf)) * **sync:** synchronize readiness state ([#2006](#2006)) ([317a7e0](317a7e0)) ### ✨ New Features * improve ETag and body hash support to blob/http sync ([#1991](#1991)) ([1e210d4](1e210d4)) ### 🧹 Chore * fix flaky test ([7ff137d](7ff137d)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>



This PR
atomic.Boolatomic.Boolvalues in HTTP testsRelated Issues
Fixes #2004
Notes
The issue's blob item is already synchronized by #1991, so this PR leaves it unchanged.
How to test
cd core && go test -race -short ./pkg/sync/grpc ./pkg/sync/httpcd core && go test -race -count=3 -run "TestIsReadyRaceFreeDuring" ./pkg/sync/grpc ./pkg/sync/httpcd core && go vet ./...cd core && go test -short ./...git diff --check