Skip to content

bundle validate does not fail on invalid minKubeVersion #5995

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

Closed
eguzki opened this issue Aug 18, 2022 · 8 comments · Fixed by operator-framework/api#286
Closed

bundle validate does not fail on invalid minKubeVersion #5995

eguzki opened this issue Aug 18, 2022 · 8 comments · Fixed by operator-framework/api#286
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Milestone

Comments

@eguzki
Copy link

eguzki commented Aug 18, 2022

Feature Request

Describe the problem you need a feature to resolve.

operator-sdk bundle validate passes all tests when CSV's spec.minKubeVersion has invalid version like 1.21

spec.minKubeVersion with value 1.21 is invalid because OLM refuses to deploy the CSV with the following confusing error CSV version parsing error:

....
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
spec: {...}
status:
  cleanup: {}
  conditions:
    - lastTransitionTime: "2022-08-18T17:30:29Z"
      lastUpdateTime: "2022-08-18T17:30:29Z"
      message: requirements not yet checked
      phase: Pending
      reason: RequirementsUnknown
    - lastTransitionTime: "2022-08-18T17:30:29Z"
      lastUpdateTime: "2022-08-18T17:30:29Z"
      message: one or more requirements couldn't be found
      phase: Pending
      reason: RequirementsNotMet
  lastTransitionTime: "2022-08-18T17:30:29Z"
  lastUpdateTime: "2022-08-18T17:30:29Z"
  message: one or more requirements couldn't be found
  phase: Pending
  reason: RequirementsNotMet
  requirementStatus:
    - group: operators.coreos.com
      kind: ClusterServiceVersion
      message: CSV version parsing error
      name: limitador-operator.v0.3.0
      status: PresentNotSatisfied
      version: v1alpha1

When the field spec.minKubeVersion is updated to 1.21.0, then OLM installs the CSV successfully.

Describe the solution you'd like.

CVP team would like the operator-sdk bundle validate command to validate CSV's spec.minKubeVersion when it is specified.

@varshaprasad96
Copy link
Member

This seems to be an additional validation mentioning that spec.minKubeVersion should follow semver format which we would have to add in operator-framework/api since it contains the validators ?
cc: @jmrodri @camilamacedo86

@theishshah theishshah self-assigned this Aug 22, 2022
@theishshah theishshah added this to the v1.24.0 milestone Aug 22, 2022
@theishshah theishshah added the kind/bug Categorizes issue or PR as related to a bug. label Aug 22, 2022
@asmacdo asmacdo modified the milestones: v1.24.0, v1.25.0, v1.26.0 Sep 21, 2022
@jberkhahn jberkhahn modified the milestones: v1.26.0, v1.27.0 Dec 8, 2022
@theishshah theishshah modified the milestones: v1.27.0, v1.28.0 Jan 25, 2023
@varshaprasad96
Copy link
Member

@theishshah moving this to the next release (1.29). Please feel free to update.

@varshaprasad96 varshaprasad96 modified the milestones: v1.28.0, v1.29.0 Feb 15, 2023
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 17, 2023
@everettraven everettraven modified the milestones: v1.29.0, v1.30.0 May 31, 2023
@kutluhanmetin
Copy link

I would like to take this task, I hope I can make it until Jun 26.

@everettraven
Copy link
Contributor

@theishshah Are you okay with @kutluhanmetin taking this on? If so, would you mind unassigning yourself and assigning @kutluhanmetin ?

@oceanc80 oceanc80 modified the milestones: v1.30.0, v1.31.0 Jun 23, 2023
kutluhanmetin added a commit to kutluhanmetin/api that referenced this issue Jul 1, 2023
@everettraven
Copy link
Contributor

/label lifecycle/frozen

@openshift-ci
Copy link

openshift-ci bot commented Jul 17, 2023

@everettraven: The label(s) /label lifecycle/frozen cannot be applied. These labels are supported: platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, downstream-change-needed, rebase/manual, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/valid-bug, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to this:

/label lifecycle/frozen

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.

@everettraven
Copy link
Contributor

/lifecycle frozen

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 17, 2023
@openshift-ci openshift-ci bot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Jul 17, 2023
openshift-merge-robot pushed a commit to operator-framework/api that referenced this issue Jul 25, 2023
stevekuznetsov pushed a commit to stevekuznetsov/operator-framework-olm that referenced this issue Aug 3, 2023
* fixes operator-framework/operator-sdk#5995

* fix comment change

* fix imports

Upstream-repository: api
Upstream-commit: fdfcb35e6d330fca94841b113c8140cf58930e35
Signed-off-by: Steve Kuznetsov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants