Skip to content

OTA-1959: oc adm upgrade recommend works with accepted risks - #2370

Open
hongkailiu wants to merge 1 commit into
openshift:mainfrom
hongkailiu:OTA-1959-case2
Open

OTA-1959: oc adm upgrade recommend works with accepted risks#2370
hongkailiu wants to merge 1 commit into
openshift:mainfrom
hongkailiu:OTA-1959-case2

Conversation

@hongkailiu

@hongkailiu hongkailiu commented Aug 11, 2026

Copy link
Copy Markdown
Member

This pull replaces #2355

/assign @nbottari9

launch 5.0.0-ec.2 gcp,techpreview

$ TOKEN="$(oc -n openshift-cluster-version exec deployment/cluster-version-operator -- cat /var/run/secrets/kubernetes.io/serviceaccount/token)"
$ TESTCASE="5.0.0-includes-graph-and-alert-risks-accept"
$ OC_ENABLE_CMD_INSPECT_ALERTS=true oc --token "${TOKEN}" adm inspect-alerts | jq > ${TESTCASE}-alerts.json
$ get infrastructure cluster -o yaml > ${TESTCASE}-infrastructure.yaml
$ oc get featuregate cluster -o yaml > ${TESTCASE}--featuregate.yaml
$ oc get clusterversion version -o yaml > ${TESTCASE}-cv.yaml

The yaml and json input files above are taken after OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,SyntheticRiskB in the following testing which fits more into an e2e test case. We can come back to it if needed in the future.

To keep the sanity of the repo, we do not push all of the snapshots into the folder. Instead, one of them is taken to show the (likely) most interesting case: some risks are accepted while some not.

$ oc patch clusterversion/version --patch '{"spec":{"upstream":"https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph"}}' --type=merge

$ oc adm upgrade channel risks-always

$ oc apply -f /tmp/alert.yaml
prometheusrule.monitoring.coreos.com/test-update-alert created
$ cat /tmp/alert.yaml
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  name: test-update-alert
  namespace: openshift-monitoring
spec:
  groups:
  - name: testA
    rules:
    - alert: TestAlertA
      expr: vector(1)
      labels:
        severity: warning
        openShiftUpdatePrecheck: "true"
      annotations:
        summary: "Test alert aaa for updates"
        description: "Test alert aaa for updates"
  - name: testB
    rules:
    - alert: TestAlertB
      expr: vector(1)
      labels:
        severity: warning
        openShiftUpdatePrecheck: "true"
      annotations:
        summary: "Test alert bbb for updates"
        description: "Test alert bbb for updates"

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Reason: MultipleReasons
Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  This is a synthetic risk B that always applies for testing purposes https://docs.openshift.com/synthetic-risk-b

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

  Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskB,TestAlertA,TestAlertB

$ ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

  Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskC,TestAlertA,TestAlertB

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

  Version: 5.1.0
  Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
  Reason: MultipleReasons
  Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

  Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

Updates to 5.0:

  Version: 5.0.0-ec.5
  Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
  Reason: MultipleReasons
  Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  This is a synthetic risk B that always applies for testing purposes https://docs.openshift.com/synthetic-risk-b

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

  Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,SyntheticRiskB
info: Accept risks are [SyntheticRiskB, TestAlertB]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

  Version: 5.1.0
  Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
  Reason: MultipleReasons
  Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

Updates to 5.0:

  Version: 5.0.0-ec.5
  Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
  Reason: MultipleReasons
  Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Reason: MultipleReasons
Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,TestAlertA

$ ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskC,TestAlertA

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,TestAlertA,SyntheticRiskB,SyntheticRiskA
info: Accept risks are [SyntheticRiskB, TestAlertB, SyntheticRiskA, TestAlertA]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

  Version: 5.1.0
  Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
  Reason: MultipleReasons
  Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

Updates to 5.0:
  VERSION     ISSUES
  5.0.0-ec.5  no known issues relevant to this cluster

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 has no known issues relevant to this cluster.
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Update to 5.0.0-ec.5 has no known issues relevant to this cluster other than the accepted SyntheticRiskA,SyntheticRiskB,TestAlertA,TestAlertB.

$ ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskC

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,TestAlertA,SyntheticRiskB,SyntheticRiskA,SyntheticRiskC
info: Accept risks are [SyntheticRiskB, TestAlertB, SyntheticRiskA, TestAlertA, SyntheticRiskC]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

  Version: 5.1.0
  Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
  Reason: MultipleReasons
  Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

Updates to 5.0:
  VERSION     ISSUES
  5.0.0-ec.5  no known issues relevant to this cluster

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 has no known issues relevant to this cluster.
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Update to 5.0.0-ec.5 has no known issues relevant to this cluster other than the accepted SyntheticRiskA,SyntheticRiskB,TestAlertA,TestAlertB.oc git:(o-main) ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates
Update to 5.1.0 has no known issues relevant to this cluster other than the accepted SyntheticRiskA,SyntheticRiskC,TestAlertA,TestAlertB.

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB-,SyntheticRiskB-
info: Accept risks are [SyntheticRiskA, TestAlertA, SyntheticRiskC]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

  Version: 5.1.0
  Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
  Reason: MultipleReasons
  Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

Updates to 5.0:

  Version: 5.0.0-ec.5
  Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
  Reason: MultipleReasons
  Message: This is a synthetic risk B that always applies for testing purposes https://docs.openshift.com/synthetic-risk-b

  Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept --clear
info: Accept risks are []

Summary by CodeRabbit

  • Tests
    • Added coverage for upgrade recommendations involving graph risks, alert risks, synthetic risks, and accepted risk conditions.
    • Added expected outputs for recommended and blocked upgrades, outdated releases, and risk acceptance errors.
    • Added a specific-version example targeting release 5.0.0-ec.5.

> launch 5.0.0-ec.2 gcp,techpreview

```console
$ TOKEN="$(oc -n openshift-cluster-version exec deployment/cluster-version-operator -- cat /var/run/secrets/kubernetes.io/serviceaccount/token)"
$ TESTCASE="5.0.0-includes-graph-and-alert-risks-accept"
$ OC_ENABLE_CMD_INSPECT_ALERTS=true oc --token "${TOKEN}" adm inspect-alerts | jq > ${TESTCASE}-alerts.json
$ get infrastructure cluster -o yaml > ${TESTCASE}-infrastructure.yaml
$ oc get featuregate cluster -o yaml > ${TESTCASE}--featuregate.yaml
$ oc get clusterversion version -o yaml > ${TESTCASE}-cv.yaml
```

The `yaml` and `json` input files above are taken after `OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,SyntheticRiskB` in the following testing which fits more into an e2e test case. We can come back to it if needed in the future.

```console
$ oc patch clusterversion/version --patch '{"spec":{"upstream":"https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph"}}' --type=merge

$ oc adm upgrade channel risks-always

$ oc apply -f /tmp/alert.yaml
prometheusrule.monitoring.coreos.com/test-update-alert created
$ cat /tmp/alert.yaml
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  name: test-update-alert
  namespace: openshift-monitoring
spec:
  groups:
  - name: testA
    rules:
    - alert: TestAlertA
      expr: vector(1)
      labels:
        severity: warning
        openShiftUpdatePrecheck: "true"
      annotations:
        summary: "Test alert aaa for updates"
        description: "Test alert aaa for updates"
  - name: testB
    rules:
    - alert: TestAlertB
      expr: vector(1)
      labels:
        severity: warning
        openShiftUpdatePrecheck: "true"
      annotations:
        summary: "Test alert bbb for updates"
        description: "Test alert bbb for updates"

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Reason: MultipleReasons
Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  This is a synthetic risk B that always applies for testing purposes https://docs.openshift.com/synthetic-risk-b

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

  Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskB,TestAlertA,TestAlertB

$ ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

  Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskC,TestAlertA,TestAlertB

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

  Version: 5.1.0
  Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
  Reason: MultipleReasons
  Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

  Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

Updates to 5.0:

  Version: 5.0.0-ec.5
  Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
  Reason: MultipleReasons
  Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  This is a synthetic risk B that always applies for testing purposes https://docs.openshift.com/synthetic-risk-b

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

  Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,SyntheticRiskB
info: Accept risks are [SyntheticRiskB, TestAlertB]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

  Version: 5.1.0
  Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
  Reason: MultipleReasons
  Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

Updates to 5.0:

  Version: 5.0.0-ec.5
  Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
  Reason: MultipleReasons
  Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Reason: MultipleReasons
Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,TestAlertA

$ ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

  This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

  Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskC,TestAlertA

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,TestAlertA,SyntheticRiskB,SyntheticRiskA
info: Accept risks are [SyntheticRiskB, TestAlertB, SyntheticRiskA, TestAlertA]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

  Version: 5.1.0
  Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
  Reason: MultipleReasons
  Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

Updates to 5.0:
  VERSION     ISSUES
  5.0.0-ec.5  no known issues relevant to this cluster

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 has no known issues relevant to this cluster.
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Update to 5.0.0-ec.5 has no known issues relevant to this cluster other than the accepted SyntheticRiskA,SyntheticRiskB,TestAlertA,TestAlertB.

$ ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskC

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,TestAlertA,SyntheticRiskB,SyntheticRiskA,SyntheticRiskC
info: Accept risks are [SyntheticRiskB, TestAlertB, SyntheticRiskA, TestAlertA, SyntheticRiskC]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

  Version: 5.1.0
  Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
  Reason: MultipleReasons
  Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

Updates to 5.0:
  VERSION     ISSUES
  5.0.0-ec.5  no known issues relevant to this cluster

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 has no known issues relevant to this cluster.
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Update to 5.0.0-ec.5 has no known issues relevant to this cluster other than the accepted SyntheticRiskA,SyntheticRiskB,TestAlertA,TestAlertB.
➜  oc git:(o-main) ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates
Update to 5.1.0 has no known issues relevant to this cluster other than the accepted SyntheticRiskA,SyntheticRiskC,TestAlertA,TestAlertB.

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB-,SyntheticRiskB-
info: Accept risks are [SyntheticRiskA, TestAlertA, SyntheticRiskC]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

  Version: 5.1.0
  Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
  Reason: MultipleReasons
  Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
  * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
  * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

  Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

Updates to 5.0:

  Version: 5.0.0-ec.5
  Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
  Reason: MultipleReasons
  Message: This is a synthetic risk B that always applies for testing purposes https://docs.openshift.com/synthetic-risk-b

  Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept --clear
info: Accept risks are []
```
@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 the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 11, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 11, 2026

Copy link
Copy Markdown

@hongkailiu: This pull request references OTA-1959 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

This pull replaces #2355

/assign @nbottari9

launch 5.0.0-ec.2 gcp,techpreview

$ TOKEN="$(oc -n openshift-cluster-version exec deployment/cluster-version-operator -- cat /var/run/secrets/kubernetes.io/serviceaccount/token)"
$ TESTCASE="5.0.0-includes-graph-and-alert-risks-accept"
$ OC_ENABLE_CMD_INSPECT_ALERTS=true oc --token "${TOKEN}" adm inspect-alerts | jq > ${TESTCASE}-alerts.json
$ get infrastructure cluster -o yaml > ${TESTCASE}-infrastructure.yaml
$ oc get featuregate cluster -o yaml > ${TESTCASE}--featuregate.yaml
$ oc get clusterversion version -o yaml > ${TESTCASE}-cv.yaml

The yaml and json input files above are taken after OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,SyntheticRiskB in the following testing which fits more into an e2e test case. We can come back to it if needed in the future.

To keep the sanity of the repo, we do not push all of the snapshots into the folder. Instead, one of them is taken to show the (likely) most interesting case: some risks are accepted while some not.

$ oc patch clusterversion/version --patch '{"spec":{"upstream":"https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph"}}' --type=merge

$ oc adm upgrade channel risks-always

$ oc apply -f /tmp/alert.yaml
prometheusrule.monitoring.coreos.com/test-update-alert created
$ cat /tmp/alert.yaml
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
 name: test-update-alert
 namespace: openshift-monitoring
spec:
 groups:
 - name: testA
   rules:
   - alert: TestAlertA
     expr: vector(1)
     labels:
       severity: warning
       openShiftUpdatePrecheck: "true"
     annotations:
       summary: "Test alert aaa for updates"
       description: "Test alert aaa for updates"
 - name: testB
   rules:
   - alert: TestAlertB
     expr: vector(1)
     labels:
       severity: warning
       openShiftUpdatePrecheck: "true"
     annotations:
       summary: "Test alert bbb for updates"
       description: "Test alert bbb for updates"

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Reason: MultipleReasons
Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 This is a synthetic risk B that always applies for testing purposes https://docs.openshift.com/synthetic-risk-b

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

 Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskB,TestAlertA,TestAlertB

$ ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

 Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskC,TestAlertA,TestAlertB

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

 Version: 5.1.0
 Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
 Reason: MultipleReasons
 Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

 Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

Updates to 5.0:

 Version: 5.0.0-ec.5
 Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
 Reason: MultipleReasons
 Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 This is a synthetic risk B that always applies for testing purposes https://docs.openshift.com/synthetic-risk-b

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

 Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,SyntheticRiskB
info: Accept risks are [SyntheticRiskB, TestAlertB]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

 Version: 5.1.0
 Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
 Reason: MultipleReasons
 Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

Updates to 5.0:

 Version: 5.0.0-ec.5
 Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
 Reason: MultipleReasons
 Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Reason: MultipleReasons
Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,TestAlertA

$ ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskC,TestAlertA

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,TestAlertA,SyntheticRiskB,SyntheticRiskA
info: Accept risks are [SyntheticRiskB, TestAlertB, SyntheticRiskA, TestAlertA]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

 Version: 5.1.0
 Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
 Reason: MultipleReasons
 Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

Updates to 5.0:
 VERSION     ISSUES
 5.0.0-ec.5  no known issues relevant to this cluster

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 has no known issues relevant to this cluster.
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Update to 5.0.0-ec.5 has no known issues relevant to this cluster other than the accepted SyntheticRiskA,SyntheticRiskB,TestAlertA,TestAlertB.

$ ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskC

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,TestAlertA,SyntheticRiskB,SyntheticRiskA,SyntheticRiskC
info: Accept risks are [SyntheticRiskB, TestAlertB, SyntheticRiskA, TestAlertA, SyntheticRiskC]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

 Version: 5.1.0
 Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
 Reason: MultipleReasons
 Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

Updates to 5.0:
 VERSION     ISSUES
 5.0.0-ec.5  no known issues relevant to this cluster

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 has no known issues relevant to this cluster.
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Update to 5.0.0-ec.5 has no known issues relevant to this cluster other than the accepted SyntheticRiskA,SyntheticRiskB,TestAlertA,TestAlertB.oc git:(o-main) ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates
Update to 5.1.0 has no known issues relevant to this cluster other than the accepted SyntheticRiskA,SyntheticRiskC,TestAlertA,TestAlertB.

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB-,SyntheticRiskB-
info: Accept risks are [SyntheticRiskA, TestAlertA, SyntheticRiskC]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

 Version: 5.1.0
 Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
 Reason: MultipleReasons
 Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

Updates to 5.0:

 Version: 5.0.0-ec.5
 Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
 Reason: MultipleReasons
 Message: This is a synthetic risk B that always applies for testing purposes https://docs.openshift.com/synthetic-risk-b

 Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept --clear
info: Accept risks are []

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 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@hongkailiu: GitHub didn't allow me to assign the following users: nbottari9.

Note that only openshift members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

Details

In response to this:

This pull replaces #2355

/assign @nbottari9

launch 5.0.0-ec.2 gcp,techpreview

$ TOKEN="$(oc -n openshift-cluster-version exec deployment/cluster-version-operator -- cat /var/run/secrets/kubernetes.io/serviceaccount/token)"
$ TESTCASE="5.0.0-includes-graph-and-alert-risks-accept"
$ OC_ENABLE_CMD_INSPECT_ALERTS=true oc --token "${TOKEN}" adm inspect-alerts | jq > ${TESTCASE}-alerts.json
$ get infrastructure cluster -o yaml > ${TESTCASE}-infrastructure.yaml
$ oc get featuregate cluster -o yaml > ${TESTCASE}--featuregate.yaml
$ oc get clusterversion version -o yaml > ${TESTCASE}-cv.yaml

The yaml and json input files above are taken after OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,SyntheticRiskB in the following testing which fits more into an e2e test case. We can come back to it if needed in the future.

To keep the sanity of the repo, we do not push all of the snapshots into the folder. Instead, one of them is taken to show the (likely) most interesting case: some risks are accepted while some not.

$ oc patch clusterversion/version --patch '{"spec":{"upstream":"https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph"}}' --type=merge

$ oc adm upgrade channel risks-always

$ oc apply -f /tmp/alert.yaml
prometheusrule.monitoring.coreos.com/test-update-alert created
$ cat /tmp/alert.yaml
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
 name: test-update-alert
 namespace: openshift-monitoring
spec:
 groups:
 - name: testA
   rules:
   - alert: TestAlertA
     expr: vector(1)
     labels:
       severity: warning
       openShiftUpdatePrecheck: "true"
     annotations:
       summary: "Test alert aaa for updates"
       description: "Test alert aaa for updates"
 - name: testB
   rules:
   - alert: TestAlertB
     expr: vector(1)
     labels:
       severity: warning
       openShiftUpdatePrecheck: "true"
     annotations:
       summary: "Test alert bbb for updates"
       description: "Test alert bbb for updates"

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Reason: MultipleReasons
Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 This is a synthetic risk B that always applies for testing purposes https://docs.openshift.com/synthetic-risk-b

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

 Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskB,TestAlertA,TestAlertB

$ ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

 Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskC,TestAlertA,TestAlertB

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

 Version: 5.1.0
 Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
 Reason: MultipleReasons
 Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

 Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

Updates to 5.0:

 Version: 5.0.0-ec.5
 Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
 Reason: MultipleReasons
 Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 This is a synthetic risk B that always applies for testing purposes https://docs.openshift.com/synthetic-risk-b

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

 Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,SyntheticRiskB
info: Accept risks are [SyntheticRiskB, TestAlertB]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

 Version: 5.1.0
 Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
 Reason: MultipleReasons
 Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

Updates to 5.0:

 Version: 5.0.0-ec.5
 Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
 Reason: MultipleReasons
 Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Reason: MultipleReasons
Message: This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,TestAlertA

$ ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 This is a synthetic risk A that always applies for testing purposes https://docs.openshift.com/synthetic-risk-a

 This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

 Test alert aaa for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskC,TestAlertA

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,TestAlertA,SyntheticRiskB,SyntheticRiskA
info: Accept risks are [SyntheticRiskB, TestAlertB, SyntheticRiskA, TestAlertA]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

 Version: 5.1.0
 Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
 Reason: MultipleReasons
 Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c

Updates to 5.0:
 VERSION     ISSUES
 5.0.0-ec.5  no known issues relevant to this cluster

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 has no known issues relevant to this cluster.
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Update to 5.0.0-ec.5 has no known issues relevant to this cluster other than the accepted SyntheticRiskA,SyntheticRiskB,TestAlertA,TestAlertB.

$ ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 This is a synthetic risk C that always applies for testing purposes https://docs.openshift.com/synthetic-risk-c
error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskC

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB,TestAlertA,SyntheticRiskB,SyntheticRiskA,SyntheticRiskC
info: Accept risks are [SyntheticRiskB, TestAlertB, SyntheticRiskA, TestAlertA, SyntheticRiskC]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

 Version: 5.1.0
 Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
 Reason: MultipleReasons
 Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

Updates to 5.0:
 VERSION     ISSUES
 5.0.0-ec.5  no known issues relevant to this cluster

$ ./oc adm upgrade recommend --version 5.0.0-ec.5
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.0.0-ec.5 has no known issues relevant to this cluster.
Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
Release URL: https://access.redhat.com/errata/RHSA-2024:05000
Update to 5.0.0-ec.5 has no known issues relevant to this cluster other than the accepted SyntheticRiskA,SyntheticRiskB,TestAlertA,TestAlertB.oc git:(o-main) ./oc adm upgrade recommend --version 5.1.0
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Update to 5.1.0 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
Release URL: https://access.redhat.com/errata/RHSA-2024:05100
Reason: MultipleReasons
Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates
Update to 5.1.0 has no known issues relevant to this cluster other than the accepted SyntheticRiskA,SyntheticRiskC,TestAlertA,TestAlertB.

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept TestAlertB-,SyntheticRiskB-
info: Accept risks are [SyntheticRiskA, TestAlertA, SyntheticRiskC]

$ ./oc adm upgrade recommend
Upstream update service: https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/api/upgrades_info/graph
Channel: risks-always (available channels: channel-head, risks-always, risks-matching, risks-nonmatching, simple, smoke-test)

Updates to 5.1:

 Version: 5.1.0
 Image: quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000004c4f28
 Reason: MultipleReasons
 Message: Cluster should not be upgraded between minor or major versions for multiple reasons: ClusterVersionOverridesSet,FeatureGates_RestrictedFeatureGates_TechPreviewNoUpgrade
 * Disabling ownership via cluster version overrides prevents upgrades between minor or major versions. Please remove overrides before requesting a minor or major version update.
 * Cluster operator config-operator should not be upgraded between minor or major versions: FeatureGatesUpgradeable: "TechPreviewNoUpgrade" does not allow updates

 Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

Updates to 5.0:

 Version: 5.0.0-ec.5
 Image: quay.io/openshift-release-dev/ocp-release@sha256:cc0eae9544d40aadbac7e0ce1a9beb23056faf5e022620a03eaf50a41b118e61
 Reason: MultipleReasons
 Message: This is a synthetic risk B that always applies for testing purposes https://docs.openshift.com/synthetic-risk-b

 Test alert bbb for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound

$ OC_ENABLE_CMD_UPGRADE_ACCEPT_RISKS=true ./oc adm upgrade accept --clear
info: Accept risks are []

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-ci
openshift-ci Bot requested review from atiratree and tchap August 11, 2026 19:35
@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hongkailiu

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:

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: debc6870-a7e6-4ef2-bc64-8c929c2e7a83

📥 Commits

Reviewing files that changed from the base of the PR and between 77a4a5a and 5938e4f.

📒 Files selected for processing (8)
  • pkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-accept-alerts.json
  • pkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-accept-cv.yaml
  • pkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-accept-featuregate.yaml
  • pkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-accept-infrastructure.yaml
  • pkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-accept.output
  • pkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-accept.show-outdated-releases-output
  • pkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-accept.version-5.0.0-ec.5-output
  • pkg/cli/admin/upgrade/recommend/examples_test.go

Walkthrough

Adds fixtures for an upgrade recommendation scenario with graph risks, firing alerts, accepted risks, cluster state, expected command output, and specific-version test registration.

Changes

Upgrade risk fixture scenario

Layer / File(s) Summary
Cluster and alert inputs
pkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-accept-*.yaml, pkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-accept-alerts.json
Adds FeatureGate and Infrastructure resources plus 12 firing alert records for upgrade and monitoring risk scenarios.
ClusterVersion risk state
pkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-accept-cv.yaml
Adds the risks-always channel, accepted risks, cluster capabilities, conditional risks, blocked updates, status conditions, and upgrade history.
Recommendation outputs and test registration
pkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-accept*output, pkg/cli/admin/upgrade/recommend/examples_test.go
Adds expected recommendation and acceptance outputs, outdated-release output, and a specific-version fixture mapping for 5.0.0-ec.5.

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

🚥 Pre-merge checks | ✅ 4 | ❌ 11

❌ Failed checks (1 warning, 10 inconclusive)

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.
Stable And Deterministic Test Names ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Test Structure And Quality ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Microshift Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Single Node Openshift (Sno) Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Topology-Aware Scheduling Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ote Binary Stdout Contract ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ipv6 And Disconnected Network Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Weak-Crypto ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Container-Privileges ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Sensitive-Data-In-Logs ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: verifying that oc adm upgrade recommend works with accepted upgrade risks.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Tools execution failed with the following error:

Failed to run tools: 14 UNAVAILABLE: read ECONNRESET


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

@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@hongkailiu: all tests passed!

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

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants