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

Initial adoption of devfile 2.1 #4589

Closed
2 tasks done
serenamarie125 opened this issue Apr 6, 2021 · 4 comments · Fixed by #4820
Closed
2 tasks done

Initial adoption of devfile 2.1 #4589

serenamarie125 opened this issue Apr 6, 2021 · 4 comments · Fixed by #4820
Assignees
Labels
kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation priority/Medium Nice to have issue. Getting it done before priority changes would be great.

Comments

@serenamarie125
Copy link

serenamarie125 commented Apr 6, 2021

Which functionality do you think we should add?

Initial adoption of devfile 2.1, including adding support for any relevant new attributes

Acceptance Criteria

  • Adopt the Devfile 2.1 library and react to any breaking changes. (Update devfile/library to v1.0.0 #4769)
  • Top level attribute def (issue 239) - Devfiles using global attributes in parent or local devfile must work.

JIRA Epic Tracking

ODO-60

@serenamarie125 serenamarie125 added this to the 2.2 (Planning) milestone Apr 6, 2021
@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation label Apr 6, 2021
@deboer-tim
Copy link

deboer-tim commented Apr 6, 2021

Goal

This feature will be used to adopt the devfile 2.1 library, react to any breaking changes, and do any urgent new features in order to support devfiles created with 2.1 that are almost equivalent to current 2.0 devfiles. The one new feature that will be supported is top level (global) attributes.

Feature #4640 will be used to add support for all other new features and complete the devfile 2.1 support. It contains the full list of changes in 2.1.

Acceptance Criteria

  • Adopt the Devfile 2.1 library and react to any breaking changes.
  • Top level attribute def (issue 239) - Devfiles using global attributes in parent or local devfile must work.

@kadel kadel added the priority/Medium Nice to have issue. Getting it done before priority changes would be great. label Apr 7, 2021
@serenamarie125 serenamarie125 changed the title Adopt devfile 2.1 Initial adoption of devfile 2.1 Apr 26, 2021
@kadel
Copy link
Member

kadel commented May 27, 2021

Devfile 2.1 was officially released https://github.com/devfile/api/releases/tag/v2.1.0

@kadel
Copy link
Member

kadel commented Jun 2, 2021

updating devfile/library in odo to latest master

go get github.com/devfile/library@master 
go mod tidy
go mod vendor
▶ make
go build -mod=vendor -ldflags="-X github.com/openshift/odo/pkg/version.GITCOMMIT=f9449083e" cmd/odo/odo.go
# github.com/openshift/odo/pkg/component
pkg/component/starter_project.go:96:48: starterProject.Github undefined (type *v1alpha2.StarterProject has no field or method Github)
pkg/component/starter_project.go:127:33: starterProject.Github undefined (type *v1alpha2.StarterProject has no field or method Github)
make: *** [Makefile:53: bin] Error 2

▶ make test                                    
go test  -race github.com/openshift/odo/cmd/cli-doc github.com/openshift/odo/cmd/odo github.com/openshift/odo/pkg/application github.com/openshift/odo/pkg/application/labels github.com/openshift/odo/pkg/auth github.com/openshift/odo/pkg/catalog github.com/openshift/odo/pkg/component github.com/openshift/odo/pkg/component/labels github.com/openshift/odo/pkg/config github.com/openshift/odo/pkg/debug github.com/openshift/odo/pkg/devfile/adapters github.com/openshift/odo/pkg/devfile/adapters/common github.com/openshift/odo/pkg/devfile/adapters/docker github.com/openshift/odo/pkg/devfile/adapters/docker/component github.com/openshift/odo/pkg/devfile/adapters/docker/storage github.com/openshift/odo/pkg/devfile/adapters/docker/utils github.com/openshift/odo/pkg/devfile/adapters/kubernetes github.com/openshift/odo/pkg/devfile/adapters/kubernetes/component github.com/openshift/odo/pkg/devfile/adapters/kubernetes/storage github.com/openshift/odo/pkg/devfile/adapters/kubernetes/utils github.com/openshift/odo/pkg/devfile/convert github.com/openshift/odo/pkg/devfile/validate github.com/openshift/odo/pkg/envinfo github.com/openshift/odo/pkg/kclient github.com/openshift/odo/pkg/kclient/fake github.com/openshift/odo/pkg/lclient github.com/openshift/odo/pkg/localConfigProvider github.com/openshift/odo/pkg/log github.com/openshift/odo/pkg/log/fidget github.com/openshift/odo/pkg/machineoutput github.com/openshift/odo/pkg/notify github.com/openshift/odo/pkg/occlient github.com/openshift/odo/pkg/odo/cli github.com/openshift/odo/pkg/odo/cli/application github.com/openshift/odo/pkg/odo/cli/catalog github.com/openshift/odo/pkg/odo/cli/catalog/describe github.com/openshift/odo/pkg/odo/cli/catalog/list github.com/openshift/odo/pkg/odo/cli/catalog/search github.com/openshift/odo/pkg/odo/cli/catalog/util github.com/openshift/odo/pkg/odo/cli/component github.com/openshift/odo/pkg/odo/cli/component/ui github.com/openshift/odo/pkg/odo/cli/config github.com/openshift/odo/pkg/odo/cli/debug github.com/openshift/odo/pkg/odo/cli/env github.com/openshift/odo/pkg/odo/cli/login github.com/openshift/odo/pkg/odo/cli/logout github.com/openshift/odo/pkg/odo/cli/plugins github.com/openshift/odo/pkg/odo/cli/preference github.com/openshift/odo/pkg/odo/cli/project github.com/openshift/odo/pkg/odo/cli/registry github.com/openshift/odo/pkg/odo/cli/registry/util github.com/openshift/odo/pkg/odo/cli/service github.com/openshift/odo/pkg/odo/cli/service/ui github.com/openshift/odo/pkg/odo/cli/storage github.com/openshift/odo/pkg/odo/cli/telemetry github.com/openshift/odo/pkg/odo/cli/ui github.com/openshift/odo/pkg/odo/cli/url github.com/openshift/odo/pkg/odo/cli/utils github.com/openshift/odo/pkg/odo/cli/version github.com/openshift/odo/pkg/odo/genericclioptions github.com/openshift/odo/pkg/odo/util github.com/openshift/odo/pkg/odo/util/completion github.com/openshift/odo/pkg/odo/util/experimental github.com/openshift/odo/pkg/odo/util/validation github.com/openshift/odo/pkg/preference github.com/openshift/odo/pkg/project github.com/openshift/odo/pkg/secret github.com/openshift/odo/pkg/segment github.com/openshift/odo/pkg/segment/context github.com/openshift/odo/pkg/service github.com/openshift/odo/pkg/storage github.com/openshift/odo/pkg/storage/labels github.com/openshift/odo/pkg/sync github.com/openshift/odo/pkg/sync/mock github.com/openshift/odo/pkg/testingutil github.com/openshift/odo/pkg/testingutil/filesystem github.com/openshift/odo/pkg/url github.com/openshift/odo/pkg/url/labels github.com/openshift/odo/pkg/util github.com/openshift/odo/pkg/version github.com/openshift/odo/pkg/watch
# github.com/openshift/odo/pkg/devfile/adapters/docker/utils [github.com/openshift/odo/pkg/devfile/adapters/docker/utils.test]
pkg/devfile/adapters/docker/utils/utils_test.go:94:53: undefined: data.APIVersion200
# github.com/openshift/odo/pkg/sync [github.com/openshift/odo/pkg/sync.test]
pkg/sync/adapter_test.go:199:53: undefined: data.APIVersion200
pkg/sync/adapter_test.go:353:53: undefined: data.APIVersion200
# github.com/openshift/odo/pkg/devfile/adapters/common [github.com/openshift/odo/pkg/devfile/adapters/common.test]
pkg/devfile/adapters/common/command_test.go:189:53: undefined: data.APIVersion200
pkg/devfile/adapters/common/command_test.go:469:53: undefined: data.APIVersion200
pkg/devfile/adapters/common/command_test.go:766:53: undefined: data.APIVersion200
pkg/devfile/adapters/common/command_test.go:933:53: undefined: data.APIVersion200
pkg/devfile/adapters/common/command_test.go:1056:53: undefined: data.APIVersion200
pkg/devfile/adapters/common/command_test.go:1181:53: undefined: data.APIVersion200
pkg/devfile/adapters/common/command_test.go:1312:53: undefined: data.APIVersion200
pkg/devfile/adapters/common/command_test.go:1415:53: undefined: data.APIVersion200
pkg/devfile/adapters/common/command_test.go:1599:53: undefined: data.APIVersion200
pkg/devfile/adapters/common/command_test.go:1705:53: undefined: data.APIVersion200
pkg/devfile/adapters/common/command_test.go:1705:53: too many errors
# github.com/openshift/odo/pkg/testingutil
pkg/testingutil/devfile.go:90:47: undefined: data.APIVersion200
pkg/testingutil/devfile.go:138:47: undefined: data.APIVersion200
pkg/testingutil/devfile.go:179:47: undefined: data.APIVersion200
pkg/testingutil/devfile.go:224:47: undefined: data.APIVersion200
pkg/testingutil/devfile.go:269:47: undefined: data.APIVersion200
# github.com/openshift/odo/pkg/devfile/adapters/docker/component [github.com/openshift/odo/pkg/devfile/adapters/docker/component.test]
pkg/devfile/adapters/docker/component/adapter_test.go:110:53: undefined: data.APIVersion200
pkg/devfile/adapters/docker/component/adapter_test.go:306:53: undefined: data.APIVersion200
pkg/devfile/adapters/docker/component/adapter_test.go:406:53: undefined: data.APIVersion200
pkg/devfile/adapters/docker/component/adapter_test.go:491:53: undefined: data.APIVersion200
pkg/devfile/adapters/docker/component/adapter_test.go:873:53: undefined: data.APIVersion200
pkg/devfile/adapters/docker/component/utils_test.go:125:53: undefined: data.APIVersion200
pkg/devfile/adapters/docker/component/utils_test.go:243:53: undefined: data.APIVersion200
pkg/devfile/adapters/docker/component/utils_test.go:314:53: undefined: data.APIVersion200
pkg/devfile/adapters/docker/component/utils_test.go:370:53: undefined: data.APIVersion200
pkg/devfile/adapters/docker/component/utils_test.go:424:53: undefined: data.APIVersion200
pkg/devfile/adapters/docker/component/utils_test.go:424:53: too many errors
# github.com/openshift/odo/pkg/testingutil [github.com/openshift/odo/pkg/testingutil.test]
pkg/testingutil/devfile.go:90:47: undefined: data.APIVersion200
pkg/testingutil/devfile.go:138:47: undefined: data.APIVersion200
pkg/testingutil/devfile.go:179:47: undefined: data.APIVersion200
pkg/testingutil/devfile.go:224:47: undefined: data.APIVersion200
pkg/testingutil/devfile.go:269:47: undefined: data.APIVersion200
# github.com/openshift/odo/pkg/component
pkg/component/starter_project.go:96:48: starterProject.Github undefined (type *v1alpha2.StarterProject has no field or method Github)
pkg/component/starter_project.go:127:33: starterProject.Github undefined (type *v1alpha2.StarterProject has no field or method Github)
FAIL	github.com/openshift/odo/pkg/application [build failed]
ok  	github.com/openshift/odo/pkg/application/labels	(cached)
FAIL	github.com/openshift/odo/pkg/catalog [build failed]
FAIL	github.com/openshift/odo/pkg/component [build failed]
ok  	github.com/openshift/odo/pkg/component/labels	(cached)
FAIL	github.com/openshift/odo/pkg/config [build failed]
FAIL	github.com/openshift/odo/pkg/debug [build failed]
FAIL	github.com/openshift/odo/pkg/devfile/adapters [build failed]
FAIL	github.com/openshift/odo/pkg/devfile/adapters/common [build failed]
FAIL	github.com/openshift/odo/pkg/devfile/adapters/docker/component [build failed]
ok  	github.com/openshift/odo/pkg/devfile/adapters/docker/storage	(cached)
FAIL	github.com/openshift/odo/pkg/devfile/adapters/docker/utils [build failed]
FAIL	github.com/openshift/odo/pkg/devfile/adapters/kubernetes/component [build failed]
FAIL	github.com/openshift/odo/pkg/devfile/adapters/kubernetes/storage [build failed]
FAIL	github.com/openshift/odo/pkg/devfile/adapters/kubernetes/utils [build failed]
ok  	github.com/openshift/odo/pkg/devfile/validate	(cached)
FAIL	github.com/openshift/odo/pkg/envinfo [build failed]
FAIL	github.com/openshift/odo/pkg/kclient [build failed]
ok  	github.com/openshift/odo/pkg/lclient	(cached)
ok  	github.com/openshift/odo/pkg/notify	(cached) [no tests to run]
FAIL	github.com/openshift/odo/pkg/occlient [build failed]
ok  	github.com/openshift/odo/pkg/odo/cli/catalog/util	(cached)
FAIL	github.com/openshift/odo/pkg/odo/cli/env [build failed]
ok  	github.com/openshift/odo/pkg/odo/cli/registry/util	(cached)
FAIL	github.com/openshift/odo/pkg/odo/cli/service [build failed]
FAIL	github.com/openshift/odo/pkg/odo/cli/service/ui [build failed]
FAIL	github.com/openshift/odo/pkg/odo/cli/storage [build failed]
FAIL	github.com/openshift/odo/pkg/odo/cli/utils [build failed]
FAIL	github.com/openshift/odo/pkg/odo/util [build failed]
FAIL	github.com/openshift/odo/pkg/odo/util/completion [build failed]
ok  	github.com/openshift/odo/pkg/odo/util/experimental	(cached)
ok  	github.com/openshift/odo/pkg/odo/util/validation	(cached)
ok  	github.com/openshift/odo/pkg/preference	(cached)
FAIL	github.com/openshift/odo/pkg/project [build failed]
ok  	github.com/openshift/odo/pkg/secret	(cached)
ok  	github.com/openshift/odo/pkg/segment	(cached)
ok  	github.com/openshift/odo/pkg/segment/context	(cached)
FAIL	github.com/openshift/odo/pkg/service [build failed]
FAIL	github.com/openshift/odo/pkg/storage [build failed]
ok  	github.com/openshift/odo/pkg/storage/labels	(cached)
FAIL	github.com/openshift/odo/pkg/sync [build failed]
FAIL	github.com/openshift/odo/pkg/testingutil [build failed]
FAIL	github.com/openshift/odo/pkg/url [build failed]
ok  	github.com/openshift/odo/pkg/url/labels	(cached)
ok  	github.com/openshift/odo/pkg/util	(cached)
FAIL	github.com/openshift/odo/pkg/watch [build failed]
make: *** [Makefile:151: test] Error 2

@kadel kadel self-assigned this Jun 2, 2021
@kadel
Copy link
Member

kadel commented Jun 2, 2021

Acceptance Criteria

  • Adopt the Devfile 2.1 library and react to any breaking changes.

While analyzing how much work it will be to fix all errors and breaking changes, I managed to fix them :-D
So answer to that question was about 1 hour :-D
It is done in #4769

  • Top level attribute def (issue 239) - Devfiles using global attributes in parent or local devfile must work.

This is left to do.
From the few tests that I did while working on previous acceptance criteria, it looks it works out of the box.
But this item should not be marked as done until we have tests that verify that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants