Skip to content

✨Progression Probes for CER#2550

Open
dtfranz wants to merge 1 commit intooperator-framework:mainfrom
dtfranz:fieldvalue-user-probes
Open

✨Progression Probes for CER#2550
dtfranz wants to merge 1 commit intooperator-framework:mainfrom
dtfranz:fieldvalue-user-probes

Conversation

@dtfranz
Copy link
Contributor

@dtfranz dtfranz commented Mar 10, 2026

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)

Copilot AI review requested due to automatic review settings March 10, 2026 13:13
@openshift-ci openshift-ci bot 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
Copy link

netlify bot commented Mar 10, 2026

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 79e203f
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/69b43545e18ee80008dc88e0
😎 Deploy Preview https://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.

Copy link
Contributor

Copilot AI left a comment

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
File Description
test/e2e/features/revision.feature Adds e2e scenarios covering progression probe pass/fail behavior (currently tagged @WIP).
manifests/experimental.yaml Updates experimental CRD schema to include spec.progressionProbes.
manifests/experimental-e2e.yaml Updates e2e experimental CRD schema to include spec.progressionProbes.
internal/operator-controller/controllers/clusterextensionrevision_controller.go Builds user probes from spec.progressionProbes and adds them to the progress probe chain.
helm/olmv1/base/operator-controller/crd/experimental/olm.operatorframework.io_clusterextensionrevisions.yaml Updates Helm CRD schema with spec.progressionProbes.
applyconfigurations/utils.go Registers apply-configuration kinds for the new embedded types.
applyconfigurations/api/v1/progressionprobe.go Generated apply-configuration for ProgressionProbe.
applyconfigurations/api/v1/probeselector.go Generated apply-configuration for ProbeSelector.
applyconfigurations/api/v1/probeassertion.go Generated apply-configuration for ProbeAssertion.
applyconfigurations/api/v1/fieldvalueprobe.go Generated apply-configuration for FieldValueProbe.
applyconfigurations/api/v1/clusterextensionrevisionspec.go Adds apply-configuration support for spec.progressionProbes.
api/v1/zz_generated.deepcopy.go Adds deepcopy support for the new API structs/fields.
api/v1/clusterextensionrevision_types.go Introduces the new API types and spec.progressionProbes.

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

@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 31.55340% with 141 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.80%. Comparing base (6f23a79) to head (79e203f).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
api/v1/zz_generated.deepcopy.go 25.39% 47 Missing ⚠️
applyconfigurations/api/v1/assertion.go 0.00% 14 Missing ⚠️
applyconfigurations/utils.go 0.00% 12 Missing ⚠️
applyconfigurations/api/v1/objectselector.go 0.00% 11 Missing ⚠️
applyconfigurations/api/v1/progressionprobe.go 0.00% 11 Missing ⚠️
internal/operator-controller/applier/phase.go 68.96% 5 Missing and 4 partials ⚠️
applyconfigurations/api/v1/conditionprobe.go 0.00% 8 Missing ⚠️
applyconfigurations/api/v1/fieldsequalprobe.go 0.00% 8 Missing ⚠️
applyconfigurations/api/v1/fieldvalueprobe.go 0.00% 8 Missing ⚠️
...controllers/clusterextensionrevision_controller.go 80.55% 6 Missing and 1 partial ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2550      +/-   ##
==========================================
- Coverage   68.60%   67.80%   -0.81%     
==========================================
  Files         131      137       +6     
  Lines        9330     9526     +196     
==========================================
+ Hits         6401     6459      +58     
- Misses       2438     2572     +134     
- Partials      491      495       +4     
Flag Coverage Δ
e2e 41.28% <0.00%> (-0.97%) ⬇️
experimental-e2e 51.09% <30.92%> (-0.49%) ⬇️
unit 52.89% <12.62%> (-0.92%) ⬇️

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 dtfranz force-pushed the fieldvalue-user-probes branch from 3e0efb5 to c1ddbb3 Compare March 11, 2026 06:39
@dtfranz dtfranz marked this pull request as ready for review March 11, 2026 06:41
Copilot AI review requested due to automatic review settings March 11, 2026 06:41
@openshift-ci openshift-ci bot 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
@openshift-ci openshift-ci bot requested review from joelanford and trgeiger March 11, 2026 06:41
@dtfranz dtfranz force-pushed the fieldvalue-user-probes branch from c1ddbb3 to d1436fd Compare March 11, 2026 06:45
Copy link
Contributor

Copilot AI left a comment

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.

@dtfranz dtfranz force-pushed the fieldvalue-user-probes branch from d1436fd to f905c9e Compare March 11, 2026 08:15
Copilot AI review requested due to automatic review settings March 11, 2026 08:52
@dtfranz dtfranz force-pushed the fieldvalue-user-probes branch from f905c9e to ca1b6be Compare March 11, 2026 08:52
Copy link
Contributor

Copilot AI left a comment

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.

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

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?





Copy link
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
Contributor Author

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 dtfranz force-pushed the fieldvalue-user-probes branch from ca1b6be to a68ec4b Compare March 12, 2026 05:47
@openshift-ci
Copy link

openshift-ci bot commented Mar 12, 2026

[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 ask for approval from camilamacedo86. 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

Copilot AI review requested due to automatic review settings March 12, 2026 06:02
@dtfranz dtfranz force-pushed the fieldvalue-user-probes branch from a68ec4b to 100629d Compare March 12, 2026 06:02
Copy link
Contributor

Copilot AI left a comment

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.

@dtfranz dtfranz force-pushed the fieldvalue-user-probes branch from 100629d to b230589 Compare March 12, 2026 06:33
Copy link
Contributor

Copilot AI left a comment

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.

@dtfranz dtfranz force-pushed the fieldvalue-user-probes branch from d1cb7c5 to c66ea0f Compare March 12, 2026 12:07
@dtfranz
Copy link
Contributor Author

dtfranz commented Mar 13, 2026

@JoelSpeed would you mind taking a look at these API changes? We'd really appreciate it!
In particular, we're curious what we should do, if anything, to resolve these api-lint errors.

Copilot AI review requested due to automatic review settings March 13, 2026 13:10
@dtfranz dtfranz force-pushed the fieldvalue-user-probes branch from c66ea0f to 66b8345 Compare March 13, 2026 13:10
@dtfranz dtfranz force-pushed the fieldvalue-user-probes branch from 66b8345 to b7a4a28 Compare March 13, 2026 13:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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


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

@dtfranz dtfranz force-pushed the fieldvalue-user-probes branch from b7a4a28 to e00edb6 Compare March 13, 2026 13:15
@dtfranz dtfranz requested a review from camilamacedo86 March 13, 2026 13:21
@camilamacedo86 camilamacedo86 dismissed their stale review March 13, 2026 13:43

Hi @dfranz that is amazing

Just one detail, should not all be marked with // opcon:experimental
Is not all experimental ? Beyond that LGTM

Copilot AI review requested due to automatic review settings March 13, 2026 14:17
@dtfranz dtfranz force-pushed the fieldvalue-user-probes branch from e00edb6 to e30eea0 Compare March 13, 2026 14:17
Copy link
Contributor

Copilot AI left a comment

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.

// +optional
// +unionMember
// <opcon:experimental>
GroupKind metav1.GroupKind `json:"groupKind,omitempty,omitzero"`
Copy link
Contributor

Choose a reason for hiding this comment

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

I would use here our own type, not the one from k8s. this protect us from upstream changes that could change our api by upgrading dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do the same with Conditions, TypeMeta, and ObjectMeta. Are any of these likely to get updated? And if they did get changed upstream, couldn't we just recreate the format and preserve the API when we bump the version?

Copy link
Contributor

Choose a reason for hiding this comment

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

With our own types, especially under .spec we have more control. But you can consider this as a nit.

// +optional
// +unionMember
// <opcon:experimental>
Label metav1.LabelSelector `json:"label,omitempty,omitzero"`
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above.

Choose a reason for hiding this comment

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

It's pretty standard to leverage label selector in this way, I suspect we will be ok leverage the metav1 types in this spec

// +listType=atomic
// +optional
// <opcon:experimental>
ProgressionProbes []ProgressionProbe `json:"progressionProbes,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that in the documentation above we speak about readiness probes, why do not we call this field and the corresponding type ReadinessProbes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The probes can be considered readiness probes, but their main purpose is to halt or continue the progression of the phases being rolled out. Calling the entire thing ReadinessProbes to me sounds like we're only setting rules to set the whole revision as Ready.

Copy link
Contributor

Choose a reason for hiding this comment

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

Alright, but then we should carefully document it what it does and what are the implications on the rollout.

// +kubebuilder:validation:Enum=Condition;FieldsEqual;FieldValue
// +required
// <opcon:experimental>
ProbeType ProbeType `json:"type,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

can we call it just Type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have several union discriminators set across our API, they should all have unique names to distinguish which discriminator the type is being used for.

Copy link
Contributor

Choose a reason for hiding this comment

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

We have several union discriminators set across our API, they should all have unique names to distinguish which discriminator the type is being used for.

I am not sure if understand: we serialize this into JSON/Yaml as type, why we cannot refer it go code as Assertion.Type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I see what you mean; I thought you meant the type name, not the field name. Yes we can just name it that 👍

// +unionMember
// +optional
// <opcon:experimental>
Condition ConditionProbe `json:"condition,omitempty,omitzero"`
Copy link
Contributor

Choose a reason for hiding this comment

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

do we really need both omitempty and omitzero?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We agreed to add this in our sync yesterday; do you think it's unnecessary?

Copy link
Contributor

Choose a reason for hiding this comment

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

We agreed to add this in our sync yesterday; do you think it's unnecessary?

I thought just one them solves our problems?

// +unionMember
// +optional
// <opcon:experimental>
Condition ConditionProbe `json:"condition,omitempty,omitzero"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we not call it ConditionEqual actually?

// +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9]+(?:\\\\.[a-zA-Z0-9]+)*$')",message="must contain a valid field path. valid fields contain upper or lower-case alphanumeric characters separated by the \".\" character."
// +required
// <opcon:experimental>
FieldA string `json:"fieldA,omitempty,omitzero"`
Copy link
Contributor

Choose a reason for hiding this comment

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

could we call it firstField (or leftField) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm happy with fieldA==fieldB personally, do you feel strongly that it should be different?
I like that they get written symmetrically this way, but that's getting kind of nit-picky 🤷 i.e.
fieldA: foo
fieldB: bar

//
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=200
// +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9]+(?:\\\\.[a-zA-Z0-9]+)*$')",message="must contain a valid field path. valid fields contain upper or lower-case alphanumeric characters separated by the \".\" character."
Copy link
Contributor

Choose a reason for hiding this comment

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

do we support also locating fields in an array? do we support json paths?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The boxcutter probes are pretty primitive and don't support that at the moment, so I've excluded [] in the regex.

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: Condition, FieldsEqual, and FieldValue. 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.

Signed-off-by: Daniel Franz <dfranz@redhat.com>
@dtfranz dtfranz force-pushed the fieldvalue-user-probes branch from e30eea0 to 79e203f Compare March 13, 2026 16:03
@camilamacedo86
Copy link
Contributor

/override api-diff-lint
/override codecov/patch

@openshift-ci
Copy link

openshift-ci bot commented Mar 13, 2026

@camilamacedo86: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • api-diff-lint

Only the following failed contexts/checkruns were expected:

  • Verify PR title
  • codecov/patch
  • crd-diff
  • e2e
  • experimental-e2e
  • extension-developer-e2e
  • go-apidiff
  • go-verdiff
  • goreleaser
  • lint
  • lint-api-diff
  • netlify/olmv1/deploy-preview
  • st2ex-e2e
  • tide
  • unit-test-basic
  • upgrade-st2st-e2e
  • verify

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

Details

In response to this:

/override api-diff-lint
/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.

@camilamacedo86
Copy link
Contributor

/override api-diff-lint/api-diff-lint

@openshift-ci
Copy link

openshift-ci bot commented Mar 13, 2026

@camilamacedo86: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • api-diff-lint/api-diff-lint

Only the following failed contexts/checkruns were expected:

  • Verify PR title
  • codecov/patch
  • crd-diff
  • e2e
  • experimental-e2e
  • extension-developer-e2e
  • go-apidiff
  • go-verdiff
  • goreleaser
  • lint
  • lint-api-diff
  • netlify/olmv1/deploy-preview
  • st2ex-e2e
  • tide
  • unit-test-basic
  • upgrade-st2st-e2e
  • verify

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

Details

In response to this:

/override api-diff-lint/api-diff-lint

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.

@camilamacedo86
Copy link
Contributor

/override codecov/patch

@openshift-ci
Copy link

openshift-ci bot commented Mar 13, 2026

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

Details

In response to this:

/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.

@camilamacedo86
Copy link
Contributor

/override lint-api-diff

@openshift-ci
Copy link

openshift-ci bot commented Mar 13, 2026

@camilamacedo86: Overrode contexts on behalf of camilamacedo86: lint-api-diff

Details

In response to this:

/override lint-api-diff

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.

@camilamacedo86
Copy link
Contributor

Hi @dtfranz

We have the checks overrides.
I am ok with
/approved

But we need LGTM from @pedjak and @perdasilva in this one.

Comment on lines +200 to +201
// +kubebuilder:validation:MinProperties=1
// +kubebuilder:validation:MaxProperties=1

Choose a reason for hiding this comment

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

These don't appear to have made it to the generated CRD schema?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catcher +1

// +optional
// +unionMember
// <opcon:experimental>
Label metav1.LabelSelector `json:"label,omitempty,omitzero"`

Choose a reason for hiding this comment

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

It's pretty standard to leverage label selector in this way, I suspect we will be ok leverage the metav1 types in this spec

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants