Skip to content

OTA-917: pkg/customsignaturestore: Implement signatureStores customization #994

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

Merged
merged 4 commits into from
Dec 8, 2023

Conversation

wking
Copy link
Member

@wking wking commented Nov 11, 2023

The verifier Interface's AddStore has always been:

// AddStore adds additional stores for signature verification.
func (v *releaseVerifier) AddStore(additionalStore store.Store) {
  v.store = &serial.Store{Stores: []store.Store{additionalStore, v.store}}
}

since it landed in 2020. We discussed then whether we were comfortable with "always insert the new addition serially in front of the existing stores", and decided that it was good enough then (although we neglected to commit to that implementation in the Interface's Go docs).

That history sets up my approach in this commit where I add support for ClusterVersion's new spec.signatureStores. The logic is:

  1. Try and find the signature in the local ConfigMaps.
  2. ClusterVersion's spec.signatureStores.
    • If this property is set to an empty array, fail out. Admins can configure this if they only want to support ConfigMap lookup.
    • If this property is set to a non-empty array, build a parallel store out of its current contents, and search the new store:
      • If we error, check in with the call-back function about whether the error should be fatal, e.g. here. But the verifier callback is very generous about allowing failures, so we'll keep going looking at any later signatures in that sigstore and at the other parallel sigstores.
      • If we find a valid signature, hooray, we're done.
      • If we run out of sigstore entries to check without finding a valid signature, return an error, without wrapping with the callback, because we want to fail out without further signature traversal. Admins who want to check default signature stores as well can configure them explicitly in signatureStores.
      • If this property is unset, fall back to...
  3. The default signature stores.
    • Same handling as the parallel store in spec.signatureStores, but with the default signature stores.

We only fall through to the default stores when ConfigMap lookup is exhausted without finding a valid signature and signatureStores is unset, to support admins who would rather not have the cluster-version operator reach out to one or more of the default stores, whether or not they have local stores they would rather use. This allows admins to construct the set of stores they would like to use, while keeping the API surface down at a single property.

Without the AddStore history, it would have been possible to construct simplified stores, like a ConfigMaps store alone in the case where signatureStores is an empty array. We could still pivot to that kind of approach with library-go changes, but for the initial implementation, I'm doing the above dance to work with AddStore as it stands.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 11, 2023
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 11, 2023
@wking wking changed the title WIP: pkg/customsignaturestore: Implement signatureStores customization OTA-917: WIP: pkg/customsignaturestore: Implement signatureStores customization Nov 11, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 11, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 11, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 11, 2023

@wking: This pull request references OTA-917 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 "4.15.0" version, but no target version was set.

In response to this:

The verifier Interface's AddStore has always been:

// AddStore adds additional stores for signature verification.
func (v *releaseVerifier) AddStore(additionalStore store.Store) {
 v.store = &serial.Store{Stores: []store.Store{additionalStore, v.store}}
}

since it landed in 2020. We discussed then whether we were comfortable with "always insert the new addition serially in front of the existing stores", and decided that it was good enough then (although we neglected to commit to that implementation in the Interface's Go docs).

That history sets up my approach in this commit where I add support for ClusterVersion's new spec.signatureStores. The logic is:

  1. Try and find the signature in the local ConfigMaps.
  • If we run out of ConfigMap entries to check without finding a valid signature, fall back to...
  1. ClusterVersion's spec.signatureStores.
    • If this property is set to an empty array, fail out. Admins can configure this if they only want to support ConfigMap lookup.
    • If this property is set to a non-empty array, build a parallel store out of its current contents, and search the new store:
      • If we error, check in with the call-back function about whether the error should be fatal, e.g. here. But the verifier callback is very generous about allowing failures, so we'll keep going looking at any later signatures in that sigstore and at the other parallel sigstores.
      • If we find a valid signature, hooray, we're done.
      • If we run out of sigstore entries to check without finding a valid signature, return an error, without wrapping with the callback, because we want to fail out without further signature traversal. Admins who want to check default signature stores as well can configure them explicitly in signatureStores.
      • If this property is unset, fall back to...
  2. The default signature stores.
    • Same handling as the parallel store in spec.signatureStores, but with the default signature stores.

We only fall through to the default stores when ConfigMap lookup is exhausted without finding a valid signature and signatureStores is unset, to support admins who would rather not have the cluster-version operator reach out to one or more of the default stores, whether or not they have local stores they would rather use. This allows admins to construct the set of stores they would like to use, while keeping the API surface down at a single property.

Without the AddStore history, it would have been possible to construct simplified stores, like a ConfigMaps store alone in the case where signatureStores is an empty array. We could still pivot to that kind of approach with library-go changes, but for the initial implementation, I'm doing the above dance to work with AddStore as it stands.

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/test-infra repository.

@wking wking changed the title OTA-917: WIP: pkg/customsignaturestore: Implement signatureStores customization WIP: pkg/customsignaturestore: Implement signatureStores customization Nov 11, 2023
@openshift-ci-robot openshift-ci-robot removed the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 11, 2023
@openshift-ci-robot
Copy link
Contributor

@wking: No Jira issue is referenced in the title of this pull request.
To reference a jira issue, add 'XYZ-NNN:' to the title of this pull request and request another refresh with /jira refresh.

In response to this:

The verifier Interface's AddStore has always been:

// AddStore adds additional stores for signature verification.
func (v *releaseVerifier) AddStore(additionalStore store.Store) {
 v.store = &serial.Store{Stores: []store.Store{additionalStore, v.store}}
}

since it landed in 2020. We discussed then whether we were comfortable with "always insert the new addition serially in front of the existing stores", and decided that it was good enough then (although we neglected to commit to that implementation in the Interface's Go docs).

That history sets up my approach in this commit where I add support for ClusterVersion's new spec.signatureStores. The logic is:

  1. Try and find the signature in the local ConfigMaps.
  • If we run out of ConfigMap entries to check without finding a valid signature, fall back to...
  1. ClusterVersion's spec.signatureStores.
    • If this property is set to an empty array, fail out. Admins can configure this if they only want to support ConfigMap lookup.
    • If this property is set to a non-empty array, build a parallel store out of its current contents, and search the new store:
      • If we error, check in with the call-back function about whether the error should be fatal, e.g. here. But the verifier callback is very generous about allowing failures, so we'll keep going looking at any later signatures in that sigstore and at the other parallel sigstores.
      • If we find a valid signature, hooray, we're done.
      • If we run out of sigstore entries to check without finding a valid signature, return an error, without wrapping with the callback, because we want to fail out without further signature traversal. Admins who want to check default signature stores as well can configure them explicitly in signatureStores.
      • If this property is unset, fall back to...
  2. The default signature stores.
    • Same handling as the parallel store in spec.signatureStores, but with the default signature stores.

We only fall through to the default stores when ConfigMap lookup is exhausted without finding a valid signature and signatureStores is unset, to support admins who would rather not have the cluster-version operator reach out to one or more of the default stores, whether or not they have local stores they would rather use. This allows admins to construct the set of stores they would like to use, while keeping the API surface down at a single property.

Without the AddStore history, it would have been possible to construct simplified stores, like a ConfigMaps store alone in the case where signatureStores is an empty array. We could still pivot to that kind of approach with library-go changes, but for the initial implementation, I'm doing the above dance to work with AddStore as it stands.

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/test-infra repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 11, 2023
@wking wking changed the title WIP: pkg/customsignaturestore: Implement signatureStores customization OTA-917: WIP: pkg/customsignaturestore: Implement signatureStores customization Nov 11, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 11, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 11, 2023

@wking: This pull request references OTA-917 which is a valid jira issue.

In response to this:

The verifier Interface's AddStore has always been:

// AddStore adds additional stores for signature verification.
func (v *releaseVerifier) AddStore(additionalStore store.Store) {
 v.store = &serial.Store{Stores: []store.Store{additionalStore, v.store}}
}

since it landed in 2020. We discussed then whether we were comfortable with "always insert the new addition serially in front of the existing stores", and decided that it was good enough then (although we neglected to commit to that implementation in the Interface's Go docs).

That history sets up my approach in this commit where I add support for ClusterVersion's new spec.signatureStores. The logic is:

  1. Try and find the signature in the local ConfigMaps.
  • If we run out of ConfigMap entries to check without finding a valid signature, fall back to...
  1. ClusterVersion's spec.signatureStores.
    • If this property is set to an empty array, fail out. Admins can configure this if they only want to support ConfigMap lookup.
    • If this property is set to a non-empty array, build a parallel store out of its current contents, and search the new store:
      • If we error, check in with the call-back function about whether the error should be fatal, e.g. here. But the verifier callback is very generous about allowing failures, so we'll keep going looking at any later signatures in that sigstore and at the other parallel sigstores.
      • If we find a valid signature, hooray, we're done.
      • If we run out of sigstore entries to check without finding a valid signature, return an error, without wrapping with the callback, because we want to fail out without further signature traversal. Admins who want to check default signature stores as well can configure them explicitly in signatureStores.
      • If this property is unset, fall back to...
  2. The default signature stores.
    • Same handling as the parallel store in spec.signatureStores, but with the default signature stores.

We only fall through to the default stores when ConfigMap lookup is exhausted without finding a valid signature and signatureStores is unset, to support admins who would rather not have the cluster-version operator reach out to one or more of the default stores, whether or not they have local stores they would rather use. This allows admins to construct the set of stores they would like to use, while keeping the API surface down at a single property.

Without the AddStore history, it would have been possible to construct simplified stores, like a ConfigMaps store alone in the case where signatureStores is an empty array. We could still pivot to that kind of approach with library-go changes, but for the initial implementation, I'm doing the above dance to work with AddStore as it stands.

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/test-infra repository.

@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 11, 2023
@wking wking force-pushed the custom-signature-stores branch from 0c1888b to 1666d12 Compare November 11, 2023 00:28
@petr-muller
Copy link
Member

/cc

@openshift-ci openshift-ci bot requested a review from petr-muller November 13, 2023 12:51
@wking wking force-pushed the custom-signature-stores branch from 1666d12 to 6480fe9 Compare November 17, 2023 18:04
@wking
Copy link
Member Author

wking commented Nov 17, 2023

ClusterBot testing looks good with launch 4.15,openshift/cluster-version-operator#994 gcp and:

$ oc patch clusterversion version --type json -p '[{"op": "add", "path": "/spec/upstream", "value": "https://raw.githubusercontent.com/wking/cincinnati-graph-data/signatureStores-demo/cincinnati-graph.json"}]'
$ oc adm upgrade channel demo
$ oc adm upgrade --to 4.15.1
$ oc adm upgrade
Cluster version is 4.15.0-0.test-2023-11-17-182139-ci-ln-wbgj66k-latest

ReleaseAccepted=False

  Reason: VerifyPayloadVersion
  Message: Verifying payload failed version="4.15.1" image="quay.io/openshift-release-dev/ocp-release@sha256:beda83fb057e328d6f94f8415382350ca3ddf99bb9094e262184e0f127810ce0" failure=release image version 4.13.0 does not match the expected upstream version 4.15.1

Upstream: https://raw.githubusercontent.com/wking/cincinnati-graph-data/signatureStores-demo/cincinnati-graph.json
Channel: demo

Recommended updates:

  VERSION     IMAGE
  4.15.1      quay.io/openshift-release-dev/ocp-release@sha256:beda83fb057e328d6f94f8415382350ca3ddf99bb9094e262184e0f127810ce0

That isn't initiating the update, because the 4.13.0 signature I stuck in my dummy branch's signature store doesn't match the 4.15.1 version name I stuck in my dummy-branch's graph. But it is getting past the "is there a signature that I trust" stage. And shifting the signature in my dummy branch out of the correct spot, I was getting:

Retrieving payload failed version="4.15.1" image="quay.io/openshift-release-dev/ocp-release@sha256:beda83fb057e328d6f94f8415382350ca3ddf99bb9094e262184e0f127810ce0" failure=The update cannot be verified: unable to verify sha256:beda83fb057e328d6f94f8415382350ca3ddf99bb9094e262184e0f127810ce0 against keyrings: verifier-public-key-redhat

which is my custom store config successfully blocking access to the default stores, which contain a signature for that digest.

@wking wking force-pushed the custom-signature-stores branch from 6480fe9 to eafafd9 Compare November 17, 2023 19:50
@wking wking force-pushed the custom-signature-stores branch 3 times, most recently from e86ae23 to f85f95a Compare December 4, 2023 16:57
@wking
Copy link
Member Author

wking commented Dec 4, 2023

/payload-job periodic-ci-openshift-release-master-ci-4.15-e2e-aws-sdn-techpreview

Copy link
Contributor

openshift-ci bot commented Dec 4, 2023

@wking: trigger 1 job(s) for the /payload-(job|aggregate) command

  • periodic-ci-openshift-release-master-ci-4.15-e2e-aws-sdn-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/00fba6e0-92cc-11ee-87ea-f0be85fbf320-0

@wking
Copy link
Member Author

wking commented Dec 4, 2023

Azure capacity shortage?

level=error msg=Error: waiting for creation of Linux Virtual Machine: (Name "ci-op-4jfi2pl2-31db5-wlzzz-master-2" / Resource Group "ci-op-4jfi2pl2-31db5-wlzzz-rg"): Code="OSProvisioningTimedOut" Message="OS Provisioning for VM 'ci-op-4jfi2pl2-31db5-wlzzz-master-2' did not finish in the allotted time. The VM may still finish provisioning successfully. Please check provisioning state later. Also, make sure the image has been properly prepared (generalized).\r\n * Instructions for Windows: https://azure.microsoft.com/documentation/articles/virtual-machines-windows-upload-image/ \r\n * Instructions for Linux: https://azure.microsoft.com/documentation/articles/virtual-machines-linux-capture-image/ \r\n * If you are deploying more than 20 Virtual Machines concurrently, consider moving your custom image to shared image gallery. Please refer to https://aka.ms/movetosig for the same."

/retest-required

@wking wking force-pushed the custom-signature-stores branch from a9f10b6 to 02957bb Compare December 7, 2023 20:28
@LalatenduMohanty
Copy link
Member

/hold cancel

wking added 2 commits December 7, 2023 12:32
…grade manifests

Avoid (from before CustomNoUpgrade was added to Pratik's
then-in-flight API pull request):

  $ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/logs/openshift-cluster-version-operator-994-ci-4.15-e2e-aws-sdn-techpreview/1731729833685159936/artifacts/e2e-aws-sdn-techpreview/ipi-install-install/artifacts/log-bundle-20231204181454.tar | tar tvz | grep clusterversion
  -rw-r--r-- core/core     37761 2023-12-04 10:14 log-bundle-20231204181454/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusterversion-TechPreviewNoUpgrade.crd.yaml
  -rw-r--r-- core/core     35109 2023-12-04 10:14 log-bundle-20231204181454/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusterversion-Default.crd.yaml
  -rw-r--r-- core/core     37761 2023-12-04 10:14 log-bundle-20231204181454/rendered-assets/openshift/manifests/0000_00_cluster-version-operator_01_clusterversion-TechPreviewNoUpgrade.crd.yaml
  -rw-r--r-- core/core     35109 2023-12-04 10:14 log-bundle-20231204181454/rendered-assets/openshift/manifests/0000_00_cluster-version-operator_01_clusterversion-Default.crd.yaml

doubling up on the CRD, now that there are Default, CustomNoUpgrade,
and TechPreviewNoUpgrade flavors.  We'll need something more robust
than my current approach if a future tech-preview-only manifest is
necessary at bootstrap-rendering, but we can figure that out if we
ever get that kind of feature in the CVO.
Address [1]:

  pkg/cincinnati/cincinnati.go:119:4: printf: (k8s.io/klog/v2.Verbose).Infof format %n has unknown verb n (govet)
  			klog.V(2).Infof("Using a root CA pool with %n root CA subjects to request updates from %s", len(c.transport.TLSClientConfig.RootCAs.Subjects()), uri)
  			^
  pkg/payload/precondition/clusterversion/upgradeable.go:91:3: printf: (k8s.io/klog/v2.Verbose).Infof call needs 3 args but has 4 args (govet)
  		klog.V(2).Infof("Precondition %q passed: minor from the target %s is not a minor version update from the current %s.", pf.Name(), releaseContext.DesiredVersion, currentVersion, currentMinor)
  		^

The %n is from that log line originally getting added in 116b2c5
(pkg/cincinnati: Log the proxy/TLS settings used for upstream fetches,
2021-05-18, openshift#568).

The accidentally unrendere currentMinor is from e17c964
(pkg/payload/precondition/clusterversion/upgradeable: Only block on
minor-version updates, 2023-09-14, openshift#968).

[1]: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_cluster-version-operator/994/pull-ci-openshift-cluster-version-operator-master-lint/1732497738395815936#1:build-log.txt%3A20-25
@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 7, 2023
@wking wking force-pushed the custom-signature-stores branch from 02957bb to c798c3c Compare December 7, 2023 20:32
Copy link
Member

@LalatenduMohanty LalatenduMohanty left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 7, 2023
Copy link
Contributor

openshift-ci bot commented Dec 7, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LalatenduMohanty, petr-muller, wking

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [LalatenduMohanty,petr-muller,wking]

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

@LalatenduMohanty
Copy link
Member

/retest-required

@wking
Copy link
Member Author

wking commented Dec 7, 2023

build02 capacity issues.

/retest-required

@LalatenduMohanty
Copy link
Member

/test e2e-agnostic-ovn

@LalatenduMohanty
Copy link
Member

/test e2e-hypershift

@wking wking added the no-qe Allows PRs to merge without qe-approved label label Dec 8, 2023
@wking
Copy link
Member Author

wking commented Dec 8, 2023

so close to branch-cut, I'm adding no-qe to lock in what we have, and we can patch what we're missing post-merge with bugs :)

@wking
Copy link
Member Author

wking commented Dec 8, 2023

Disruption errors and HyperShift CI account OIDC quotas are both unrelated, because there isn't any CI logic yet to excercise signature retrieval (because we don't sign CI release builds).

/override ci/prow/e2e-agnostic-ovn
/override ci/prow/e2e-hypershift

Copy link
Contributor

openshift-ci bot commented Dec 8, 2023

@wking: Overrode contexts on behalf of wking: ci/prow/e2e-agnostic-ovn, ci/prow/e2e-hypershift

In response to this:

Disruption errors and HyperShift CI account OIDC quotas are both unrelated, because there isn't any CI logic yet to excercise signature retrieval (because we don't sign CI release builds).

/override ci/prow/e2e-agnostic-ovn
/override ci/prow/e2e-hypershift

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/test-infra repository.

Copy link
Contributor

openshift-ci bot commented Dec 8, 2023

@wking: all tests passed!

Full PR test history. Your PR dashboard.

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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit ebe0f34 into openshift:master Dec 8, 2023
@wking wking deleted the custom-signature-stores branch December 8, 2023 06:13
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build cluster-version-operator-container-v4.15.0-202312080808.p0.gebe0f34.assembly.stream for distgit cluster-version-operator.
All builds following this will include this PR.

wking added a commit to wking/cluster-version-operator that referenced this pull request Apr 30, 2024
Catching up with the YAML getting shifted into a subdirectory [1].  I
followed the new docs from [2] to create pkg/dependencymagnet, and
then:

  $ emacs pkg/featuregates/featuregates.go  # configv1.FeatureGateUpgradeStatus -> features.FeatureGateUpgradeStatus
  $ go get github.com/openshift/api@master github.com/openshift/library-go@master
  $ go mod tidy
  $ go mod vendor
  $ sed -i 's|config/v1/0000_00_cluster-version-operator|config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator|g' $(git grep -l 0000_00_cluster-version-operator)
  $ git add -A Dockerfile* hack/test-prerequisites.go pkg/dependencymagnet go.* vendor

all using:

  $ go version
  go version go1.22.2 linux/amd64

A few points on the invocation:

* I usually use 'go get -u ...', e.g. a98232f (vendor: Bump
  openshift/api to pick up signatureStores, 2023-12-04, openshift#994), but in
  this case, that would pull in k8s.io/[email protected], and we want to
  stick with 0.29 until our release-4.16 branch stops following this
  development branch.

* I'm explicitly bumping library-go, because if I don't, builds on [3]:

    Building github.com/openshift/cluster-version-operator (v1.0.0-1203-g258de3f7-dirty)
    # github.com/openshift/library-go/pkg/manifest
    vendor/github.com/openshift/library-go/pkg/manifest/manifest.go:32:35: undefined: configv1.FeatureSets
    # github.com/openshift/cluster-version-operator/pkg/featuregates
    pkg/featuregates/featuregates.go:92:32: undefined: configv1.FeatureGateUpgradeStatus
    pkg/featuregates/featuregates.go:97:33: undefined: configv1.FeatureGateUpgradeStatus

  If I had been able to use -u, library-go would have automatically
  floated to the tip commit anyway.  But either way, I still needed to
  make manual changes to keep up with [4] moving to the new
  openshift/api/features package.

[1]: openshift/api#1814
[2]: openshift/api@06baaa4#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R211
[3]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-images/1785396933666279424#1:build-log.txt%3A74-79
[4]: openshift/api#1821
wking added a commit to wking/cluster-version-operator that referenced this pull request Apr 30, 2024
Catching up with the YAML getting shifted into a subdirectory [1].  I
followed the new docs from [2] to create pkg/dependencymagnet, and
then:

  $ emacs pkg/featuregates/featuregates.go pkg/featuregates/featurechangestopper_test.go # configv1.FeatureGateUpgradeStatus -> features.FeatureGateUpgradeStatus
  $ go get github.com/openshift/api@master github.com/openshift/library-go@master
  $ go mod tidy
  $ go mod vendor
  $ sed -i 's|config/v1/0000_00_cluster-version-operator|config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator|g' $(git grep -l 0000_00_cluster-version-operator)
  $ git add -A Dockerfile* hack/test-prerequisites.go pkg/dependencymagnet go.* vendor

all using:

  $ go version
  go version go1.22.2 linux/amd64

A few points on the invocation:

* I usually use 'go get -u ...', e.g. a98232f (vendor: Bump
  openshift/api to pick up signatureStores, 2023-12-04, openshift#994), but in
  this case, that would pull in k8s.io/[email protected], and we want to
  stick with 0.29 until our release-4.16 branch stops following this
  development branch.

* I'm explicitly bumping library-go, because if I don't, builds on [3]:

    Building github.com/openshift/cluster-version-operator (v1.0.0-1203-g258de3f7-dirty)
    # github.com/openshift/library-go/pkg/manifest
    vendor/github.com/openshift/library-go/pkg/manifest/manifest.go:32:35: undefined: configv1.FeatureSets
    # github.com/openshift/cluster-version-operator/pkg/featuregates
    pkg/featuregates/featuregates.go:92:32: undefined: configv1.FeatureGateUpgradeStatus
    pkg/featuregates/featuregates.go:97:33: undefined: configv1.FeatureGateUpgradeStatus

  If I had been able to use -u, library-go would have automatically
  floated to the tip commit anyway.  But either way, I still needed to
  make manual changes to keep up with [4] moving to the new
  openshift/api/features package.

[1]: openshift/api#1814
[2]: openshift/api@06baaa4#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R211
[3]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-images/1785396933666279424#1:build-log.txt%3A74-79
[4]: openshift/api#1821
wking added a commit to wking/cluster-version-operator that referenced this pull request Apr 30, 2024
Catching up with the YAML getting shifted into a subdirectory [1].  I
followed the new docs from [2] to create pkg/dependencymagnet, and
then:

  $ emacs pkg/featuregates/featuregates.go pkg/featuregates/featurechangestopper_test.go # configv1.FeatureGateUpgradeStatus -> features.FeatureGateUpgradeStatus
  $ go get github.com/openshift/api@master github.com/openshift/library-go@master
  $ go mod tidy
  $ go mod vendor
  $ sed -i 's|config/v1/0000_00_cluster-version-operator|config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator|g' $(git grep -l 0000_00_cluster-version-operator)
  $ git add -A Dockerfile* hack/test-prerequisites.go pkg/dependencymagnet go.* vendor

all using:

  $ go version
  go version go1.22.2 linux/amd64

A few points on the invocation:

* I usually use 'go get -u ...', e.g. a98232f (vendor: Bump
  openshift/api to pick up signatureStores, 2023-12-04, openshift#994), but in
  this case, that would pull in k8s.io/[email protected], and we want to
  stick with 0.29 until our release-4.16 branch stops following this
  development branch.

* I'm explicitly bumping library-go, because if I don't, builds fail on [3]:

    Building github.com/openshift/cluster-version-operator (v1.0.0-1203-g258de3f7-dirty)
    # github.com/openshift/library-go/pkg/manifest
    vendor/github.com/openshift/library-go/pkg/manifest/manifest.go:32:35: undefined: configv1.FeatureSets
    # github.com/openshift/cluster-version-operator/pkg/featuregates
    pkg/featuregates/featuregates.go:92:32: undefined: configv1.FeatureGateUpgradeStatus
    pkg/featuregates/featuregates.go:97:33: undefined: configv1.FeatureGateUpgradeStatus

  If I had been able to use -u, library-go would have automatically
  floated to the tip commit anyway.  But either way, I still needed to
  make manual changes to keep up with [4] moving to the new
  openshift/api/features package.

[1]: openshift/api#1814
[2]: openshift/api@06baaa4#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R211
[3]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-images/1785396933666279424#1:build-log.txt%3A74-79
[4]: openshift/api#1821
wking added a commit to wking/cluster-version-operator that referenced this pull request Jul 9, 2024
Catching up with the YAML getting shifted into a subdirectory [1].  I
followed the new docs from [2] to create pkg/dependencymagnet, and
then:

  $ emacs pkg/featuregates/featuregates.go pkg/featuregates/featurechangestopper_test.go # configv1.FeatureGateUpgradeStatus -> features.FeatureGateUpgradeStatus
  $ go get github.com/openshift/api@master github.com/openshift/library-go@master
  $ go mod tidy
  $ go mod vendor
  $ sed -i 's|config/v1/0000_00_cluster-version-operator|config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator|g' $(git grep -l 0000_00_cluster-version-operator)
  $ git add -A Dockerfile* hack/test-prerequisites.go pkg/dependencymagnet go.* vendor

all using:

  $ go version
  go version go1.22.2 linux/amd64

A few points on the invocation:

* I usually use 'go get -u ...', e.g. a98232f (vendor: Bump
  openshift/api to pick up signatureStores, 2023-12-04, openshift#994), but in
  this case, that would pull in k8s.io/[email protected], and we want to
  stick with 0.29 until our release-4.16 branch stops following this
  development branch.

* I'm explicitly bumping library-go, because if I don't, builds fail on [3]:

    Building github.com/openshift/cluster-version-operator (v1.0.0-1203-g258de3f7-dirty)
    # github.com/openshift/library-go/pkg/manifest
    vendor/github.com/openshift/library-go/pkg/manifest/manifest.go:32:35: undefined: configv1.FeatureSets
    # github.com/openshift/cluster-version-operator/pkg/featuregates
    pkg/featuregates/featuregates.go:92:32: undefined: configv1.FeatureGateUpgradeStatus
    pkg/featuregates/featuregates.go:97:33: undefined: configv1.FeatureGateUpgradeStatus

  If I had been able to use -u, library-go would have automatically
  floated to the tip commit anyway.  But either way, I still needed to
  make manual changes to keep up with [4] moving to the new
  openshift/api/features package.  And I want [5].

[1]: openshift/api#1814
[2]: openshift/api@06baaa4#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R211
[3]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-images/1785396933666279424#1:build-log.txt%3A74-79
[4]: openshift/api#1821
[5]: openshift/library-go#1759
wking added a commit to wking/cluster-version-operator that referenced this pull request Jul 9, 2024
Catching up with the YAML getting shifted into a subdirectory [1].  I
followed the new docs from [2] to create pkg/dependencymagnet, and
then:

  $ emacs pkg/featuregates/featuregates.go pkg/featuregates/featurechangestopper_test.go # configv1.FeatureGateUpgradeStatus -> features.FeatureGateUpgradeStatus
  $ go get github.com/openshift/api@master github.com/openshift/library-go@master
  $ go mod tidy
  $ go mod vendor
  $ sed -i 's|config/v1/0000_00_cluster-version-operator|config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator|g' $(git grep -l 0000_00_cluster-version-operator)
  $ git checkout a90cec9 -- pkg/payload/render.go  # Eran Cohen's DevPreviewNoUpgrade exclusion
  $ git add -A Dockerfile* hack/test-prerequisites.go pkg/dependencymagnet go.* vendor

all using:

  $ go version
  go version go1.22.2 linux/amd64

A few points on the invocation:

* I usually use 'go get -u ...', e.g. a98232f (vendor: Bump
  openshift/api to pick up signatureStores, 2023-12-04, openshift#994), but in
  this case, that would pull in k8s.io/[email protected], and we want to
  stick with 0.29 until our release-4.16 branch stops following this
  development branch.

* I'm explicitly bumping library-go, because if I don't, builds fail on [3]:

    Building github.com/openshift/cluster-version-operator (v1.0.0-1203-g258de3f7-dirty)
    # github.com/openshift/library-go/pkg/manifest
    vendor/github.com/openshift/library-go/pkg/manifest/manifest.go:32:35: undefined: configv1.FeatureSets
    # github.com/openshift/cluster-version-operator/pkg/featuregates
    pkg/featuregates/featuregates.go:92:32: undefined: configv1.FeatureGateUpgradeStatus
    pkg/featuregates/featuregates.go:97:33: undefined: configv1.FeatureGateUpgradeStatus

  If I had been able to use -u, library-go would have automatically
  floated to the tip commit anyway.  But either way, I still needed to
  make manual changes to keep up with [4] moving to the new
  openshift/api/features package.  And I want [5].

* The DevPreviewNoUpgrade exclusion avoids bootstrap failures like [6]:

    $ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-e2e-aws-ovn-techpreview/1810753819311607808/artifacts/e2e-aws-ovn-techpreview/ipi-install-install/artifacts/log-bundle-20240709194524.tar | tar -xOz log-bundle-20240709194524/bootstrap/journals/bootkube.log | grep 'are not consistent so results would be unpredictable depending on apply order' | tail -n4
    Jul 09 19:45:15 ip-10-0-155-191 kube-apiserver-render[74584]: F0709 19:45:15.447834       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values
    Jul 09 19:45:15 ip-10-0-155-191 bootkube.sh[74561]: F0709 19:45:15.447834       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values
    Jul 09 19:45:27 ip-10-0-155-191 kube-apiserver-render[75368]: F0709 19:45:27.669093       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values
    Jul 09 19:45:27 ip-10-0-155-191 bootkube.sh[75345]: F0709 19:45:27.669093       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values

  as the kube-apiserver-render command worries about the CVO having
  rendered two ClusterVersion CRDs:

    $ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-e2e-aws-ovn-techpreview/1810753819311607808/artifacts/e2e-aws-ovn-techpreview/ipi-install-install/artifacts/log-bundle-20240709194524.tar | tar -tvz | grep 'cvo-bootstrap/.*cluster-version-operator.*crd'
    -rw-r--r-- core/core         42129 2024-07-09 12:45 log-bundle-20240709194524/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml
    -rw-r--r-- core/core         39010 2024-07-09 12:45 log-bundle-20240709194524/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml
    -rw-r--r-- core/core          7628 2024-07-09 12:45 log-bundle-20240709194524/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusteroperators.crd.yaml

[1]: openshift/api#1814
[2]: openshift/api@06baaa4#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R211
[3]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-images/1785396933666279424#1:build-log.txt%3A74-79
[4]: openshift/api#1821
[5]: openshift/library-go#1759
[6]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-e2e-aws-ovn-techpreview/1810753819311607808
wking added a commit to wking/cluster-version-operator that referenced this pull request Jul 10, 2024
Catching up with the YAML getting shifted into a subdirectory [1].  I
followed the new docs from [2] to create pkg/dependencymagnet, and
then:

  $ emacs pkg/featuregates/featuregates.go pkg/featuregates/featurechangestopper_test.go # configv1.FeatureGateUpgradeStatus -> features.FeatureGateUpgradeStatus
  $ go get github.com/openshift/api@master github.com/openshift/library-go@master
  $ go mod tidy
  $ go mod vendor
  $ sed -i 's|config/v1/0000_00_cluster-version-operator|config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator|g' $(git grep -l 0000_00_cluster-version-operator)
  $ sed -i 's/\(clusterversion\|clusteroperator\)/\1s/' hack/test-prerequisites.go
  $ git checkout a90cec9 -- pkg/payload/render.go  # Eran Cohen's DevPreviewNoUpgrade exclusion
  $ git add -A Dockerfile* hack/test-prerequisites.go pkg/dependencymagnet go.* vendor

all using:

  $ go version
  go version go1.22.2 linux/amd64

A few points on the invocation:

* I usually use 'go get -u ...', e.g. a98232f (vendor: Bump
  openshift/api to pick up signatureStores, 2023-12-04, openshift#994), but in
  this case, that would pull in k8s.io/[email protected], and we want to
  stick with 0.29 until our release-4.16 branch stops following this
  development branch.

* I'm explicitly bumping library-go, because if I don't, builds fail on [3]:

    Building github.com/openshift/cluster-version-operator (v1.0.0-1203-g258de3f7-dirty)
    # github.com/openshift/library-go/pkg/manifest
    vendor/github.com/openshift/library-go/pkg/manifest/manifest.go:32:35: undefined: configv1.FeatureSets
    # github.com/openshift/cluster-version-operator/pkg/featuregates
    pkg/featuregates/featuregates.go:92:32: undefined: configv1.FeatureGateUpgradeStatus
    pkg/featuregates/featuregates.go:97:33: undefined: configv1.FeatureGateUpgradeStatus

  If I had been able to use -u, library-go would have automatically
  floated to the tip commit anyway.  But either way, I still needed to
  make manual changes to keep up with [4] moving to the new
  openshift/api/features package.  And I want [5].

* The DevPreviewNoUpgrade exclusion avoids bootstrap failures like [6]:

    $ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-e2e-aws-ovn-techpreview/1810753819311607808/artifacts/e2e-aws-ovn-techpreview/ipi-install-install/artifacts/log-bundle-20240709194524.tar | tar -xOz log-bundle-20240709194524/bootstrap/journals/bootkube.log | grep 'are not consistent so results would be unpredictable depending on apply order' | tail -n4
    Jul 09 19:45:15 ip-10-0-155-191 kube-apiserver-render[74584]: F0709 19:45:15.447834       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values
    Jul 09 19:45:15 ip-10-0-155-191 bootkube.sh[74561]: F0709 19:45:15.447834       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values
    Jul 09 19:45:27 ip-10-0-155-191 kube-apiserver-render[75368]: F0709 19:45:27.669093       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values
    Jul 09 19:45:27 ip-10-0-155-191 bootkube.sh[75345]: F0709 19:45:27.669093       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values

  as the kube-apiserver-render command worries about the CVO having
  rendered two ClusterVersion CRDs:

    $ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-e2e-aws-ovn-techpreview/1810753819311607808/artifacts/e2e-aws-ovn-techpreview/ipi-install-install/artifacts/log-bundle-20240709194524.tar | tar -tvz | grep 'cvo-bootstrap/.*cluster-version-operator.*crd'
    -rw-r--r-- core/core         42129 2024-07-09 12:45 log-bundle-20240709194524/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml
    -rw-r--r-- core/core         39010 2024-07-09 12:45 log-bundle-20240709194524/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml
    -rw-r--r-- core/core          7628 2024-07-09 12:45 log-bundle-20240709194524/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusteroperators.crd.yaml

[1]: openshift/api#1814
[2]: openshift/api@06baaa4#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R211
[3]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-images/1785396933666279424#1:build-log.txt%3A74-79
[4]: openshift/api#1821
[5]: openshift/library-go#1759
[6]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-e2e-aws-ovn-techpreview/1810753819311607808
wking added a commit to wking/cluster-version-operator that referenced this pull request Jul 11, 2024
Like e9762c6 (vendor: Update openshift/api to pick up
zz_generated.crd-manifests, 2024-04-30, openshift#1045), except I pulled
release-4.16 branches.

Catching up with the YAML getting shifted into a subdirectory [1].  I
followed the new docs from [2] to create pkg/dependencymagnet, and
then:

  $ emacs pkg/featuregates/featuregates.go pkg/featuregates/featurechangestopper_test.go # configv1.FeatureGateUpgradeStatus -> features.FeatureGateUpgradeStatus
  $ go get github.com/openshift/[email protected] github.com/openshift/library-go@190fec8c3f09de1290c0dcaa25556b4515d65fc6  # different from e9762c6's @master
  $ go mod tidy
  $ go mod vendor
  $ sed -i 's|config/v1/0000_00_cluster-version-operator|config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator|g' $(git grep -l 0000_00_cluster-version-operator)
  $ sed -i 's/\(clusterversion\|clusteroperator\)/\1s/' hack/test-prerequisites.go
  $ git checkout a90cec9 -- pkg/payload/render.go  # Eran Cohen's DevPreviewNoUpgrade exclusion
  $ git add -A Dockerfile* hack/test-prerequisites.go pkg/dependencymagnet pkg/featuregates go.* vendor

all using:

  $ go version
  go version go1.22.2 linux/amd64

A few points on the invocation:

* I usually use 'go get -u ...', e.g. a98232f (vendor: Bump
  openshift/api to pick up signatureStores, 2023-12-04, openshift#994), but in
  this case, that would pull in k8s.io/[email protected], and we want to
  stick with 0.29 until our release-4.16 branch stops following this
  development branch.

* I'm explicitly bumping library-go, because if I don't, builds fail on [3]:

    Building github.com/openshift/cluster-version-operator (v1.0.0-1203-g258de3f7-dirty)
    # github.com/openshift/library-go/pkg/manifest
    vendor/github.com/openshift/library-go/pkg/manifest/manifest.go:32:35: undefined: configv1.FeatureSets
    # github.com/openshift/cluster-version-operator/pkg/featuregates
    pkg/featuregates/featuregates.go:92:32: undefined: configv1.FeatureGateUpgradeStatus
    pkg/featuregates/featuregates.go:97:33: undefined: configv1.FeatureGateUpgradeStatus

  If I had been able to use -u, library-go would have automatically
  floated to the tip commit anyway.  But either way, I still needed to
  make manual changes to keep up with [4] moving to the new
  openshift/api/features package.

* And I want [5], but for some reason:

    $ go get github.com/openshift/[email protected] github.com/openshift/[email protected]

  was getting me the older v0.0.0-20240517135010-e93e442c2b18.  I'm
  not clear on why.  But requesting the library-go commit I wanted by
  commit-hash instead of by branch-name got me the CustomNoUpgrade
  fix.

* The DevPreviewNoUpgrade exclusion avoids bootstrap failures like [6]:

    $ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-e2e-aws-ovn-techpreview/1810753819311607808/artifacts/e2e-aws-ovn-techpreview/ipi-install-install/artifacts/log-bundle-20240709194524.tar | tar -xOz log-bundle-20240709194524/bootstrap/journals/bootkube.log | grep 'are not consistent so results would be unpredictable depending on apply order' | tail -n4
    Jul 09 19:45:15 ip-10-0-155-191 kube-apiserver-render[74584]: F0709 19:45:15.447834       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values
    Jul 09 19:45:15 ip-10-0-155-191 bootkube.sh[74561]: F0709 19:45:15.447834       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_cluster
versions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values
    Jul 09 19:45:27 ip-10-0-155-191 kube-apiserver-render[75368]: F0709 19:45:27.669093       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_
01_clusterversions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values
    Jul 09 19:45:27 ip-10-0-155-191 bootkube.sh[75345]: F0709 19:45:27.669093       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_cluster
versions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values

  as the kube-apiserver-render command worries about the CVO having
  rendered two ClusterVersion CRDs:

    $ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-e2e-aws-ovn-techpreview/1810753819311607808/artifacts/e2e-aws-ovn-techpre
view/ipi-install-install/artifacts/log-bundle-20240709194524.tar | tar -tvz | grep 'cvo-bootstrap/.*cluster-version-operator.*crd'
    -rw-r--r-- core/core         42129 2024-07-09 12:45 log-bundle-20240709194524/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml
    -rw-r--r-- core/core         39010 2024-07-09 12:45 log-bundle-20240709194524/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml
    -rw-r--r-- core/core          7628 2024-07-09 12:45 log-bundle-20240709194524/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusteroperators.crd.yaml

[1]: openshift/api#1814
[2]: openshift/api@06baaa4#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R211
[3]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-images/1785396933666279424#1:build-log.txt%3A74-79
[4]: openshift/api#1821
[5]: openshift/library-go#1759
     Backported to 4.16 in openshift/library-go#1762
[6]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-e2e-aws-ovn-techpreview/1810753819311607808
wking added a commit to wking/cluster-version-operator that referenced this pull request Jul 11, 2024
Like e9762c6 (vendor: Update openshift/api to pick up
zz_generated.crd-manifests, 2024-04-30, openshift#1045), except I pulled
release-4.16 branches.

Catching up with the YAML getting shifted into a subdirectory [1].  I
followed the new docs from [2] to create pkg/dependencymagnet, and
then:

  $ emacs pkg/featuregates/featuregates.go pkg/featuregates/featurechangestopper_test.go # configv1.FeatureGateUpgradeStatus -> features.FeatureGateUpgradeStatus
  $ go get github.com/openshift/[email protected] github.com/openshift/library-go@190fec8c3f09de1290c0dcaa25556b4515d65fc6  # different from e9762c6's @master
  $ go mod tidy
  $ go mod vendor
  $ sed -i 's|config/v1/0000_00_cluster-version-operator|config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator|g' $(git grep -l 0000_00_cluster-version-operator)
  $ sed -i 's/\(clusterversion\|clusteroperator\)/\1s/' hack/test-prerequisites.go
  $ git checkout a90cec9 -- pkg/payload/render.go  # Eran Cohen's DevPreviewNoUpgrade exclusion
  $ git add -A Dockerfile* hack/test-prerequisites.go pkg/dependencymagnet pkg/featuregates go.* vendor

all using:

  $ go version
  go version go1.22.2 linux/amd64

A few points on the invocation:

* I usually use 'go get -u ...', e.g. a98232f (vendor: Bump
  openshift/api to pick up signatureStores, 2023-12-04, openshift#994), but in
  this case, that would pull in k8s.io/[email protected], and we want to
  stick with 0.29 until our release-4.16 branch stops following this
  development branch.

* I'm explicitly bumping library-go, because if I don't, builds fail on [3]:

    Building github.com/openshift/cluster-version-operator (v1.0.0-1203-g258de3f7-dirty)
    # github.com/openshift/library-go/pkg/manifest
    vendor/github.com/openshift/library-go/pkg/manifest/manifest.go:32:35: undefined: configv1.FeatureSets
    # github.com/openshift/cluster-version-operator/pkg/featuregates
    pkg/featuregates/featuregates.go:92:32: undefined: configv1.FeatureGateUpgradeStatus
    pkg/featuregates/featuregates.go:97:33: undefined: configv1.FeatureGateUpgradeStatus

  If I had been able to use -u, library-go would have automatically
  floated to the tip commit anyway.  But either way, I still needed to
  make manual changes to keep up with [4] moving to the new
  openshift/api/features package.

* And I want [5], but for some reason:

    $ go get github.com/openshift/[email protected] github.com/openshift/[email protected]

  was getting me the older v0.0.0-20240517135010-e93e442c2b18.  I'm
  not clear on why.  But requesting the library-go commit I wanted by
  commit-hash instead of by branch-name got me the CustomNoUpgrade
  fix.

* The DevPreviewNoUpgrade exclusion avoids bootstrap failures like [6]:

    $ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-e2e-aws-ovn-techpreview/1810753819311607808/artifacts/e2e-aws-ovn-techpreview/ipi-install-install/artifacts/log-bundle-20240709194524.tar | tar -xOz log-bundle-20240709194524/bootstrap/journals/bootkube.log | grep 'are not consistent so results would be unpredictable depending on apply order' | tail -n4
    Jul 09 19:45:15 ip-10-0-155-191 kube-apiserver-render[74584]: F0709 19:45:15.447834       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values
    Jul 09 19:45:15 ip-10-0-155-191 bootkube.sh[74561]: F0709 19:45:15.447834       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_cluster
versions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values
    Jul 09 19:45:27 ip-10-0-155-191 kube-apiserver-render[75368]: F0709 19:45:27.669093       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_
01_clusterversions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values
    Jul 09 19:45:27 ip-10-0-155-191 bootkube.sh[75345]: F0709 19:45:27.669093       1 render.go:75] --rendered-manifest-files, are not consistent so results would be unpredictable depending on apply order: "/assets/manifests/0000_00_cluster-version-operator_01_cluster
versions-DevPreviewNoUpgrade.crd.yaml" and "/assets/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml" both set CustomResourceDefinition.apiextensions.k8s.io/clusterversions.config.openshift.io in ns/, but have different values

  as the kube-apiserver-render command worries about the CVO having
  rendered two ClusterVersion CRDs:

    $ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-e2e-aws-ovn-techpreview/1810753819311607808/artifacts/e2e-aws-ovn-techpre
view/ipi-install-install/artifacts/log-bundle-20240709194524.tar | tar -tvz | grep 'cvo-bootstrap/.*cluster-version-operator.*crd'
    -rw-r--r-- core/core         42129 2024-07-09 12:45 log-bundle-20240709194524/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml
    -rw-r--r-- core/core         39010 2024-07-09 12:45 log-bundle-20240709194524/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml
    -rw-r--r-- core/core          7628 2024-07-09 12:45 log-bundle-20240709194524/rendered-assets/openshift/cvo-bootstrap/manifests/0000_00_cluster-version-operator_01_clusteroperators.crd.yaml

[1]: openshift/api#1814
[2]: openshift/api@06baaa4#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R211
[3]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-images/1785396933666279424#1:build-log.txt%3A74-79
[4]: openshift/api#1821
[5]: openshift/library-go#1759
     Backported to 4.16 in openshift/library-go#1762
[6]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1045/pull-ci-openshift-cluster-version-operator-master-e2e-aws-ovn-techpreview/1810753819311607808
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. lgtm Indicates that a PR is ready to be merged. no-qe Allows PRs to merge without qe-approved label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants