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

bug in alpha conversion #4716

Closed
jmccormick2001 opened this issue Apr 5, 2021 · 7 comments · Fixed by #4748
Closed

bug in alpha conversion #4716

jmccormick2001 opened this issue Apr 5, 2021 · 7 comments · Fixed by #4748
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-blocker This issue blocks the parent release milestone
Milestone

Comments

@jmccormick2001
Copy link
Contributor

Bug Report

I'm seeing the following error:

operator-sdk alpha config-3alpha-to-3
Error: unable to load the configuration: unable to create config for version "3-alpha": version 3-alpha is not supported
Usage:
operator-sdk [flags]

Examples:
The first step is to initialize your project:
operator-sdk init [--plugins= [--project-version=]]

What did you do?

Here is the PROJECT file it is reading:

domain: example.com
layout: go.kubebuilder.io/v3
projectName: sample-operator
repo: github.com/jmccormick2001/sample-operator
resources:
- crdVersion: v1
  group: cache
  kind: SampleOperand
  version: v1alpha1
version: 3-alpha
plugins:
  manifests.sdk.operatorframework.io/v2: {}
  scorecard.sdk.operatorframework.io/v2: {}

What did you expect to see?

I expected it to convert the PROJECT to the newest/latest format.

What did you see instead? Under which circumstances?

operator-sdk alpha config-3alpha-to-3
Error: unable to load the configuration: unable to create config for version "3-alpha": version 3-alpha is not supported
Usage:
operator-sdk [flags]

Examples:
The first step is to initialize your project:
operator-sdk init [--plugins= [--project-version=]]

Environment

Operator type:

/language go

Kubernetes cluster type:

snoot:[~/sample-operator] kubectl version
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.0", GitCommit:"af46c47ce925f4c4ad5cc8d1fca46c7b77d13b38", GitTreeState:"clean", BuildDate:"2020-12-08T17:59:43Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.0", GitCommit:"af46c47ce925f4c4ad5cc8d1fca46c7b77d13b38", GitTreeState:"clean", BuildDate:"2020-12-08T17:51:19Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}

$ operator-sdk version

snoot:[~] operator-sdk version
operator-sdk version: "scorecard-kuttl/v2.0.0-43-g6b6c0214", commit: "6b6c021400894281b0d35033e83b5671e4c5f1ac", kubernetes version: "v1.19.4", go version: "go1.15.5", GOOS: "linux", GOARCH: "amd64"

$ go version (if language is Go)
snoot:[~] go version
go version go1.15.5 linux/amd64

$ kubectl version

Possible Solution

none

Additional context

none

@openshift-ci-robot openshift-ci-robot added the language/go Issue is related to a Go operator project label Apr 5, 2021
@jmrodri
Copy link
Member

jmrodri commented Apr 5, 2021

The alpha config-3alpha-to-3 command used to convert the PROJECT file is failing because getInfo fails in KB: https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/cli/cli.go#L148-L150 basically the command we want to run to convert the config file fails because we can't read the config file

@jmrodri
Copy link
Member

jmrodri commented Apr 5, 2021

Looks like it is the loading of the configuration file. If I ignore the loading error here https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/cli/cli.go#L194, I can get the command to work.

@estroz estroz removed the language/go Issue is related to a Go operator project label Apr 5, 2021
@estroz
Copy link
Member

estroz commented Apr 5, 2021

I believe this is a regression in behavior in kubebuilder, since extra commands should not require a (valid) PROJECT file.

/kind bug

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 5, 2021
@jmrodri
Copy link
Member

jmrodri commented Apr 5, 2021

I believe this is a reversion in behavior in kubebuilder, since extra commands should not require a (valid) PROJECT file.

/kind bug

AH HA! Yes, I noticed operator-sdk version no longer works either. That's helpful.

@estroz estroz added blocked priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Apr 5, 2021
@estroz estroz added this to the v1.6.0 milestone Apr 5, 2021
@jmrodri
Copy link
Member

jmrodri commented Apr 5, 2021

blocked by kubernetes-sigs/kubebuilder#2125

@jberkhahn jberkhahn added the release-blocker This issue blocks the parent release milestone label Apr 7, 2021
@jmrodri
Copy link
Member

jmrodri commented Apr 11, 2021

PR created to solve kubebuilder issue: kubernetes-sigs/kubebuilder#2126

@jmrodri
Copy link
Member

jmrodri commented Apr 12, 2021

PR kubernetes-sigs/kubebuilder#2126 merged, we now need another kubebuilder release

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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-blocker This issue blocks the parent release milestone
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants