openshift / api

Canonical location of the OpenShift API definition.
http://www.openshift.org
Apache License 2.0
94 stars 517 forks source link

CFE-1167: Feature-gated MachineNamePrefix field for CMPS #2086

Open chiragkyal opened 2 weeks ago

chiragkyal commented 2 weeks ago

This PR

openshift-ci[bot] commented 2 weeks ago

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

openshift-ci[bot] commented 2 weeks ago

Hello @chiragkyal! Some important instructions when contributing to openshift/api: API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

openshift-ci-robot commented 1 week ago

@chiragkyal: This pull request references CFE-1167 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.18.0" version, but no target version was set.

In response to [this](https://github.com/openshift/api/pull/2086): > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fapi). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci-robot commented 1 week ago

@chiragkyal: This pull request references CFE-1167 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.18.0" version, but no target version was set.

In response to [this](https://github.com/openshift/api/pull/2086): >This PR > >- Introduces `MachineNamePrefix` field in `ControlPlaneMachineSet` allowing custom prefixes to be used for Control Plane Machine names. >- This feature is gated behind the `CMPSMachineNamePrefix` feature gate. > > >- Implements https://github.com/openshift/enhancements/pull/1714 >- Part of [CFE-1167](https://issues.redhat.com/browse/CFE-1167) Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fapi). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci-robot commented 1 week ago

@chiragkyal: This pull request references CFE-1167 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.18.0" version, but no target version was set.

In response to [this](https://github.com/openshift/api/pull/2086): >This PR > >- Introduces `MachineNamePrefix` field in `ControlPlaneMachineSet` allowing custom prefixes to be used for Control Plane Machine names. >- This feature is gated behind the `CMPSMachineNamePrefix` feature gate. > >- Feature gate PR : https://github.com/openshift/api/pull/2094 >- Implements https://github.com/openshift/enhancements/pull/1714 >- Part of [CFE-1167](https://issues.redhat.com/browse/CFE-1167) Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fapi). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
chiragkyal commented 1 week ago

/assign @JoelSpeed

openshift-ci[bot] commented 1 week ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: chiragkyal Once this PR has been reviewed and has the lgtm label, please ask for approval from joelspeed. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/openshift/api/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
chiragkyal commented 1 week ago

It looks like the integration test is failing only on controlplanemachinesets-CustomNoUpgrade.crd.yaml and due to authoritativeAPI field.

 [machine.openshift.io/v1, Resource=controlplanemachinesets][ClusterProfiles=SelfManagedHA][FeatureSet="CustomNoUpgrade"][FeatureGate=CMPSMachineNamePrefix][File=0000_10_control-plane-machine-set_01_controlplanemachinesets-CustomNoUpgrade.crd.yaml] ControlPlaneMachineSet (+CMPSMachineNamePrefix) On Create [It] Should be able to create a minimal ControlPlaneMachineSet
/home/ckyal/go/src/github.com/openshift/api/tests/generator.go:189

  [FAILED] the following fields were expected to match but did not:
  [(spec.template.machines_v1beta1_machine_openshift_io.spec.authoritativeAPI/spec.template.machines_v1beta1_machine_openshift_io.spec.authoritativeAPI)]

Seems like authoritativeAPI field exists only in CustomNoUpgrade but not in DevPreviewNoUpgrade or TechPreviewNoUpgrade whereas the MachineAPIMigration feature-gate isn't enabled in any featureset. This behaviour is conflicting when adding the tests for the new feature gate.

https://github.com/openshift/api/blob/a2817b89f7e0989016967055a142d5e88bed18de/payload-manifests/crds/0000_10_control-plane-machine-set_01_controlplanemachinesets-CustomNoUpgrade.crd.yaml#L532-L546

https://github.com/openshift/api/blob/a2817b89f7e0989016967055a142d5e88bed18de/features/features.go#L564-L569

@JoelSpeed Are we expecting authoritativeAPI field to be present in CustomNoUpgrade ?

JoelSpeed commented 1 day ago

@JoelSpeed Are we expecting authoritativeAPI field to be present in CustomNoUpgrade ?

No, it is as expected, we don't want the gate in any feature set just yet.

Do you know why there is a difference? There shouldn't be a default on those fields IIRC, so I wouldn't expect it to interfere

JoelSpeed commented 1 day ago

Oops, it does have a default, try adding -MachineAPIMigration to your feature gates entry in the test file, I think you can comma separate the gates

chiragkyal commented 23 hours ago

Oops, it does have a default, try adding -MachineAPIMigration to your feature gates entry in the test file, I think you can comma separate the gates

I tried adding

featureGate: CMPSMachineNamePrefix,-MachineAPIMigration

but it looks like we cannot add more than one gate. The test is erroing out locally.

"unable to find featureGate/CMPSMachineNamePrefix,-MachineAPIMigration to check for /home/ckyal/go/src/github.com/openshift/api/machine/v1/zz_generated.crd-manifests/0000_10_control-plane-machine-set_01_controlplanemachinesets-Default.crd.yaml",
openshift-ci[bot] commented 7 hours ago

@chiragkyal: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/integration 06033400da2c41e51fdd4f845e316fcc95340f03 link true /test integration
ci/prow/minor-e2e-upgrade-minor 06033400da2c41e51fdd4f845e316fcc95340f03 link true /test minor-e2e-upgrade-minor
ci/prow/e2e-gcp 06033400da2c41e51fdd4f845e316fcc95340f03 link false /test e2e-gcp
ci/prow/e2e-upgrade 06033400da2c41e51fdd4f845e316fcc95340f03 link true /test e2e-upgrade
ci/prow/verify-crd-schema 06033400da2c41e51fdd4f845e316fcc95340f03 link true /test verify-crd-schema

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).