test: order digest configmap before job success - #6550
redhat-chai-bot wants to merge 4 commits into
Conversation
openshift-gcp-routes drops load balancer health-check probes that would be forwarded off-node, to avoid polluting conntrack (BZ 1925698, 1930457). The dropped source ranges were hardcoded to the public GCP prober ranges (35.191.0.0/16, 130.211.0.0/22). GCD (sovereign) regions probe from different ranges which need to be added to avoid the issue seen on public GCP. Select the dropped ranges by region via a new gcpHealthCheckSourceRanges template function: GCD regions drop their own region's prober ranges, all other regions keep the public GCP behavior. Only ranges reserved for health-check probers in the target environment are dropped -- a range that is reserved prober infrastructure in one environment is ordinary routable space in another, so the ranges must not be dropped unconditionally.
go get github.com/openshift/api@master && go mod tidy
go mod vendor To pull in GCD feature gate in default feature set.
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (78)
📒 Files selected for processing (7)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. WalkthroughThe change orders digest ConfigMap and Job status actions, adds region-specific GCP health-check ranges to rendered nftables rules, and updates the ChangesBuild status ordering
GCP health-check ranges
OpenShift API dependency update
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant RenderConfig
participant renderTemplate
participant gcpHealthCheckSourceRanges
participant nftablesHelper
RenderConfig->>renderTemplate: provide platform and region
renderTemplate->>gcpHealthCheckSourceRanges: select source ranges
gcpHealthCheckSourceRanges-->>renderTemplate: return CIDR list
renderTemplate->>nftablesHelper: render drop rules for each CIDR
Merge Risk: ⚪ Minimal · up to The status ordering and regional health-check rule changes do not show an actionable failure path. The change is ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 13 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (13 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 5 files. (2 skipped: 2 unsupported.) Full details: Test Structure And QualityExplanation The new fixture test has two assertions without meaningful failure messages: Resolution Add diagnostic messages to both assertions, for example
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: redhat-chai-bot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/hold I didn't realize chai bot would open the PR before allowing me to inspect the code. Also it appears to have included my PR #6501 along with the test fix. f1047bb is the relevant code I was curious about, not certain of its validity... |
|
@redhat-chai-bot: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
- What I did
Create the digest ConfigMap before marking the fixture Job
Succeeded. The Job update handler can reconcile immediately and read the ConfigMap; publishingSucceededfirst creates a race that can leaveMachineOSBuildStatusunreconciled when the ConfigMap is not found. Add a fake-client regression test for the ordering and preserve non-success cleanup.- How to verify it
go test -count=1 -run '^TestSetJobStatusCreatesDigestConfigMapBeforeMarkingJobSucceeded$' ./pkg/controller/build/fixturesgo test -count=1 ./pkg/controller/build/fixturesgo test -count=1 -run '^TestOSBuildControllerReconcilesJobsAfterRestart$/^Running MOSB -> Succeeded$' ./pkg/controller/buildgofmt -d pkg/controller/build/fixtures/helpers.go pkg/controller/build/fixtures/helpers_test.gogit diff --check- Description for the changelog
Fix a race in test fixtures that could cause OSBuildController unit tests to time out while reconciling a successful build.
AI-generated. Review for accuracy.
@patrickdillon requested via Chai Bot
Summary by CodeRabbit
New Features
Bug Fixes