From 3aa06e493ec2ef611af058f525f34101ad1615bf Mon Sep 17 00:00:00 2001 From: Jordan Dubrick Date: Thu, 18 Apr 2024 16:15:08 -0400 Subject: [PATCH 1/2] update library dep to v2.2.2 Signed-off-by: Jordan Dubrick --- index/generator/go.mod | 6 +++--- index/generator/go.sum | 12 ++++++------ index/server/go.mod | 6 +++--- index/server/go.sum | 12 ++++++------ .../v1alpha2/devworkspacetemplate_spec.go | 8 ++++++++ .../api/v2/pkg/apis/workspaces/v1alpha2/doc.go | 2 +- .../v1alpha2/zz_generated.deepcopy.go | 14 ++++++++++++++ .../v1alpha2/zz_generated.parent_overrides.go | 8 ++++++++ ...erated.toplevellistcontainer_definitions.go | 18 ++++++++++-------- .../v2/pkg/validation/variables/variables.go | 6 ++++++ index/server/vendor/modules.txt | 6 +++--- tests/integration/go.mod | 6 +++--- tests/integration/go.sum | 12 ++++++------ 13 files changed, 77 insertions(+), 39 deletions(-) diff --git a/index/generator/go.mod b/index/generator/go.mod index 1650e5592..bde481faf 100644 --- a/index/generator/go.mod +++ b/index/generator/go.mod @@ -3,8 +3,8 @@ module github.com/devfile/registry-support/index/generator go 1.19 require ( - github.com/devfile/api/v2 v2.2.1 - github.com/devfile/library/v2 v2.2.2-0.20240315205431-44ca18d63cf4 + github.com/devfile/api/v2 v2.2.2 + github.com/devfile/library/v2 v2.2.2 github.com/go-git/go-git/v5 v5.11.0 github.com/mitchellh/go-homedir v1.1.0 github.com/nsf/jsondiff v0.0.0-20230430225905-43f6cf3098c1 @@ -28,7 +28,7 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/devfile/registry-support/registry-library v0.0.0-20240311160550-e51ee8934746 // indirect + github.com/devfile/registry-support/registry-library v0.0.0-20240328155806-7c89891a72ce // indirect github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/docker/cli v25.0.1+incompatible // indirect diff --git a/index/generator/go.sum b/index/generator/go.sum index 546139ad9..487f61be2 100644 --- a/index/generator/go.sum +++ b/index/generator/go.sum @@ -93,12 +93,12 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/devfile/api/v2 v2.2.1 h1:VSX297YqY4C4j4uhn7M0RdZeBaeWqyVi4NnagzEmxu0= -github.com/devfile/api/v2 v2.2.1/go.mod h1:qp8jcw12y1JdCsxjK/7LJ7uWaJOxcY1s2LUk5PhbkbM= -github.com/devfile/library/v2 v2.2.2-0.20240315205431-44ca18d63cf4 h1:9eIiFsDMQ8aLPbrqXSBkfe3Cd2CeZbbGiJXo6SilEo0= -github.com/devfile/library/v2 v2.2.2-0.20240315205431-44ca18d63cf4/go.mod h1:BOLGb4k2RcuJEs7UK5bmvBnDLVkGxsKO2s1rceYmfEo= -github.com/devfile/registry-support/registry-library v0.0.0-20240311160550-e51ee8934746 h1:VQLQguSjxcU1xtUjbqmEW6R9Ehgjk1PzG56vHnzXyEw= -github.com/devfile/registry-support/registry-library v0.0.0-20240311160550-e51ee8934746/go.mod h1:2RRLQaOYuzh8n59euz6Bu60hFoX/LLVM9uzFOFDyOZM= +github.com/devfile/api/v2 v2.2.2 h1:DXRCPWFlZhTIE38Of2jzTRjQHadfbxBC8GS+m+EjoCU= +github.com/devfile/api/v2 v2.2.2/go.mod h1:qp8jcw12y1JdCsxjK/7LJ7uWaJOxcY1s2LUk5PhbkbM= +github.com/devfile/library/v2 v2.2.2 h1:iLtFQ16aYMcB+vUx7NKtKPiTEursxwueu6/qOailubA= +github.com/devfile/library/v2 v2.2.2/go.mod h1:LHgAu9VApI++hE+cr6CWrkj1OlzHOJeKbraqC5PxSec= +github.com/devfile/registry-support/registry-library v0.0.0-20240328155806-7c89891a72ce h1:IgUCI7eCq6m0JzRx3+FZuIeJy5e+rUSQYMr3NBzrqyg= +github.com/devfile/registry-support/registry-library v0.0.0-20240328155806-7c89891a72ce/go.mod h1:2RRLQaOYuzh8n59euz6Bu60hFoX/LLVM9uzFOFDyOZM= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= diff --git a/index/server/go.mod b/index/server/go.mod index 637ced923..70c620171 100644 --- a/index/server/go.mod +++ b/index/server/go.mod @@ -4,8 +4,8 @@ go 1.19 require ( github.com/deepmap/oapi-codegen v1.12.4 - github.com/devfile/api/v2 v2.2.1 - github.com/devfile/library/v2 v2.2.2-0.20240315205431-44ca18d63cf4 + github.com/devfile/api/v2 v2.2.2 + github.com/devfile/library/v2 v2.2.2 github.com/devfile/registry-support/index/generator v0.0.0 github.com/getkin/kin-openapi v0.117.0 github.com/gin-gonic/gin v1.9.0 @@ -41,7 +41,7 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/devfile/registry-support/registry-library v0.0.0-20240311160550-e51ee8934746 // indirect + github.com/devfile/registry-support/registry-library v0.0.0-20240328155806-7c89891a72ce // indirect github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/docker/cli v25.0.1+incompatible // indirect diff --git a/index/server/go.sum b/index/server/go.sum index 30410717e..a56f2b359 100644 --- a/index/server/go.sum +++ b/index/server/go.sum @@ -106,12 +106,12 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deepmap/oapi-codegen v1.12.4 h1:pPmn6qI9MuOtCz82WY2Xaw46EQjgvxednXXrP7g5Q2s= github.com/deepmap/oapi-codegen v1.12.4/go.mod h1:3lgHGMu6myQ2vqbbTXH2H1o4eXFTGnFiDaOaKKl5yas= -github.com/devfile/api/v2 v2.2.1 h1:VSX297YqY4C4j4uhn7M0RdZeBaeWqyVi4NnagzEmxu0= -github.com/devfile/api/v2 v2.2.1/go.mod h1:qp8jcw12y1JdCsxjK/7LJ7uWaJOxcY1s2LUk5PhbkbM= -github.com/devfile/library/v2 v2.2.2-0.20240315205431-44ca18d63cf4 h1:9eIiFsDMQ8aLPbrqXSBkfe3Cd2CeZbbGiJXo6SilEo0= -github.com/devfile/library/v2 v2.2.2-0.20240315205431-44ca18d63cf4/go.mod h1:BOLGb4k2RcuJEs7UK5bmvBnDLVkGxsKO2s1rceYmfEo= -github.com/devfile/registry-support/registry-library v0.0.0-20240311160550-e51ee8934746 h1:VQLQguSjxcU1xtUjbqmEW6R9Ehgjk1PzG56vHnzXyEw= -github.com/devfile/registry-support/registry-library v0.0.0-20240311160550-e51ee8934746/go.mod h1:2RRLQaOYuzh8n59euz6Bu60hFoX/LLVM9uzFOFDyOZM= +github.com/devfile/api/v2 v2.2.2 h1:DXRCPWFlZhTIE38Of2jzTRjQHadfbxBC8GS+m+EjoCU= +github.com/devfile/api/v2 v2.2.2/go.mod h1:qp8jcw12y1JdCsxjK/7LJ7uWaJOxcY1s2LUk5PhbkbM= +github.com/devfile/library/v2 v2.2.2 h1:iLtFQ16aYMcB+vUx7NKtKPiTEursxwueu6/qOailubA= +github.com/devfile/library/v2 v2.2.2/go.mod h1:LHgAu9VApI++hE+cr6CWrkj1OlzHOJeKbraqC5PxSec= +github.com/devfile/registry-support/registry-library v0.0.0-20240328155806-7c89891a72ce h1:IgUCI7eCq6m0JzRx3+FZuIeJy5e+rUSQYMr3NBzrqyg= +github.com/devfile/registry-support/registry-library v0.0.0-20240328155806-7c89891a72ce/go.mod h1:2RRLQaOYuzh8n59euz6Bu60hFoX/LLVM9uzFOFDyOZM= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= diff --git a/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/devworkspacetemplate_spec.go b/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/devworkspacetemplate_spec.go index 1d48cf7cc..c2e761285 100644 --- a/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/devworkspacetemplate_spec.go +++ b/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/devworkspacetemplate_spec.go @@ -79,6 +79,14 @@ type DevWorkspaceTemplateSpecContent struct { // +devfile:toplevellist StarterProjects []StarterProject `json:"starterProjects,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + // Additional projects related to the main project in the devfile, contianing names and sources locations + // +optional + // +patchMergeKey=name + // +patchStrategy=merge + // +devfile:overrides:include:omitInPlugin=true,description=Overrides of dependentProjects encapsulated in a parent devfile. + // +devfile:toplevellist + DependentProjects []Project `json:"dependentProjects,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + // Predefined, ready-to-use, devworkspace-related commands // +optional // +patchMergeKey=id diff --git a/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/doc.go b/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/doc.go index adcc2c1da..04b838fb3 100644 --- a/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/doc.go +++ b/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/doc.go @@ -18,5 +18,5 @@ // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true // +groupName=workspace.devfile.io -// +devfile:jsonschema:version=2.2.1 +// +devfile:jsonschema:version=2.2.2 package v1alpha2 diff --git a/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go b/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go index 60ed58638..936bb4bb2 100644 --- a/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go +++ b/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go @@ -1818,6 +1818,13 @@ func (in *DevWorkspaceTemplateSpecContent) DeepCopyInto(out *DevWorkspaceTemplat (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.DependentProjects != nil { + in, out := &in.DependentProjects, &out.DependentProjects + *out = make([]Project, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Commands != nil { in, out := &in.Commands, &out.Commands *out = make([]Command, len(*in)) @@ -3543,6 +3550,13 @@ func (in *ParentOverrides) DeepCopyInto(out *ParentOverrides) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.DependentProjects != nil { + in, out := &in.DependentProjects, &out.DependentProjects + *out = make([]ProjectParentOverride, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Commands != nil { in, out := &in.Commands, &out.Commands *out = make([]CommandParentOverride, len(*in)) diff --git a/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go b/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go index 85a966e88..05278a852 100644 --- a/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go +++ b/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go @@ -47,6 +47,14 @@ type ParentOverrides struct { // +devfile:toplevellist StarterProjects []StarterProjectParentOverride `json:"starterProjects,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + // Overrides of dependentProjects encapsulated in a parent devfile. + // Overriding is done according to K8S strategic merge patch standard rules. + // +optional + // +patchMergeKey=name + // +patchStrategy=merge + // +devfile:toplevellist + DependentProjects []ProjectParentOverride `json:"dependentProjects,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + // Overrides of commands encapsulated in a parent devfile or a plugin. // Overriding is done according to K8S strategic merge patch standard rules. // +optional diff --git a/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.toplevellistcontainer_definitions.go b/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.toplevellistcontainer_definitions.go index 45be709ff..27250b5bf 100644 --- a/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.toplevellistcontainer_definitions.go +++ b/index/server/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.toplevellistcontainer_definitions.go @@ -2,19 +2,21 @@ package v1alpha2 func (container DevWorkspaceTemplateSpecContent) GetToplevelLists() TopLevelLists { return TopLevelLists{ - "Components": extractKeys(container.Components), - "Projects": extractKeys(container.Projects), - "StarterProjects": extractKeys(container.StarterProjects), - "Commands": extractKeys(container.Commands), + "Components": extractKeys(container.Components), + "Projects": extractKeys(container.Projects), + "StarterProjects": extractKeys(container.StarterProjects), + "DependentProjects": extractKeys(container.DependentProjects), + "Commands": extractKeys(container.Commands), } } func (container ParentOverrides) GetToplevelLists() TopLevelLists { return TopLevelLists{ - "Components": extractKeys(container.Components), - "Projects": extractKeys(container.Projects), - "StarterProjects": extractKeys(container.StarterProjects), - "Commands": extractKeys(container.Commands), + "Components": extractKeys(container.Components), + "Projects": extractKeys(container.Projects), + "StarterProjects": extractKeys(container.StarterProjects), + "DependentProjects": extractKeys(container.DependentProjects), + "Commands": extractKeys(container.Commands), } } diff --git a/index/server/vendor/github.com/devfile/api/v2/pkg/validation/variables/variables.go b/index/server/vendor/github.com/devfile/api/v2/pkg/validation/variables/variables.go index b1adf413a..2b123c84d 100644 --- a/index/server/vendor/github.com/devfile/api/v2/pkg/validation/variables/variables.go +++ b/index/server/vendor/github.com/devfile/api/v2/pkg/validation/variables/variables.go @@ -39,6 +39,9 @@ type VariableWarning struct { // StarterProjects stores a map of starter project names to the invalid variable references StarterProjects map[string][]string + + // DependentProjects stores a map of dependent project names to invalid variable references + DependentProjects map[string][]string } // ValidateAndReplaceGlobalVariable validates the workspace template spec data for global variable references and replaces them with the variable value @@ -58,6 +61,9 @@ func ValidateAndReplaceGlobalVariable(workspaceTemplateSpec *v1alpha2.DevWorkspa // Validate the starter projects and replace for global variable variableWarning.StarterProjects = ValidateAndReplaceForStarterProjects(workspaceTemplateSpec.Variables, workspaceTemplateSpec.StarterProjects) + + // Validate the starter projects and replace for global variable + variableWarning.DependentProjects = ValidateAndReplaceForProjects(workspaceTemplateSpec.Variables, workspaceTemplateSpec.DependentProjects) } return variableWarning diff --git a/index/server/vendor/modules.txt b/index/server/vendor/modules.txt index 0c60971c4..6ecd71786 100644 --- a/index/server/vendor/modules.txt +++ b/index/server/vendor/modules.txt @@ -118,7 +118,7 @@ github.com/davecgh/go-spew/spew github.com/deepmap/oapi-codegen/pkg/gin-middleware github.com/deepmap/oapi-codegen/pkg/runtime github.com/deepmap/oapi-codegen/pkg/types -# github.com/devfile/api/v2 v2.2.1 +# github.com/devfile/api/v2 v2.2.2 ## explicit; go 1.18 github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2 github.com/devfile/api/v2/pkg/attributes @@ -127,7 +127,7 @@ github.com/devfile/api/v2/pkg/utils/overriding github.com/devfile/api/v2/pkg/utils/unions github.com/devfile/api/v2/pkg/validation github.com/devfile/api/v2/pkg/validation/variables -# github.com/devfile/library/v2 v2.2.2-0.20240315205431-44ca18d63cf4 +# github.com/devfile/library/v2 v2.2.2 ## explicit; go 1.19 github.com/devfile/library/v2/pkg/devfile github.com/devfile/library/v2/pkg/devfile/parser @@ -149,7 +149,7 @@ github.com/devfile/library/v2/pkg/util ## explicit; go 1.19 github.com/devfile/registry-support/index/generator/library github.com/devfile/registry-support/index/generator/schema -# github.com/devfile/registry-support/registry-library v0.0.0-20240311160550-e51ee8934746 +# github.com/devfile/registry-support/registry-library v0.0.0-20240328155806-7c89891a72ce ## explicit; go 1.19 github.com/devfile/registry-support/registry-library/library # github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 diff --git a/tests/integration/go.mod b/tests/integration/go.mod index c6a3ca772..980c59b66 100644 --- a/tests/integration/go.mod +++ b/tests/integration/go.mod @@ -3,7 +3,7 @@ module github.com/devfile/registry-support/tests/integration go 1.19 require ( - github.com/devfile/library/v2 v2.2.2-0.20240315205431-44ca18d63cf4 + github.com/devfile/library/v2 v2.2.2 github.com/devfile/registry-support/index/generator v0.0.0-20240311135803-6215550f93d4 github.com/onsi/ginkgo v1.16.4 github.com/onsi/gomega v1.27.10 @@ -22,8 +22,8 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/devfile/api/v2 v2.2.1 // indirect - github.com/devfile/registry-support/registry-library v0.0.0-20240311160550-e51ee8934746 // indirect + github.com/devfile/api/v2 v2.2.2 // indirect + github.com/devfile/registry-support/registry-library v0.0.0-20240328155806-7c89891a72ce // indirect github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/docker/cli v25.0.1+incompatible // indirect diff --git a/tests/integration/go.sum b/tests/integration/go.sum index 64524e59f..2743a20b8 100644 --- a/tests/integration/go.sum +++ b/tests/integration/go.sum @@ -92,14 +92,14 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/devfile/api/v2 v2.2.1 h1:VSX297YqY4C4j4uhn7M0RdZeBaeWqyVi4NnagzEmxu0= -github.com/devfile/api/v2 v2.2.1/go.mod h1:qp8jcw12y1JdCsxjK/7LJ7uWaJOxcY1s2LUk5PhbkbM= -github.com/devfile/library/v2 v2.2.2-0.20240315205431-44ca18d63cf4 h1:9eIiFsDMQ8aLPbrqXSBkfe3Cd2CeZbbGiJXo6SilEo0= -github.com/devfile/library/v2 v2.2.2-0.20240315205431-44ca18d63cf4/go.mod h1:BOLGb4k2RcuJEs7UK5bmvBnDLVkGxsKO2s1rceYmfEo= +github.com/devfile/api/v2 v2.2.2 h1:DXRCPWFlZhTIE38Of2jzTRjQHadfbxBC8GS+m+EjoCU= +github.com/devfile/api/v2 v2.2.2/go.mod h1:qp8jcw12y1JdCsxjK/7LJ7uWaJOxcY1s2LUk5PhbkbM= +github.com/devfile/library/v2 v2.2.2 h1:iLtFQ16aYMcB+vUx7NKtKPiTEursxwueu6/qOailubA= +github.com/devfile/library/v2 v2.2.2/go.mod h1:LHgAu9VApI++hE+cr6CWrkj1OlzHOJeKbraqC5PxSec= github.com/devfile/registry-support/index/generator v0.0.0-20240311135803-6215550f93d4 h1:t09mGdy31tC2YBp6kVD7x8m0jq1CyBUSYMUvrF0iaWw= github.com/devfile/registry-support/index/generator v0.0.0-20240311135803-6215550f93d4/go.mod h1:3Ngbmm12LW03tAEHpDNymM7zryd5H1Xo3ZAGlBpecf8= -github.com/devfile/registry-support/registry-library v0.0.0-20240311160550-e51ee8934746 h1:VQLQguSjxcU1xtUjbqmEW6R9Ehgjk1PzG56vHnzXyEw= -github.com/devfile/registry-support/registry-library v0.0.0-20240311160550-e51ee8934746/go.mod h1:2RRLQaOYuzh8n59euz6Bu60hFoX/LLVM9uzFOFDyOZM= +github.com/devfile/registry-support/registry-library v0.0.0-20240328155806-7c89891a72ce h1:IgUCI7eCq6m0JzRx3+FZuIeJy5e+rUSQYMr3NBzrqyg= +github.com/devfile/registry-support/registry-library v0.0.0-20240328155806-7c89891a72ce/go.mod h1:2RRLQaOYuzh8n59euz6Bu60hFoX/LLVM9uzFOFDyOZM= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= From 81c5503163dc1e3f2905e07240629f72e8d180fc Mon Sep 17 00:00:00 2001 From: Jordan Dubrick Date: Fri, 19 Apr 2024 12:05:29 -0400 Subject: [PATCH 2/2] update vendor for index/generator Signed-off-by: Jordan Dubrick --- .../v1alpha2/devworkspacetemplate_spec.go | 8 ++++++++ .../api/v2/pkg/apis/workspaces/v1alpha2/doc.go | 2 +- .../v1alpha2/zz_generated.deepcopy.go | 14 ++++++++++++++ .../v1alpha2/zz_generated.parent_overrides.go | 8 ++++++++ ...erated.toplevellistcontainer_definitions.go | 18 ++++++++++-------- .../v2/pkg/validation/variables/variables.go | 6 ++++++ index/generator/vendor/modules.txt | 6 +++--- 7 files changed, 50 insertions(+), 12 deletions(-) diff --git a/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/devworkspacetemplate_spec.go b/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/devworkspacetemplate_spec.go index 1d48cf7cc..c2e761285 100644 --- a/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/devworkspacetemplate_spec.go +++ b/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/devworkspacetemplate_spec.go @@ -79,6 +79,14 @@ type DevWorkspaceTemplateSpecContent struct { // +devfile:toplevellist StarterProjects []StarterProject `json:"starterProjects,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + // Additional projects related to the main project in the devfile, contianing names and sources locations + // +optional + // +patchMergeKey=name + // +patchStrategy=merge + // +devfile:overrides:include:omitInPlugin=true,description=Overrides of dependentProjects encapsulated in a parent devfile. + // +devfile:toplevellist + DependentProjects []Project `json:"dependentProjects,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + // Predefined, ready-to-use, devworkspace-related commands // +optional // +patchMergeKey=id diff --git a/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/doc.go b/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/doc.go index adcc2c1da..04b838fb3 100644 --- a/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/doc.go +++ b/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/doc.go @@ -18,5 +18,5 @@ // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true // +groupName=workspace.devfile.io -// +devfile:jsonschema:version=2.2.1 +// +devfile:jsonschema:version=2.2.2 package v1alpha2 diff --git a/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go b/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go index 60ed58638..936bb4bb2 100644 --- a/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go +++ b/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go @@ -1818,6 +1818,13 @@ func (in *DevWorkspaceTemplateSpecContent) DeepCopyInto(out *DevWorkspaceTemplat (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.DependentProjects != nil { + in, out := &in.DependentProjects, &out.DependentProjects + *out = make([]Project, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Commands != nil { in, out := &in.Commands, &out.Commands *out = make([]Command, len(*in)) @@ -3543,6 +3550,13 @@ func (in *ParentOverrides) DeepCopyInto(out *ParentOverrides) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.DependentProjects != nil { + in, out := &in.DependentProjects, &out.DependentProjects + *out = make([]ProjectParentOverride, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Commands != nil { in, out := &in.Commands, &out.Commands *out = make([]CommandParentOverride, len(*in)) diff --git a/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go b/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go index 85a966e88..05278a852 100644 --- a/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go +++ b/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go @@ -47,6 +47,14 @@ type ParentOverrides struct { // +devfile:toplevellist StarterProjects []StarterProjectParentOverride `json:"starterProjects,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + // Overrides of dependentProjects encapsulated in a parent devfile. + // Overriding is done according to K8S strategic merge patch standard rules. + // +optional + // +patchMergeKey=name + // +patchStrategy=merge + // +devfile:toplevellist + DependentProjects []ProjectParentOverride `json:"dependentProjects,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + // Overrides of commands encapsulated in a parent devfile or a plugin. // Overriding is done according to K8S strategic merge patch standard rules. // +optional diff --git a/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.toplevellistcontainer_definitions.go b/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.toplevellistcontainer_definitions.go index 45be709ff..27250b5bf 100644 --- a/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.toplevellistcontainer_definitions.go +++ b/index/generator/vendor/github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2/zz_generated.toplevellistcontainer_definitions.go @@ -2,19 +2,21 @@ package v1alpha2 func (container DevWorkspaceTemplateSpecContent) GetToplevelLists() TopLevelLists { return TopLevelLists{ - "Components": extractKeys(container.Components), - "Projects": extractKeys(container.Projects), - "StarterProjects": extractKeys(container.StarterProjects), - "Commands": extractKeys(container.Commands), + "Components": extractKeys(container.Components), + "Projects": extractKeys(container.Projects), + "StarterProjects": extractKeys(container.StarterProjects), + "DependentProjects": extractKeys(container.DependentProjects), + "Commands": extractKeys(container.Commands), } } func (container ParentOverrides) GetToplevelLists() TopLevelLists { return TopLevelLists{ - "Components": extractKeys(container.Components), - "Projects": extractKeys(container.Projects), - "StarterProjects": extractKeys(container.StarterProjects), - "Commands": extractKeys(container.Commands), + "Components": extractKeys(container.Components), + "Projects": extractKeys(container.Projects), + "StarterProjects": extractKeys(container.StarterProjects), + "DependentProjects": extractKeys(container.DependentProjects), + "Commands": extractKeys(container.Commands), } } diff --git a/index/generator/vendor/github.com/devfile/api/v2/pkg/validation/variables/variables.go b/index/generator/vendor/github.com/devfile/api/v2/pkg/validation/variables/variables.go index b1adf413a..2b123c84d 100644 --- a/index/generator/vendor/github.com/devfile/api/v2/pkg/validation/variables/variables.go +++ b/index/generator/vendor/github.com/devfile/api/v2/pkg/validation/variables/variables.go @@ -39,6 +39,9 @@ type VariableWarning struct { // StarterProjects stores a map of starter project names to the invalid variable references StarterProjects map[string][]string + + // DependentProjects stores a map of dependent project names to invalid variable references + DependentProjects map[string][]string } // ValidateAndReplaceGlobalVariable validates the workspace template spec data for global variable references and replaces them with the variable value @@ -58,6 +61,9 @@ func ValidateAndReplaceGlobalVariable(workspaceTemplateSpec *v1alpha2.DevWorkspa // Validate the starter projects and replace for global variable variableWarning.StarterProjects = ValidateAndReplaceForStarterProjects(workspaceTemplateSpec.Variables, workspaceTemplateSpec.StarterProjects) + + // Validate the starter projects and replace for global variable + variableWarning.DependentProjects = ValidateAndReplaceForProjects(workspaceTemplateSpec.Variables, workspaceTemplateSpec.DependentProjects) } return variableWarning diff --git a/index/generator/vendor/modules.txt b/index/generator/vendor/modules.txt index 0fa6f7d27..12de77ac1 100644 --- a/index/generator/vendor/modules.txt +++ b/index/generator/vendor/modules.txt @@ -84,7 +84,7 @@ github.com/cyphar/filepath-securejoin # github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc ## explicit github.com/davecgh/go-spew/spew -# github.com/devfile/api/v2 v2.2.1 +# github.com/devfile/api/v2 v2.2.2 ## explicit; go 1.18 github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2 github.com/devfile/api/v2/pkg/attributes @@ -93,7 +93,7 @@ github.com/devfile/api/v2/pkg/utils/overriding github.com/devfile/api/v2/pkg/utils/unions github.com/devfile/api/v2/pkg/validation github.com/devfile/api/v2/pkg/validation/variables -# github.com/devfile/library/v2 v2.2.2-0.20240315205431-44ca18d63cf4 +# github.com/devfile/library/v2 v2.2.2 ## explicit; go 1.19 github.com/devfile/library/v2/pkg/devfile github.com/devfile/library/v2/pkg/devfile/parser @@ -111,7 +111,7 @@ github.com/devfile/library/v2/pkg/devfile/parser/util github.com/devfile/library/v2/pkg/devfile/validate github.com/devfile/library/v2/pkg/testingutil/filesystem github.com/devfile/library/v2/pkg/util -# github.com/devfile/registry-support/registry-library v0.0.0-20240311160550-e51ee8934746 +# github.com/devfile/registry-support/registry-library v0.0.0-20240328155806-7c89891a72ce ## explicit; go 1.19 github.com/devfile/registry-support/registry-library/library # github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2