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

Linter to capture operator semantic versions #1419

Closed
kensipe opened this issue Mar 11, 2020 · 4 comments · Fixed by #1460
Closed

Linter to capture operator semantic versions #1419

kensipe opened this issue Mar 11, 2020 · 4 comments · Fixed by #1460
Assignees
Projects
Milestone

Comments

@kensipe
Copy link
Member

kensipe commented Mar 11, 2020

There is a check for semantic versions defined in the operator at the time of installation here:
https://github.com/kudobuilder/kudo/blob/master/pkg/kudoctl/util/kudo/kudo.go#L292-L295

However we shouldn't have an operator that has a semantic version issue in the repos. A new operator dev discovered this and was confused by the message Error: unable to parse operators kubernetes version: Invalid Semantic Version.

This requires 2 efforts:

  1. The error message should be more clear that this is an issue with the format of the operator
  2. we should add a linter for package verify that errors on this condition
@kensipe kensipe added this to the 0.12.0 milestone Mar 11, 2020
@kensipe kensipe self-assigned this Mar 11, 2020
@kensipe kensipe added this to Backlog in KUDO Global via automation Mar 11, 2020
@javajon
Copy link

javajon commented Mar 11, 2020

A workaround is to add:

kubernetesVersion: 1.14.0

to the operator.yaml

apiVersion: kudo.dev/v1beta1
kudoVersion: 0.10.0
kubernetesVersion: 1.14.0
maintainers:

In KUDO version 0.10.0 without this workaround the error message is:

Error: unable to parse operators kubernetes version: Invalid Semantic Version

Suggestion for the error message, if it's still needed:

Error: Encountered "Invalid Semantic Version". The value for the Kubernetes version (kubernetesVersion) in the operator declaration was not parsable. It's either missing/blank or this string "?" does not appear in the Semantic Version form (semver.org). Suggest adding "kubernetesVersion: x.x.x" to operator.yaml.

If the value is still needed and it's missing perhaps the default can be set to the current k8s version found on cluster?

@kensipe kensipe modified the milestones: 0.12.0, 0.13.0 Apr 9, 2020
@kensipe
Copy link
Member Author

kensipe commented Apr 9, 2020

This was a duplicate of #1266
and was closed with #1296

@kensipe kensipe closed this as completed Apr 9, 2020
KUDO Global automation moved this from Backlog to Done Apr 9, 2020
@kensipe
Copy link
Member Author

kensipe commented Apr 9, 2020

Importantly... I've tested it and a missing kubernetesVersion or a malformed version is captured at package verify and package create

@kensipe kensipe reopened this Apr 9, 2020
KUDO Global automation moved this from Done to Backlog Apr 9, 2020
@kensipe
Copy link
Member Author

kensipe commented Apr 9, 2020

Changing from kubVer issue
to verify of operatorVersion and kudoVersion
operatorVersion is required

KUDO Global automation moved this from Backlog to Done Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
KUDO Global
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants