Skip to content

ODC-7539: Update devfile library to v2.2.2 #13045

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

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/coreos/pkg v0.0.0-20230601102743-20bbbf26f4d8
github.com/devfile/api/v2 v2.2.1
github.com/devfile/library v1.2.1-0.20221017204048-ec4b02cbe9c7
github.com/devfile/library/v2 v2.2.2-0.20240222173303-eefdbd323c45
github.com/devfile/registry-support/index/generator v0.0.0-20231020181239-1168591f0b4e
github.com/devfile/registry-support/registry-library v0.0.0-20231020181239-1168591f0b4e
github.com/golang/mock v1.6.0
Expand All @@ -34,7 +34,7 @@ require (
k8s.io/client-go v0.28.2
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.100.1
sigs.k8s.io/controller-runtime v0.14.4
sigs.k8s.io/controller-runtime v0.14.7
sigs.k8s.io/yaml v1.3.0
)

Expand All @@ -61,6 +61,7 @@ require (
github.com/containerd/containerd v1.7.6 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/distribution/distribution/v3 v3.0.0-20230511163743-f7717b7855ca // indirect
github.com/docker/cli v24.0.6+incompatible // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/docker v24.0.7+incompatible // indirect
Expand Down Expand Up @@ -207,6 +208,7 @@ require (
k8s.io/helm v2.17.0+incompatible // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/kubectl v0.28.2 // indirect
k8s.io/pod-security-admission v0.26.10 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
oras.land/oras-go v1.2.4 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
Expand Down
981 changes: 11 additions & 970 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkg/devfile/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/openshift/console/pkg/serverutils"
"k8s.io/klog"

devfile "github.com/devfile/library/pkg/devfile"
"github.com/devfile/library/pkg/devfile/parser"
devfile "github.com/devfile/library/v2/pkg/devfile"
"github.com/devfile/library/v2/pkg/devfile/parser"
)

func DevfileSamplesHandler(w http.ResponseWriter, r *http.Request) {
Expand Down
8 changes: 4 additions & 4 deletions pkg/devfile/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"strconv"

devfilev1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/pkg/devfile/generator"
"github.com/devfile/library/pkg/devfile/parser"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/generator"
"github.com/devfile/library/v2/pkg/devfile/parser"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"

buildv1 "github.com/openshift/api/build/v1"
imagev1 "github.com/openshift/api/image/v1"
Expand Down Expand Up @@ -169,7 +169,7 @@ func GetResourceFromDevfile(devfileObj parser.DevfileObj, deployAssociatedCompon
src := parser.YamlSrc{
Data: []byte(component.Kubernetes.Inlined),
}
values, err := parser.ReadKubernetesYaml(src, nil)
values, err := parser.ReadKubernetesYaml(src, nil, nil)
if err != nil {
errMsg := fmt.Sprintf("Failed to read the Kubernetes yaml from devfile: %v", err)
klog.Error(errMsg)
Expand Down
6 changes: 3 additions & 3 deletions pkg/devfile/resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

buildv1 "github.com/openshift/api/build/v1"

"github.com/devfile/library/pkg/devfile/parser"
"github.com/devfile/library/pkg/devfile/parser/data"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser"
"github.com/devfile/library/v2/pkg/devfile/parser/data"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/devfile/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"k8s.io/klog"

devfilev1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/pkg/devfile/parser"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
)

// GetImageBuildComponent gets the image build component from the deploy associated components
Expand Down
6 changes: 3 additions & 3 deletions pkg/devfile/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"github.com/stretchr/testify/assert"

v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/pkg/devfile/parser"
"github.com/devfile/library/pkg/devfile/parser/data"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser"
"github.com/devfile/library/v2/pkg/devfile/parser/data"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"github.com/golang/mock/gomock"
)

Expand Down
3 changes: 1 addition & 2 deletions vendor/github.com/Masterminds/semver/v3/constraints.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading