Skip to content

OCPBUGS-100143: e2e: skip CRD Compatibility Checker tests on External topology clusters - #638

Open
simkam wants to merge 1 commit into
openshift:mainfrom
simkam:crdchecker-tests-external-topology
Open

OCPBUGS-100143: e2e: skip CRD Compatibility Checker tests on External topology clusters#638
simkam wants to merge 1 commit into
openshift:mainfrom
simkam:crdchecker-tests-external-topology

Conversation

@simkam

@simkam simkam commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

https://issues.redhat.com/browse/OCPBUGS-100143

The compatibility-requirements-controllers Deployment is not deployed on HyperShift (External topology) clusters because the control plane runs externally, causing all CRD Compatibility Checker tests to fail.

Two skip mechanisms cover both execution paths:

  • OTE: a generic Label("skip-topology:<mode>") convention is introduced. specs.Walk() translates it into an exclude selector so the harness drops matching tests before selecting them for execution. The test Describe block carries Label("skip-topology:External").
  • make e2e (standard Ginkgo): a runtime BeforeAll Skip() guards the suite since OTE selectors are not evaluated by the Ginkgo runner.

Summary by CodeRabbit

  • Bug Fixes
    • Prevented CRD compatibility checks from running in external-topology clusters.
    • Improved test selection so topology-incompatible scenarios are automatically excluded based on Ginkgo label hints.
  • Documentation
    • Added guidance for using environment labels (e.g., platform:<name> and skip-topology:<mode>) to control which tests run.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jul 30, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@simkam: This pull request references Jira Issue OCPBUGS-100143, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

https://issues.redhat.com/browse/OCPBUGS-100143

The compatibility-requirements-controllers Deployment is not deployed on HyperShift (External topology) clusters because the control plane runs externally, causing all CRD Compatibility Checker tests to fail.

Two skip mechanisms are added to cover both execution paths:

  • OTE: an EnvironmentSelector exclude CEL expression (topology=="External") is set on all CRDCompatibilityRequirementOperator specs so the harness drops them before they are selected for execution.
  • make e2e (standard Ginkgo): a runtime BeforeAll Skip() guards the suite since OTE environment selectors are not evaluated in the Ginkgo runner.

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.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Walkthrough

CRD compatibility tests now declare and enforce exclusion from external-topology clusters. The test extension translates platform and topology labels into environment selectors, and the README documents these labels and the E2E fallback.

Changes

CRD topology selection

Layer / File(s) Summary
Runtime topology guards
e2e/crd_compatibility.go
The suite adds a skip-topology:External label and skips during setup when the control-plane topology is external.
Extension label selectors
openshift-tests-extension/cmd/main.go, openshift-tests-extension/README.md
The extension includes platform:<name> specs, excludes skip-topology:<name> specs, and documents selector behavior plus the E2E fallback.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: nrb, racheljpg, pmeida

🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Microshift Test Compatibility ⚠️ Warning The CRD Compatibility Checker suite uses config.openshift.io and Deployment/webhook resources, and it lacks any [Skipped:MicroShift]/[apigroup:] guard. Add a MicroShift skip/tag (e.g. [Skipped:MicroShift] or [apigroup:config.openshift.io]) or gate the suite with exutil.IsMicroShiftCluster().
✅ Passed checks (13 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The only Ginkgo titles in the changed test file are static strings; no dynamic pod/node/UUID/date data appears in any test name.
Test Structure And Quality ✅ Passed PASS: The suite already uses BeforeEach/DeferCleanup and bounded Eventually timeouts; this PR only adds skip labels/guards and introduces no new test-quality issues.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The CRD checker suite is topology-aware: it handles SingleReplicaTopology explicitly and has no multi-node-only assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed Changes are limited to test skipping/docs; no manifests/controllers or pod scheduling constraints were added. Topology checks only gate test execution.
Ote Binary Stdout Contract ✅ Passed main() only adds label-based selector filtering; no stdout print/log calls were added in process-level code, and e2e uses Skip only.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new e2e test logic adds IPv4-only parsing or external network calls; the PR only adds topology skips and selector plumbing.
No-Weak-Crypto ✅ Passed PASS: The diff only adds topology skip logic/docs; no weak crypto primitives, custom crypto, or secret/token comparisons appear in touched files.
Container-Privileges ✅ Passed PR only changes Go test selection and docs; no container/K8s manifests or privilege flags (privileged, hostPID, allowPrivilegeEscalation, etc.) were added.
No-Sensitive-Data-In-Logs ✅ Passed No new logging of secrets/PII/internal hosts was added; changes only add topology selectors and a benign skip/panic message.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: skipping CRD Compatibility Checker e2e tests on External topology clusters.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from nrb and racheljpg July 30, 2026 10:46
@openshift-ci

openshift-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mdbooth for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot

Copy link
Copy Markdown

@simkam: This pull request references Jira Issue OCPBUGS-100143, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

https://issues.redhat.com/browse/OCPBUGS-100143

The compatibility-requirements-controllers Deployment is not deployed on HyperShift (External topology) clusters because the control plane runs externally, causing all CRD Compatibility Checker tests to fail.

Two skip mechanisms are added to cover both execution paths:

  • OTE: an EnvironmentSelector exclude CEL expression (topology=="External") is set on all CRDCompatibilityRequirementOperator specs so the harness drops them before they are selected for execution.
  • make e2e (standard Ginkgo): a runtime BeforeAll Skip() guards the suite since OTE environment selectors are not evaluated in the Ginkgo runner.

Summary by CodeRabbit

  • Bug Fixes
  • Prevented CRD compatibility checks from running in external-topology clusters.
  • Improved test selection so incompatible topology scenarios are excluded and clearly labeled as skipped.

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.

@simkam
simkam force-pushed the crdchecker-tests-external-topology branch from 2b7a0ea to 32b0987 Compare July 30, 2026 10:55
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 30, 2026
Comment thread openshift-tests-extension/cmd/main.go Outdated
Comment on lines +84 to +87
specs.Select(et.NameContains("[OCPFeatureGate:CRDCompatibilityRequirementOperator]")).
Exclude(et.TopologyEquals("External")).
AddLabel("[Skipped:ExternalTopology]")

@simkam simkam Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pmeida since you added the platforms label above, can you please check this? Feel free to suggest an alternative approach for handling "Skipped:ExternalTopology". Thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm maybe generic exclude based on

  1. tag in test name
specs.Select(et.NameContains("[Skipped:ExternalTopology]")).
		Exclude(et.TopologyEquals("External"))
  1. or the same based on ginkgo label

@pmeida pmeida Jul 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go with option 2 and extend the existing specs.Walk to handle it. Something like:

specs.Walk(func(spec *et.ExtensionTestSpec) {
    for label := range spec.Labels {
        if platform, ok := strings.CutPrefix(label, "platform:"); ok {
            spec.Include(et.PlatformEquals(platform))
        }
        if topology, ok := strings.CutPrefix(label, "skip-topology:"); ok {
            spec.Exclude(et.TopologyEquals(topology))
            spec.AddLabel(fmt.Sprintf("[Skipped:%sTopology]", topology)) //optional
        }
    }
})

and then add the ginko label in the Describe (e.g Label("skip-topology:External")).

This also allows us to skip other topologies if we need it (e.g. Label("skip-topology:SingleReplica"))

what do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we need to add a label since the base label is already descriptive. I wouldnt.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another thing I would ask is if you could document the labels folks can add to tests and what they do in openshift-tests-extension/README.md

@simkam

simkam commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 30, 2026
… topology clusters

https://issues.redhat.com/browse/OCPBUGS-100143

The compatibility-requirements-controllers Deployment is not deployed on HyperShift (External topology) clusters because the control plane runs externally, causing all CRD Compatibility Checker tests to fail.

Two skip mechanisms cover both execution paths:
- OTE: a generic `Label("skip-topology:<mode>")` convention is introduced. `specs.Walk()` translates it into an exclude selector so the harness drops matching tests before selecting them for execution. The test `Describe` block carries `Label("skip-topology:External")`.
- make e2e (standard Ginkgo): a runtime `BeforeAll Skip()` guards the suite since OTE selectors are not evaluated by the Ginkgo runner.
@simkam
simkam force-pushed the crdchecker-tests-external-topology branch from 32b0987 to 4edd134 Compare July 30, 2026 14:18
@simkam

simkam commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 30, 2026
@simkam

simkam commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-capi-disconnected-techpreview
/test e2e-aws-capi-techpreview
/test e2e-aws-capi-techpreview-post-install
/test e2e-aws-ovn-techpreview
/test e2e-aws-ovn-techpreview-upgrade
/test e2e-azure-capi-techpreview
/test e2e-azure-ovn-techpreview
/test e2e-azure-ovn-techpreview-upgrade
/test e2e-gcp-capi-techpreview
/test e2e-gcp-ovn-techpreview
/test e2e-metal3-capi-techpreview
/test e2e-openstack-capi-techpreview
/test e2e-vsphere-capi-techpreview
/test regression-clusterinfra-aws-ipi-techpreview-capi

@pmeida

pmeida commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

/lgtm

thanks!

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@simkam: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-azure-ovn-techpreview 4edd134 link false /test e2e-azure-ovn-techpreview
ci/prow/regression-clusterinfra-aws-ipi-techpreview-capi 4edd134 link false /test regression-clusterinfra-aws-ipi-techpreview-capi
ci/prow/e2e-gcp-ovn-techpreview 4edd134 link true /test e2e-gcp-ovn-techpreview
ci/prow/e2e-aws-capi-techpreview 4edd134 link true /test e2e-aws-capi-techpreview
ci/prow/e2e-aws-capi-disconnected-techpreview 4edd134 link false /test e2e-aws-capi-disconnected-techpreview

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants