Repository navigation
feat(gate): send the gate's own requests to the new copy on each analysis iteration - #82
Merged
Merged
Conversation
…ysis iteration Flagger switches blue-green without sending the new copy a user's request, so the gate requests every path the Canary hands it at the member's Canary service and holds the failed share and the p95 latency to the platform's thresholds. Part of #12.
ExtraToast
enabled auto-merge (squash)
October 25, 2026 14:00
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #12: the analysis half. The warmup after promotion follows in its own pull request.
Problem
Flagger switches blue-green with
provider: kubernetes, so a new copy gets no user request before it is promoted. Its own request metrics hold only the kubelet's probes, and a static runtime exports none at all. The gate held each iteration to pod health alone, so a copy that answered every request with a 5xx, or slowly, was promoted.Change
On each analysis iteration the gate now sends its own requests, as #12's decision and deploy-kit's chapter 55 ("A check sends its own traffic") say.
http://<process>-canary.<namespace>.svc.cluster.local:<port><path>. The gate builds the address itself; a project file supplies none of it.5xx, or no answer within 2 seconds. Anything else passes, a401, a404and a3xxincluded, and the gate never follows a redirect.errorRateandlatencyin the release-gate inputs. The iteration fails when the failed share is over the error rate, when the p95 (nearest rank) of the answered requests is over the latency, or when nothing succeeded: no data is no./(a second/, a query, a fragment), or a Canary with no service port. Each is a question the gate cannot answer, so the answer is503and nothing is sent. The schema already guarantees the path's shape, but the gate holds API access, so it checks again.The README's Release Gate section records all of this, replacing "
error-rateandlatencyare not measured yet".To know
delivery-system.Checks
traffic_test.go:401/404/302, one path503, one path unanswered, nothing answered, one path slow, slow and failing, exactly at the bound;HTTPTrafficagainst a real server: it returns the302without requestingLocation, reports a500, and errors when the server is gone.TestACanaryIsReadWithWhatItsWebhooksCarryAndWhatFlaggerRecordednow covers the port, the paths and the readiness path, and two Canaries whose webhooks disagree on them.task testlocally:internal/gatepasses in full, envtest included, at 98.0% coverage. Only the Docker-backedvaultpolicyandcatalogcases fail, because Docker isn't running here; CI runs them.golangci-lintreports 0 issues.