Skip to content

✨Progression Probes for CER - #2550

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
dtfranz:fieldvalue-user-probes
Mar 19, 2026
Merged

✨Progression Probes for CER#2550
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
dtfranz:fieldvalue-user-probes

Conversation

@dtfranz

@dtfranzdtfranz commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Description

Provides an API which allows custom probe definitions to determine readiness of objects in the CER phases. Objects can be selected for in one of two ways: by GroupKind, or by Label (matchLabels and matchExpressions). They can then be tested via any of the following:

  • Condition
    • Checks that the object has a condition matching the type and status provided
  • FieldsEqual
    • Uses two provided field paths and checks for equality.
  • FieldValue
    • Uses a provided field path and checks that the value is equal to the provided expected value.

Also modifies the existing Namespace and PersistentVolumeClaim probes to use the new FieldValue probe.

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

CopilotAI review requested due to automatic review settings March 10, 2026 13:13
@openshift-ciopenshift-ciBot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 10, 2026
@netlify

netlifyBot commented Mar 10, 2026

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commit5b023a2
🔍 Latest deploy loghttps://app.netlify.com/projects/olmv1/deploys/69bb4c8f79f40000083086c5
😎 Deploy Previewhttps://deploy-preview-2550--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

CopilotAI left a comment

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.

Pull request overview

Adds support for user-defined spec.progressionProbes on ClusterExtensionRevision to gate phase progression based on custom assertions against rendered objects, with accompanying CRD/applyconfig updates and new e2e scenarios.

Changes:

  • Extend ClusterExtensionRevisionSpec with progressionProbes API types + deepcopy/applyconfig support.
  • Add CRD schema for progressionProbes to experimental manifests/Helm CRD.
  • Update the controller to build and attach user-defined progression probes to the boxcutter progress probe chain; add e2e scenarios for pass/fail behavior.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
FileDescription
test/e2e/features/revision.featureAdds e2e scenarios covering progression probe pass/fail behavior (currently tagged @WIP).
manifests/experimental.yamlUpdates experimental CRD schema to include spec.progressionProbes.
manifests/experimental-e2e.yamlUpdates e2e experimental CRD schema to include spec.progressionProbes.
internal/operator-controller/controllers/clusterextensionrevision_controller.goBuilds user probes from spec.progressionProbes and adds them to the progress probe chain.
helm/olmv1/base/operator-controller/crd/experimental/olm.operatorframework.io_clusterextensionrevisions.yamlUpdates Helm CRD schema with spec.progressionProbes.
applyconfigurations/utils.goRegisters apply-configuration kinds for the new embedded types.
applyconfigurations/api/v1/progressionprobe.goGenerated apply-configuration for ProgressionProbe.
applyconfigurations/api/v1/probeselector.goGenerated apply-configuration for ProbeSelector.
applyconfigurations/api/v1/probeassertion.goGenerated apply-configuration for ProbeAssertion.
applyconfigurations/api/v1/fieldvalueprobe.goGenerated apply-configuration for FieldValueProbe.
applyconfigurations/api/v1/clusterextensionrevisionspec.goAdds apply-configuration support for spec.progressionProbes.
api/v1/zz_generated.deepcopy.goAdds deepcopy support for the new API structs/fields.
api/v1/clusterextensionrevision_types.goIntroduces the new API types and spec.progressionProbes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadapi/v1/clusterextensionrevision_types.go Outdated
Comment threadtest/e2e/features/revision.feature Outdated
Comment threadtest/e2e/features/revision.feature Outdated
@codecov

codecovBot commented Mar 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 32.03883% with 140 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.87%. Comparing base (6f23a79) to head (5b023a2).
⚠️ Report is 21 commits behind head on main.

Files with missing linesPatch %Lines
api/v1/zz_generated.deepcopy.go25.39%47 Missing ⚠️
applyconfigurations/api/v1/assertion.go0.00%14 Missing ⚠️
applyconfigurations/utils.go0.00%12 Missing ⚠️
applyconfigurations/api/v1/objectselector.go0.00%11 Missing ⚠️
applyconfigurations/api/v1/progressionprobe.go0.00%11 Missing ⚠️
applyconfigurations/api/v1/conditionequalprobe.go0.00%8 Missing ⚠️
applyconfigurations/api/v1/fieldsequalprobe.go0.00%8 Missing ⚠️
applyconfigurations/api/v1/fieldvalueprobe.go0.00%8 Missing ⚠️
internal/operator-controller/applier/phase.go72.41%5 Missing and 3 partials ⚠️
...controllers/clusterextensionrevision_controller.go80.55%6 Missing and 1 partial ⚠️
... and 1 more
Additional details and impacted files
@@ Coverage Diff @@## main #2550 +/- ##
==========================================
- Coverage 68.60% 67.87% -0.73% 
==========================================
Files 131 137 +6 Lines 9330 9526 +196 ==========================================
+ Hits 6401 6466 +65 - Misses 2438 2569 +131 
Partials 491 491 
FlagCoverage Δ
e2e38.14% <0.00%> (-4.11%)⬇️
experimental-e2e51.16% <30.92%> (-0.42%)⬇️
unit52.91% <13.10%> (-0.90%)⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dtfranz
dtfranzforce-pushed the fieldvalue-user-probes branch from 3e0efb5 to c1ddbb3CompareMarch 11, 2026 06:39
@dtfranz
dtfranz marked this pull request as ready for review March 11, 2026 06:41
CopilotAI review requested due to automatic review settings March 11, 2026 06:41
@openshift-ciopenshift-ciBot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 11, 2026
@dtfranz
dtfranzforce-pushed the fieldvalue-user-probes branch from c1ddbb3 to d1436fdCompareMarch 11, 2026 06:45

CopilotAI left a comment

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.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadinternal/operator-controller/applier/phase_test.go
Comment threadtest/e2e/features/revision.feature
Comment threadtest/e2e/features/revision.feature Outdated
Comment threadtest/e2e/features/revision.feature
Comment threadmanifests/experimental.yaml Outdated
Comment threadmanifests/experimental-e2e.yaml Outdated
@dtfranz
dtfranzforce-pushed the fieldvalue-user-probes branch from d1436fd to f905c9eCompareMarch 11, 2026 08:15
CopilotAI review requested due to automatic review settings March 11, 2026 08:52
@dtfranz
dtfranzforce-pushed the fieldvalue-user-probes branch from f905c9e to ca1b6beCompareMarch 11, 2026 08:52

CopilotAI left a comment

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.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadapi/v1/clusterextensionrevision_types.go Outdated
Comment threadapi/v1/clusterextensionrevision_types.go Outdated

@camilamacedo86camilamacedo86 left a comment

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.

That seems great, but would be nice if we can:

a) Address as much as possible the issues reported by kube-lint-api
b) Address the Copilot comments as well. Seems that we have a few ones that are valid.

Could you please look on those?

Comment threadapi/v1/clusterextensionrevision_types.go




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.

Why do we have those spaces ?
Was this doc generated with the tooling used or API?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This is auto-generated, so I don't know why it's adding these spaces...

@dtfranz
dtfranzforce-pushed the fieldvalue-user-probes branch from ca1b6be to a68ec4bCompareMarch 12, 2026 05:47
CopilotAI review requested due to automatic review settings March 12, 2026 06:02
@dtfranz
dtfranzforce-pushed the fieldvalue-user-probes branch from a68ec4b to 100629dCompareMarch 12, 2026 06:02

CopilotAI left a comment

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.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadinternal/operator-controller/applier/phase.go
@dtfranz
dtfranzforce-pushed the fieldvalue-user-probes branch 2 times, most recently from b230589 to d1cb7c5CompareMarch 12, 2026 11:18
@perdasilva

Copy link
Copy Markdown
Contributor

@dtfranz this all looks good to me - I will put a hold on it to give Michael a change to review the doc strings

@perdasilva

Copy link
Copy Markdown
Contributor

/hold until @michaelryanpeter gets a change to review the CRD docs

@openshift-ciopenshift-ciBot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 16, 2026

@pedjakpedjak left a comment

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.

just a small nit that could be addressed before lgtm

Comment threadinternal/operator-controller/applier/phase.go Outdated
@dtfranz
dtfranzforce-pushed the fieldvalue-user-probes branch from 3dbd4af to 61be31aCompareMarch 17, 2026 13:38

@pedjakpedjak left a comment

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.

/lgtm

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label Mar 17, 2026
@openshift-ci

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, pedjak

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [camilamacedo86,pedjak]

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

@michaelryanpetermichaelryanpeter left a comment

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 have a couple of style questions, that probably don't matter. There is only one passage that I found difficult to understand. IDK if my suggestions are accurate, but happy to chat if you have any questions.

Comment threaddocs/api-reference/olmv1-api-reference.md Outdated
| --- | --- | --- | --- |
| `type` _[SelectorType](#selectortype)_ | type is a required field which specifies the type of selector to use.<br />The allowed selector types are "GroupKind" and "Label".<br />When set to "GroupKind", all objects which match the specified group and kind will be selected.<br />When set to "Label", all objects which match the specified labels and/or expressions will be selected.<br /><opcon:experimental> | | Enum: [GroupKind Label] <br />Required: \{\} <br /> |
| `groupKind` _[GroupKind](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#groupkind-v1-meta)_ | groupKind specifies the group and kind of objects to select.<br />Required when type is "GroupKind".<br />Uses the kubernetes format specified here:<br />https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#GroupKind<br /><opcon:experimental> | | Optional: \{\} <br /> |
| `label` _[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#labelselector-v1-meta)_ | label is the label selector definition.<br />Required when type is "Label".<br />A probe using a Label selector will be executed against every object matching the labels or expressions; thus it is<br />important to use care when using this type of selector. For instance, if objects of multiple Kind are selected<br />via labels then the probe is likely to fail when checking for particular fields or Condition types, since multiple<br />object Kinds are not likely to contain the same of each.<br />Uses the kubernetes format specified here:<br />https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#LabelSelector<br />Requires exactly one of matchLabels or matchExpressions.<br /><opcon:experimental> | | Optional: \{\} <br /> |

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.

Suggested change
|`label`_[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#labelselector-v1-meta)_| label is the label selector definition.<br />Required when type is "Label".<br />A probe using a Label selector will be executed against every object matching the labels or expressions; thus it is<br />important to use care when using this type of selector. For instance, if objects of multiple Kind are selected<br />via labels then the probe is likely to fail when checking for particular fields or Condition types, since multiple<br />object Kinds are not likely to contain the same of each.<br />Uses the kubernetes format specified here:<br />https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#LabelSelector<br />Requires exactly one of matchLabels or matchExpressions.<br /><opcon:experimental>|| Optional: \{\} <br /> |
|`label`_[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#labelselector-v1-meta)_| label is the label selector definition.<br />Required when type is "Label".<br />A probe using a Label selector will be executed against every object matching the labels or expressions; <br />you must use care when using this type of selector. For example, if multiple Kind objects are selected<br />via labels then the probe is likely to fail because the values of different Kind objects rarely share the same schema.<br />The LabelSelector field uses the following Kubernetes format:<br />https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#LabelSelector<br />Requires exactly one of matchLabels or matchExpressions.<br /><opcon:experimental>|| Optional: \{\} <br /> |

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 found the previous version hard to understand, though I am not sure if these suggestions changed the meaning to much. Feel free to take what is useful and disregard the rest.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Here's what I was trying to convey - if it makes sense and you can think of some clearer wording I'd appreciate it!

When we select via labels, every object of every kind in the revision has the potential to match.

apiVersion: v1
kind: ServiceAccount
metadata:
labels:
foo: bar
---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
foo: bar
data:
foo: bar

In the above example, if we were to select for objects containing the label foo: bar, we would select both of those objects. Then, if our readiness test were to check that data.foo == bar, the ConfigMap would pass that test, but since the ServiceAccount does not share those fields it would never pass the readiness probe.

If a content creator were to incidentally match with a label shared across multiple object kinds in their bundle, then their content runs the risk of never fully rolling out because of this.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Regardless, I've pushed up your suggestions 👍


| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `type` _[SelectorType](#selectortype)_ | type is a required field which specifies the type of selector to use.<br />The allowed selector types are "GroupKind" and "Label".<br />When set to "GroupKind", all objects which match the specified group and kind will be selected.<br />When set to "Label", all objects which match the specified labels and/or expressions will be selected.<br /><opcon:experimental> | | Enum: [GroupKind Label] <br />Required: \{\} <br /> |

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.

Nit: I am used to always putting specific API object references in backticks, so I would always use type, and Kind, Label, etc.

I know that this might be a downstream thing and differs from the Kubernetes style guide.

However, I don't understand is why the API objects are double quoted in this section and others simply use camelcase. Can you clarify?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

In this particular case, I'm surrounding GroupKind and Label with "" because they are string literals. This was the convention I observed from the other union discriminators we have in, for example, clustercatalog_types.go (see: type CatalogSource). From what I can tell, using backticks around the field names like type is not common, at least not in the godocs - though they do show up inside the generated docs content like you highlighted above:

| `type` _[SelectorType](#selectortype)_ | type is a...

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.

Gotcha. Thanks for clarifying!

@dtfranz
dtfranzforce-pushed the fieldvalue-user-probes branch from 61be31a to 1dc1619CompareMarch 18, 2026 09:02
@openshift-ciopenshift-ciBot removed the lgtm Indicates that a PR is ready to be merged. label Mar 18, 2026
@michaelryanpeter

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label Mar 18, 2026
@perdasilva

Copy link
Copy Markdown
Contributor

/unhold
/lgtm
/override codecov/patch

@openshift-ciopenshift-ciBot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 18, 2026
@openshift-ci

Copy link
Copy Markdown

@perdasilva: Overrode contexts on behalf of perdasilva: codecov/patch

Details

In response to this:

/unhold
/lgtm
/override codecov/patch

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.

@tmshort

Copy link
Copy Markdown
Contributor

What about the lint-api-diff job? @dtfranz@perdasilva

Provides an API which allows custom probe definitions to determine readiness of the CER phases. Objects can be selected for in one of two ways: by GroupKind, or by Label (matchLabels and matchExpressions). They can then be tested via any of: ConditionEqual, FieldsEqual, and FieldValue. ConditionEqual checks that the object has a condition matching the type and status provided. FieldsEqual uses two provided field paths and checks for equality. FieldValue uses a provided field path and checks that the value is equal to the provided expected value.
Signed-off-by: Daniel Franz <dfranz@redhat.com>
CopilotAI review requested due to automatic review settings March 19, 2026 01:08
@dtfranz
dtfranzforce-pushed the fieldvalue-user-probes branch from 1dc1619 to 5b023a2CompareMarch 19, 2026 01:08
@openshift-ciopenshift-ciBot removed the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2026

CopilotAI left a comment

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.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dtfranz

Copy link
Copy Markdown
ContributorAuthor

@tmshort the api-lint-diff is failing due to the nonpointerstructs rule which should be disabled. It's meant to only be run on native APIs, and is not intended for CRDs (ref #1, #2). Because of that I've now disabled it in this PR, so the linter should be passing once again.

@perdasilva

Copy link
Copy Markdown
Contributor

/lgtm
/override codecov/patch

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2026
@openshift-ci

Copy link
Copy Markdown

@perdasilva: Overrode contexts on behalf of perdasilva: codecov/patch

Details

In response to this:

/lgtm
/override codecov/patch

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.

@openshift-merge-bot
openshift-merge-botBot merged commit 15303e1 into operator-framework:mainMar 19, 2026
31 of 32 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by an approver from all required OWNERS files.lgtmIndicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@dtfranz@camilamacedo86@perdasilva@michaelryanpeter@tmshort@pedjak@JoelSpeed