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

kpt 1.0 can't use blueprint retrieved via kpt 0.39 #2114

Closed
martinmaly opened this issue May 26, 2021 · 1 comment
Closed

kpt 1.0 can't use blueprint retrieved via kpt 0.39 #2114

martinmaly opened this issue May 26, 2021 · 1 comment
Assignees
Labels
bug Something isn't working customer deep engagement size/M 2 day triaged Issue has been triaged by adding an `area/` label

Comments

@martinmaly
Copy link
Contributor

Expected behavior

kpt 0.39 should not downgrade blueprints to become incompatible with kpt 1.0.

Options:

  • return an error
  • make the pkg get code forward-compatible so it can detect kpt 1.0 package and preserve its structure

note that customer needs to fetch the package before they can see which version of kpt it is compatible with. Ideally we would allow:

  • fetch package using any kpt
  • check the compatibility of the package (i.e. "kpt tell me if this is v0.39 or v1 package)
  • treat it accordingly

Actual behavior

Package is downgraded and kpt 1.0 cannot work with it.

Information

Steps to reproduce the behavior

% kpt version
0.39.2

% kpt pkg get https://github.com/GoogleContainerTools/kpt/package-examples/nginx@v0.4 nginx-039
fetching package "package-examples/nginx" from "https://github.com/GoogleContainerTools/kpt" to "nginx-039"

% kpt1 version
1.0.0-alpha.4
% kpt1 fn render nginx-039 
Error: Kptfile at "nginx-039" can't be read.

Details:
yaml: unmarshal errors:
  line 8: field commit not found in type v1alpha2.Git 

% kpt1 pkg get https://github.com/GoogleContainerTools/kpt/package-examples/nginx@v0.4 nginx-1  
Package "nginx-1":
Fetching https://github.com/GoogleContainerTools/kpt@v0.4.
From https://github.com/GoogleContainerTools/kpt
 * tag                 package-examples/nginx/v0.4 -> FETCH_HEAD
Adding package "package-examples/nginx".
kpt1 fn
Fetched 1 package(s).

% kpt1 fn render nginx-1 
Package "nginx-1": 
[RUNNING] "gcr.io/kpt-fn/kubeval:v0.1"
[PASS] "gcr.io/kpt-fn/kubeval:v0.1"

Successfully executed 1 function(s) in 1 package(s).

@martinmaly martinmaly added the bug Something isn't working label May 26, 2021
@phanimarupaka phanimarupaka self-assigned this May 26, 2021
@phanimarupaka phanimarupaka added triaged Issue has been triaged by adding an `area/` label size/M 2 day labels May 26, 2021
@phanimarupaka phanimarupaka added this to To do in kpt kanban board via automation May 26, 2021
@phanimarupaka phanimarupaka added this to the v1.0 m3 milestone May 26, 2021
@mikebz mikebz added the customer deep engagement label Jun 2, 2021
@frankfarzan frankfarzan assigned mortent and unassigned phanimarupaka Jun 4, 2021
@frankfarzan frankfarzan moved this from To do to In progress in kpt kanban board Jun 4, 2021
@mortent
Copy link
Contributor

mortent commented Jun 10, 2021

We are releasing a new version of pre 1.0 kpt (v0.39.3) that will provide better error messages when encountering packages where the Kptfile is using a new schema. Fixed in #2182

We have also added a better error message when using kpt v1.0 to fetch a package with the old Kptfile schema. Automatically updating the package is not a good solution here since there are substantial differences between the old and the new schema. Fixed in #2161

@mortent mortent closed this as completed Jun 10, 2021
kpt kanban board automation moved this from In progress to Done Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working customer deep engagement size/M 2 day triaged Issue has been triaged by adding an `area/` label
Projects
Development

No branches or pull requests

4 participants