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

Plugins are not supporting multi-project version #1526

Closed
camilamacedo86 opened this issue May 26, 2020 · 4 comments
Closed

Plugins are not supporting multi-project version #1526

camilamacedo86 opened this issue May 26, 2020 · 4 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@camilamacedo86
Copy link
Member

camilamacedo86 commented May 26, 2020

What did you do?
Implement a MAJOR plugin version with breaking checkings supported ONLY for V3 Project layouts. See: #1498

What did you expect to see?

  • When I run the KB commands for V2 PROJECT version the upper plugin versions which is supported by V2 projects be used.
  • When I run the KB commands for V3 PROJECT version the upper plugin version which is supported by V3 projects be used.

What did you see instead? Under which circumstances?
The error duplicate initialization plugins for project version "3-alpha": go.kubebuilder.io, go.kubebuilder.io.

Possible Solution

The error is in:

https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/cli/api.go#L59-L69

Note that c.resolvedPlugins will return all supported plugins for the PROJECT version.
So, in the scenario where we have :

// When has more than one supportable plugin. E.g:
// - go.kubebuilder.io/v2.0.0 which is supported by V2 and V3
// - go.kubebuilder.io/v3.0.0 which is supported by V3

And we are scaffolding a project for V3 it will return go.kubebuilder.io/v2.0.0 and go.kubebuilder.io/v3.0.0 . In this scenario, we should use the upper one which is go.kubebuilder.io/v3.0.0 and the piece to get the upper version is not currently implemented.

@camilamacedo86
Copy link
Member Author

c/c @estroz

@camilamacedo86
Copy link
Member Author

/assign @camilamacedo86

@camilamacedo86 camilamacedo86 changed the title Plugins are not support multi-project version Plugins are not supporting multi-project version May 31, 2020
@camilamacedo86
Copy link
Member Author

/kind bug

HI, @estroz I updated the issue description because I notice that it was not clear enough. I hope that the scenario is better clarified.

@camilamacedo86
Copy link
Member Author

According to the PR: https://github.com/kubernetes-sigs/kubebuilder/pull/1542/files @estroz decided to move in the opposite direction and do not allow multi-project support. It means that this scenario:

// - go.kubebuilder.io/v2.0.0 which is supported by V2 and V3
// - go.kubebuilder.io/v3.0.0 which is supported by V3

Would raise an error. But the plugin design would still allow :

// - go.kubebuilder.io/v2.0.0 which is supported by V2 and V3
// - go.kubebuilder.io/v3.0.0 which is supported by V4

Closing it so.

/close

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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants