Skip to content

Commit 995fecb

Browse files
Merge pull request #13045 from maysunfaisal/update-devfile-3
ODC-7539: Update devfile library to v2.2.2
2 parents 63e97fa + 2103da8 commit 995fecb

124 files changed

Lines changed: 6764 additions & 6082 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/coreos/go-oidc v2.2.1+incompatible
88
github.com/coreos/pkg v0.0.0-20230601102743-20bbbf26f4d8
99
github.com/devfile/api/v2 v2.2.1
10-
github.com/devfile/library v1.2.1-0.20221017204048-ec4b02cbe9c7
10+
github.com/devfile/library/v2 v2.2.2-0.20240222173303-eefdbd323c45
1111
github.com/devfile/registry-support/index/generator v0.0.0-20231020181239-1168591f0b4e
1212
github.com/devfile/registry-support/registry-library v0.0.0-20231020181239-1168591f0b4e
1313
github.com/golang/mock v1.6.0
@@ -34,7 +34,7 @@ require (
3434
k8s.io/client-go v0.28.2
3535
k8s.io/klog v1.0.0
3636
k8s.io/klog/v2 v2.100.1
37-
sigs.k8s.io/controller-runtime v0.14.4
37+
sigs.k8s.io/controller-runtime v0.14.7
3838
sigs.k8s.io/yaml v1.3.0
3939
)
4040

@@ -61,6 +61,7 @@ require (
6161
github.com/containerd/containerd v1.7.6 // indirect
6262
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
6363
github.com/davecgh/go-spew v1.1.1 // indirect
64+
github.com/distribution/distribution/v3 v3.0.0-20230511163743-f7717b7855ca // indirect
6465
github.com/docker/cli v24.0.6+incompatible // indirect
6566
github.com/docker/distribution v2.8.2+incompatible // indirect
6667
github.com/docker/docker v24.0.7+incompatible // indirect
@@ -207,6 +208,7 @@ require (
207208
k8s.io/helm v2.17.0+incompatible // indirect
208209
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
209210
k8s.io/kubectl v0.28.2 // indirect
211+
k8s.io/pod-security-admission v0.26.10 // indirect
210212
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
211213
oras.land/oras-go v1.2.4 // indirect
212214
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect

go.sum

Lines changed: 11 additions & 970 deletions
Large diffs are not rendered by default.

pkg/devfile/handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
"github.com/openshift/console/pkg/serverutils"
1111
"k8s.io/klog"
1212

13-
devfile "github.com/devfile/library/pkg/devfile"
14-
"github.com/devfile/library/pkg/devfile/parser"
13+
devfile "github.com/devfile/library/v2/pkg/devfile"
14+
"github.com/devfile/library/v2/pkg/devfile/parser"
1515
)
1616

1717
func DevfileSamplesHandler(w http.ResponseWriter, r *http.Request) {

pkg/devfile/resources.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"strconv"
66

77
devfilev1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
8-
"github.com/devfile/library/pkg/devfile/generator"
9-
"github.com/devfile/library/pkg/devfile/parser"
10-
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
8+
"github.com/devfile/library/v2/pkg/devfile/generator"
9+
"github.com/devfile/library/v2/pkg/devfile/parser"
10+
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
1111

1212
buildv1 "github.com/openshift/api/build/v1"
1313
imagev1 "github.com/openshift/api/image/v1"
@@ -169,7 +169,7 @@ func GetResourceFromDevfile(devfileObj parser.DevfileObj, deployAssociatedCompon
169169
src := parser.YamlSrc{
170170
Data: []byte(component.Kubernetes.Inlined),
171171
}
172-
values, err := parser.ReadKubernetesYaml(src, nil)
172+
values, err := parser.ReadKubernetesYaml(src, nil, nil)
173173
if err != nil {
174174
errMsg := fmt.Sprintf("Failed to read the Kubernetes yaml from devfile: %v", err)
175175
klog.Error(errMsg)

pkg/devfile/resources_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010

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

13-
"github.com/devfile/library/pkg/devfile/parser"
14-
"github.com/devfile/library/pkg/devfile/parser/data"
15-
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
13+
"github.com/devfile/library/v2/pkg/devfile/parser"
14+
"github.com/devfile/library/v2/pkg/devfile/parser/data"
15+
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
1616
"github.com/golang/mock/gomock"
1717
"github.com/stretchr/testify/assert"
1818
)

pkg/devfile/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"k8s.io/klog"
88

99
devfilev1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
10-
"github.com/devfile/library/pkg/devfile/parser"
11-
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
10+
"github.com/devfile/library/v2/pkg/devfile/parser"
11+
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
1212
)
1313

1414
// GetImageBuildComponent gets the image build component from the deploy associated components

pkg/devfile/utils_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"github.com/stretchr/testify/assert"
88

99
v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
10-
"github.com/devfile/library/pkg/devfile/parser"
11-
"github.com/devfile/library/pkg/devfile/parser/data"
12-
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
10+
"github.com/devfile/library/v2/pkg/devfile/parser"
11+
"github.com/devfile/library/v2/pkg/devfile/parser/data"
12+
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
1313
"github.com/golang/mock/gomock"
1414
)
1515

vendor/github.com/Masterminds/semver/v3/constraints.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

vendor/github.com/devfile/library/pkg/devfile/generator/generators.go renamed to vendor/github.com/devfile/library/v2/pkg/devfile/generator/generators.go

Lines changed: 156 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)