Skip to content

Add AtLatestKnown condition #1517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hjensas
Copy link
Contributor

@hjensas hjensas commented Jun 28, 2025

Add a condition to indicate if we are AtLatestKnown version.
Condition is set to True if AvailableVersion == DeployedVersion, otherwize not set.

With this change we can do: wait --for condition=MinorUpdateAvailable, then patch the targetVersion and wait for: wait --for condition=AtLatestKnown.

It is a nuance, but I think this can be useful for automation using oc wait.

@openshift-ci openshift-ci bot requested review from rabi and stuggi June 28, 2025 13:21
Copy link
Contributor

openshift-ci bot commented Jun 28, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

corev1beta1.OpenStackVersionMinorUpdateAvailable,
corev1beta1.OpenStackVersionMinorUpdateAvailableMessage))
} else {
instance.Status.Conditions.Set(condition.FalseCondition(
Copy link
Contributor

Choose a reason for hiding this comment

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

with this change, the openstackversion won't reach the ready state if there is no update available because it would be always false if there is no update. The ready state can only reached when all sub conditions are true. Or am I miss-read it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh no, you are right @stuggi - I pushed another version with a test to check the Ready condition - it should fail functional test with that ... and I'll move this to work in progress.

  conditions:
  - lastTransitionTime: "2025-06-29T14:07:57Z"
    message: at latest known
    reason: AtLatestKnown
    severity: Info
    status: "False"
    type: Ready
  - lastTransitionTime: "2025-06-29T14:02:40Z"
    message: completed
    reason: Ready
    status: "True"
    type: Initialized
  - lastTransitionTime: "2025-06-29T14:07:57Z"
    message: at latest known
    reason: AtLatestKnown
    severity: Info
    status: "False"
    type: MinorUpdateAvailable

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 think it would be helpful to have something "boolean"'ish to check, that won't return an error if I used oc wait.

Proposing a new version with an AtLatestKnown condition.

An alternative would be a status field, similar to the state field in Subscription which is set to UpgradePending or AtLatestKnown.

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/22bd08115bd6431cb99394cc02e1d25d

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 45m 44s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 11m 02s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 23m 19s
adoption-standalone-to-crc-ceph-provider RETRY_LIMIT in 36m 23s
✔️ openstack-operator-tempest-multinode SUCCESS in 1h 23m 42s

Add a condition to indicate if we are AtLatestKnown version.
Condition is set to `True` if `AvailableVersion` == `DeployedVersion`,
otherwize not set.

With this change we can do: `wait --for condition=MinorUpdateAvailable`,
then patch the targetVersion and wait for: `wait --for condition=AtLatestKnown`.

It is a nuance, but I think this can be useful for automation using oc wait.
@hjensas hjensas force-pushed the minor-version-condition branch from 0b14ebd to d17be01 Compare June 29, 2025 17:58
@hjensas hjensas changed the title Do not rm MinorUpdateAvailable condition Add AtLatestKnown condition Jun 29, 2025
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/51330f04251b488e96a2def653ca6623

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 44m 15s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 09m 49s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 23m 30s
adoption-standalone-to-crc-ceph-provider RETRY_LIMIT in 35m 56s
✔️ openstack-operator-tempest-multinode SUCCESS in 1h 28m 29s

@hjensas
Copy link
Contributor Author

hjensas commented Jun 29, 2025

/test openstack-operator-build-deploy-kuttl-4-18

@hjensas
Copy link
Contributor Author

hjensas commented Jun 30, 2025

recheck

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/71450504151442819a3f0f867d993f81

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 40m 50s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 10m 31s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 24m 59s
adoption-standalone-to-crc-ceph-provider RETRY_LIMIT in 37m 09s
✔️ openstack-operator-tempest-multinode SUCCESS in 1h 24m 01s

@stuggi stuggi requested a review from dprince August 5, 2025 11:10
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.

2 participants