Skip to content
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

[release-4.18] ARO-15695, OCPBUGS-54625: backport capabilities api #5964

Merged

Conversation

flavianmissi
Copy link
Member

@flavianmissi flavianmissi commented Apr 2, 2025

What this PR does / why we need it:

Backport commits from the following PRs:

This is being done manually because there were numerous conflicts using the bot.

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

* api: feature gate DisabledCapabilities field on HostedCluster
* api: add DisabledCapabilities to HostedControlPlaneSpec

Signed-off-by: Thomas Jungblut <[email protected]>
Signed-off-by: Flavian Missi <[email protected]>
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 2, 2025

@flavianmissi: This pull request references ARO-15695 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 task to target the "4.18.z" version, but no target version was set.

In response to this:

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 2, 2025
@openshift-ci openshift-ci bot requested review from hasueki and isco-rodriguez April 2, 2025 13:22
@openshift-ci openshift-ci bot added area/api Indicates the PR includes changes for the API area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/documentation Indicates the PR includes changes for documentation area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release area/testing Indicates the PR includes changes for e2e testing and removed do-not-merge/needs-area labels Apr 2, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 2, 2025

@flavianmissi: This pull request references ARO-15695 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 task to target the "4.18.z" version, but no target version was set.

In response to this:

What this PR does / why we need it:

Backport commits from the following PRs:

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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-robot
Copy link

openshift-ci-robot commented Apr 2, 2025

@flavianmissi: This pull request references ARO-15695 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 task to target the "4.18.z" version, but no target version was set.

In response to this:

What this PR does / why we need it:

Backport commits from the following PRs:

This is being done manually because there were numerous conflicts using the bot.

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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-robot
Copy link

openshift-ci-robot commented Apr 2, 2025

@flavianmissi: This pull request references ARO-15695 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 task to target the "4.18.z" version, but no target version was set.

In response to this:

What this PR does / why we need it:

Backport commits from the following PRs:

This is being done manually because there were numerous conflicts using the bot.

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

run `make api` to regenerate files and `make update` to bump
hypershift/api dep.
users running hypershift in tech preview can disable the image registry
capability by setting .spec.capabilities.disabledCapabilities:
["ImageRegistry"] in their hosted cluster resource.

at the moment of writing, the only supported capability is
"ImageRegistry".

it's only possible to set capabilities at hosted cluster creation time.
* add e2e tests for image registry capability
* s/DisabledCapabilities/Disabled
* set capabilities to empty by default
@flavianmissi flavianmissi force-pushed the backport-capabilities branch from 426e5a9 to 3f01243 Compare April 3, 2025 11:58
CVO manifests contain some feature-gated ones:
- since at least 4.16, there are feature-gated `ClusterVersion` CRDs
- `UpdateStatus` feature is delivered through DevPreview (now) and
  TechPreview (later) feature set

We observed HyperShift CI jobs to fail when adding DevPreview-gated
deployment manifests, which was unexpected. Investigating further,
we discovered that HyperShift applies these manifests:

[cluster-version-operator-665c5789d5-8sr59-bootstrap.log](https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1091/pull-ci-openshift-cluster-version-operator-master-e2e-hypershift-conformance/1853764751801192448/artifacts/e2e-hypershift-conformance/dump/artifacts/namespaces/clusters-c01d0e18fc19f1e0757b/core/pods/logs/cluster-version-operator-665c5789d5-8sr59-bootstrap.log):

```
error: error parsing /var/payload/manifests/0000_00_update-status-controller_03_deployment-DevPreviewNoUpgrade.yaml: error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{".ReleaseImage":interface {}(nil)}
```

But even without these added manifests, this happens for existing `ClusterVersion`
CRD manifests present in the payload:

```console
ls -1 manifests/*clusterversions*crd.yaml
 manifests/0000_00_cluster-version-operator_01_clusterversions-CustomNoUpgrade.crd.yaml
 manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml
 manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml
 manifests/0000_00_cluster-version-operator_01_clusterversions-TechPreviewNoUpgrade.crd.yaml
```

In a passing HyperShift CI job, the [same log](https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1105/pull-ci-openshift-cluster-version-operator-master-e2e-hypershift-conformance/1854708481941049344/artifacts/e2e-hypershift-conformance/dump/artifacts/namespaces/clusters-a5d1b5c3fcb2445935f2/core/pods/logs/cluster-version-operator-96cdfbf7c-cxt9r-bootstrap.log)
shows that all four manifests are applied instead of just one:

```
customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io created
customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured
customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured
customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured
```

This likely means that HyperShift hosted clusters end up using TechPreviewNoUpgrade
`ClusterVersion` CRD?

Fix the problem by deleting all manifests whose filename indicates that
it is a part of a featureset not matching the desired one.

Co-authored-by: Seth Jennings <[email protected]>
Co-authored-by: Petr Muller <[email protected]>
@sjenning sjenning changed the title [release-4.18] ARO-15695: backport capabilities api [release-4.18] ARO-15695, OCPBUGS-54625: backport capabilities api Apr 4, 2025
@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Apr 4, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 4, 2025

@flavianmissi: This pull request references ARO-15695 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 task to target the "4.18.z" version, but no target version was set.

This pull request references Jira Issue OCPBUGS-54625, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.z) matches configured target version for branch (4.18.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-44438 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-44438 targets the "4.19.0" version, which is one of the valid target versions: 4.19.0
  • bug has dependents

No GitHub users were found matching the public email listed for the QA contact in Jira ([email protected]), skipping review request.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

What this PR does / why we need it:

Backport commits from the following PRs:

This is being done manually because there were numerous conflicts using the bot.

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

@sjenning
Copy link
Contributor

sjenning commented Apr 4, 2025

/test images

@sjenning
Copy link
Contributor

sjenning commented Apr 4, 2025

/approve

@sjenning sjenning added backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. labels Apr 4, 2025
Copy link
Contributor

openshift-ci bot commented Apr 4, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flavianmissi, sjenning

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:

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 Apr 4, 2025
@sjenning
Copy link
Contributor

sjenning commented Apr 4, 2025

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 4, 2025
@sjenning
Copy link
Contributor

sjenning commented Apr 4, 2025

/lgtm cancel

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 4, 2025
@bryan-cox
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 4, 2025
Copy link
Contributor

openshift-ci bot commented Apr 4, 2025

@flavianmissi: 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-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 44f0a0d into openshift:release-4.18 Apr 4, 2025
13 checks passed
@openshift-ci-robot
Copy link

@flavianmissi: Jira Issue OCPBUGS-54625: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-54625 has been moved to the MODIFIED state.

In response to this:

What this PR does / why we need it:

Backport commits from the following PRs:

This is being done manually because there were numerous conflicts using the bot.

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

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. area/api Indicates the PR includes changes for the API area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/documentation Indicates the PR includes changes for documentation area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release area/testing Indicates the PR includes changes for e2e testing backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants