NO-ISSUE: Fix TestOperator_upgradeableSync#1373
NO-ISSUE: Fix TestOperator_upgradeableSync#1373openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
Conversation
We have discussed [internally](https://redhat-internal.slack.com/archives/CJ1J9C3V4/p1727780218907479?thread_ts=1727759381.029409&cid=CJ1J9C3V4) about this a while ago and thanks to @DavidHurta to provide the solution. ```console $ go test -run TestOperator_upgradeableSync ./pkg/cvo/... -count=1000 ok github.com/openshift/cluster-version-operator/pkg/cvo 134.432s ok github.com/openshift/cluster-version-operator/pkg/cvo/configuration 0.746s [no tests to run] ok github.com/openshift/cluster-version-operator/pkg/cvo/internal 1.951s [no tests to run] ? github.com/openshift/cluster-version-operator/pkg/cvo/internal/dynamicclient [no test files] ``` It seems to bite us more often than before in CI, e.g., [job1](https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1371/pull-ci-openshift-cluster-version-operator-main-unit/2042797754249383936), and [job2](https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1360/pull-ci-openshift-cluster-version-operator-main-unit/2039307795836178432) and [job3](https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1355/pull-ci-openshift-cluster-version-operator-main-unit/2035211529078444032). I still do not fully understand why we have to add `configManagedInformer.WaitForCacheSync(ctx.Done())` or cannot prove that it is the best way to avoid racing but we use it in [the core code](https://github.com/openshift/cluster-version-operator/blob/e9c1c39e21ec353ff5993d386c42bc1b15063dbf/pkg/start/start.go#L257) too. Considering we change only testing code, I would like to have it to avoid unnecessary failures CI.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughA test fix that adds cache synchronization waiting for the ConfigMap-backed shared informer in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hongkailiu, wking The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/verified by @hongkailiu |
|
@hongkailiu: This PR has been marked as verified by DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
Internal test-cases only affect /override ci/prow/e2e-aws-ovn-techpreview |
|
@wking: Overrode contexts on behalf of wking: ci/prow/e2e-aws-ovn-techpreview, ci/prow/e2e-hypershift-conformance DetailsIn response to this:
Instructions 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. |
|
/label acknowledge-critical-fixes-only |
|
@hongkailiu: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/override ci/prow/e2e-agnostic-operator |
|
@wking: Overrode contexts on behalf of wking: ci/prow/e2e-agnostic-operator, ci/prow/e2e-agnostic-ovn, ci/prow/e2e-agnostic-ovn-techpreview-serial-1of3, ci/prow/e2e-agnostic-ovn-techpreview-serial-2of3, ci/prow/e2e-agnostic-ovn-techpreview-serial-3of3, ci/prow/e2e-agnostic-ovn-upgrade-into-change, ci/prow/e2e-agnostic-ovn-upgrade-out-of-change, ci/prow/e2e-hypershift DetailsIn response to this:
Instructions 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. |
|
@hongkailiu: all tests passed! 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. |
We have discussed internally about this a while ago and thanks to @DavidHurta to provide the solution.
It seems to bite us more often than before in CI, e.g., job1, and
job2 and
job3.
I still do not fully understand why we have to add
configManagedInformer.WaitForCacheSync(ctx.Done())or cannot prove that it is the best way to avoid racing but we use it in the core code too. Considering we change only testing code, I would like to have it to avoid unnecessary failures CI.Summary by CodeRabbit