Commit 9b7b338
committed
pkg/internal/constants: Deprecate Upgradeable* subcondition constants
We only use these in RemoveOperatorStatusCondition calls since
ea13ba6 (pkg: Use risk.Source framework to feed Upgradeable,
2026-04-05, #1368). Mark them as deprecated with expected removals in
the 5.1 dev cycle, to reduce the odds that other folks start consuming
them now. That's unlikely, because they're in pkg/internal, but it's
easy to add the standard deprecation Godocs [1].
The nolint directives avoid [2]:
pkg/cvo/status.go:641:68: SA1019: internal.UpgradeableAdminAckRequired is deprecated: In 5.0, we stopped populating Upgradeable* subconditions, and now populate Upgradeable directly. The constants remain so we can remove them from 5.0 ClusterVersion status, but we will remove the constants themselves in 5.1. (staticcheck)
resourcemerge.RemoveOperatorStatusCondition(&cvStatus.Conditions, internal.UpgradeableAdminAckRequired)
^
and similar.
[1]: https://go.dev/wiki/Deprecated
[2]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1391/pull-ci-openshift-cluster-version-operator-main-lint/2056884282562973696#1:build-log.txt%3A281 parent 7764ea6 commit 9b7b338
2 files changed
Lines changed: 20 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
79 | 88 | | |
80 | 89 | | |
81 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
82 | 94 | | |
83 | 95 | | |
84 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
85 | 100 | | |
86 | 101 | | |
87 | 102 | | |
| |||
0 commit comments