From 440e9bd445b6a3e10cdc0436acc585863ebbe0b2 Mon Sep 17 00:00:00 2001 From: Michael Valdron Date: Wed, 6 Mar 2024 19:04:50 -0500 Subject: [PATCH 1/8] go 1.19 Signed-off-by: Michael Valdron --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index de5be4da..6dd57193 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/devfile/library/v2 -go 1.18 +go 1.19 require ( github.com/devfile/api/v2 v2.2.1 From 19de388fc6d2f7882d8ba2c7408364d9070b0419 Mon Sep 17 00:00:00 2001 From: Michael Valdron Date: Wed, 6 Mar 2024 19:08:49 -0500 Subject: [PATCH 2/8] use go version under go.mod for setting up go in workflows Signed-off-by: Michael Valdron --- .github/workflows/codecov.yml | 2 +- .github/workflows/go.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 0ef5dfb1..1382f0a2 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: 1.19 + go-version-file: 'go.mod' - name: Run tests run: make test - name: Codecov diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e16698ad..da20111f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,15 +13,15 @@ jobs: runs-on: ubuntu-latest steps: + - name: Check out code into the Go module directory + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - name: Setup Go environment uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: 1.19 + go-version-file: 'go.mod' id: go - - name: Check out code into the Go module directory - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - name: Check go mod status run: | make gomod_tidy From a72c4456fd8600715e73c3259ffec4fe0019a2a2 Mon Sep 17 00:00:00 2001 From: Michael Valdron Date: Thu, 7 Mar 2024 19:52:41 -0500 Subject: [PATCH 3/8] refactor out ioutil package Signed-off-by: Michael Valdron --- pkg/devfile/parser/parse.go | 3 +- pkg/devfile/parser/parse_test.go | 5 +- pkg/testingutil/filesystem/default_fs.go | 56 ++++++++++++++----- pkg/testingutil/filesystem/filesystem.go | 4 +- pkg/util/httpcache.go | 13 ++++- pkg/util/util.go | 19 +++++-- pkg/util/util_test.go | 20 +++---- replaceSchemaFile.go | 3 +- tests/v2/utils/library/command_test_utils.go | 6 +- .../v2/utils/library/component_test_utils.go | 6 +- tests/v2/utils/library/project_test_utils.go | 18 +++--- 11 files changed, 99 insertions(+), 54 deletions(-) diff --git a/pkg/devfile/parser/parse.go b/pkg/devfile/parser/parse.go index 26ded19e..bfb3cd4a 100644 --- a/pkg/devfile/parser/parse.go +++ b/pkg/devfile/parser/parse.go @@ -19,7 +19,6 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" "net/url" "os" "path" @@ -573,7 +572,7 @@ func getDevfileFromRegistry(id, registryURL, version string, httpTimeout *int) ( } func getResourcesFromRegistry(id, registryURL, destDir string) error { - stackDir, err := ioutil.TempDir(os.TempDir(), fmt.Sprintf("registry-resources-%s", id)) + stackDir, err := os.MkdirTemp(os.TempDir(), fmt.Sprintf("registry-resources-%s", id)) if err != nil { return fmt.Errorf("failed to create dir: %s, error: %v", stackDir, err) } diff --git a/pkg/devfile/parser/parse_test.go b/pkg/devfile/parser/parse_test.go index 83ce13b7..1534f10b 100644 --- a/pkg/devfile/parser/parse_test.go +++ b/pkg/devfile/parser/parse_test.go @@ -19,7 +19,6 @@ import ( "bytes" "context" "fmt" - "io/ioutil" "net" "net/http" "net/http/httptest" @@ -4095,7 +4094,7 @@ func Test_parseFromURI(t *testing.T) { if err != nil { fmt.Errorf("Test_parseFromURI() error: failed to marshall devfile data: %v", err) } - err = ioutil.WriteFile(localRelativeURI, yamlData, 0644) + err = os.WriteFile(localRelativeURI, yamlData, 0644) if err != nil { fmt.Errorf("Test_parseFromURI() error: fail to write to file: %v", err) } @@ -5180,7 +5179,7 @@ spec: fmt.Errorf("Test_getKubernetesDefinitionFromUri() error: failed to create folder: %v, error: %v", path.Dir(localDeployFilePath), err) } - err = ioutil.WriteFile(localDeployFilePath, []byte(deployContent), 0644) + err = os.WriteFile(localDeployFilePath, []byte(deployContent), 0644) if err != nil { fmt.Errorf("Test_getKubernetesDefinitionFromUri() error: fail to write to file: %v", err) } diff --git a/pkg/testingutil/filesystem/default_fs.go b/pkg/testingutil/filesystem/default_fs.go index 9eea63fc..155a85e3 100644 --- a/pkg/testingutil/filesystem/default_fs.go +++ b/pkg/testingutil/filesystem/default_fs.go @@ -22,13 +22,12 @@ limitations under the License. package filesystem import ( - "io/ioutil" "os" "path/filepath" "time" ) -// DefaultFs implements Filesystem using same-named functions from "os" and "io/ioutil" +// DefaultFs implements Filesystem using same-named functions from "os" type DefaultFs struct{} var _ Filesystem = DefaultFs{} @@ -97,33 +96,64 @@ func (DefaultFs) Getwd() (dir string, err error) { return os.Getwd() } -// ReadFile via ioutil.ReadFile +// ReadFile via os.ReadFile func (DefaultFs) ReadFile(filename string) ([]byte, error) { - return ioutil.ReadFile(filename) + return os.ReadFile(filename) } -// WriteFile via ioutil.WriteFile +// WriteFile via os.WriteFile func (DefaultFs) WriteFile(filename string, data []byte, perm os.FileMode) error { - return ioutil.WriteFile(filename, data, perm) + return os.WriteFile(filename, data, perm) +} + +// MkdirTemp via os.MkdirTemp +func (DefaultFs) MkdirTemp(dir, prefix string) (string, error) { + return os.MkdirTemp(dir, prefix) } // TempDir via ioutil.TempDir -func (DefaultFs) TempDir(dir, prefix string) (string, error) { - return ioutil.TempDir(dir, prefix) +// Deprecated: as ioutil.TempDir is deprecated TempDir is replaced by MkdirTemp which uses os.MkdirTemp. +// TempDir now uses MkdirTemp. +func (fs DefaultFs) TempDir(dir, prefix string) (string, error) { + return fs.MkdirTemp(dir, prefix) } -// TempFile via ioutil.TempFile -func (DefaultFs) TempFile(dir, prefix string) (File, error) { - file, err := ioutil.TempFile(dir, prefix) +// CreateTemp via os.CreateTemp +func (DefaultFs) CreateTemp(dir, prefix string) (File, error) { + file, err := os.CreateTemp(dir, prefix) if err != nil { return nil, err } return &defaultFile{file}, nil } -// ReadDir via ioutil.ReadDir +// TempFile via ioutil.TempFile +// Deprecated: as ioutil.TempFile is deprecated TempFile is replaced by CreateTemp which uses os.CreateTemp. +// TempFile now uses CreateTemp. +func (fs DefaultFs) TempFile(dir, prefix string) (File, error) { + return fs.CreateTemp(dir, prefix) +} + +// ReadDir via os.ReadDir func (DefaultFs) ReadDir(dirname string) ([]os.FileInfo, error) { - return ioutil.ReadDir(dirname) + dirEntries, err := os.ReadDir(dirname) + + if err != nil { + return []os.FileInfo{}, err + } + + dirsInfo := make([]os.FileInfo, 0, len(dirEntries)) + for _, dirEntry := range dirEntries { + info, err := dirEntry.Info() + + if err != nil { + return dirsInfo, err + } + + dirsInfo = append(dirsInfo, info) + } + + return dirsInfo, nil } // Walk via filepath.Walk diff --git a/pkg/testingutil/filesystem/filesystem.go b/pkg/testingutil/filesystem/filesystem.go index e71b6ffc..3efb95ea 100644 --- a/pkg/testingutil/filesystem/filesystem.go +++ b/pkg/testingutil/filesystem/filesystem.go @@ -41,13 +41,13 @@ type Filesystem interface { Remove(name string) error Chmod(name string, mode os.FileMode) error Getwd() (dir string, err error) - - // from "io/ioutil" ReadFile(filename string) ([]byte, error) WriteFile(filename string, data []byte, perm os.FileMode) error TempDir(dir, prefix string) (string, error) TempFile(dir, prefix string) (File, error) ReadDir(dirname string) ([]os.FileInfo, error) + + // from "filepath" Walk(root string, walkFn filepath.WalkFunc) error } diff --git a/pkg/util/httpcache.go b/pkg/util/httpcache.go index 8efa0a94..8a45ff68 100644 --- a/pkg/util/httpcache.go +++ b/pkg/util/httpcache.go @@ -16,7 +16,6 @@ package util import ( - "io/ioutil" "os" "path/filepath" "time" @@ -26,11 +25,21 @@ import ( // cleanHttpCache checks cacheDir and deletes all files that were modified more than cacheTime back func cleanHttpCache(cacheDir string, cacheTime time.Duration) error { - cacheFiles, err := ioutil.ReadDir(cacheDir) + cacheEntries, err := os.ReadDir(cacheDir) if err != nil { return err } + cacheFiles := make([]os.FileInfo, 0, len(cacheEntries)) + for _, cacheEntry := range cacheEntries { + info, err := cacheEntry.Info() + if err != nil { + return err + } + + cacheFiles = append(cacheFiles, info) + } + for _, f := range cacheFiles { if f.ModTime().Add(cacheTime).Before(time.Now()) { klog.V(4).Infof("Removing cache file %s, because it is older than %s", f.Name(), cacheTime.String()) diff --git a/pkg/util/util.go b/pkg/util/util.go index e4c2eda6..057bdccd 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -22,7 +22,6 @@ import ( "crypto/rand" "fmt" "io" - "io/ioutil" "math/big" "net" "net/http" @@ -820,7 +819,7 @@ func HTTPGetRequest(request HTTPRequestParams, cacheFor int) ([]byte, error) { } // Process http response - bytes, err := ioutil.ReadAll(resp.Body) + bytes, err := io.ReadAll(resp.Body) if err != nil { return nil, err } @@ -856,11 +855,21 @@ func FilterIgnores(filesChanged, filesDeleted, absIgnoreRules []string) (filesCh // IsValidProjectDir checks that the folder to download the project from devfile is // either empty or only contains the devfile used. func IsValidProjectDir(path string, devfilePath string) error { - files, err := ioutil.ReadDir(path) + fileEntries, err := os.ReadDir(path) if err != nil { return err } + files := make([]os.FileInfo, 0, len(fileEntries)) + for _, fileEntry := range fileEntries { + info, err := fileEntry.Info() + if err != nil { + return err + } + + files = append(files, info) + } + if len(files) > 1 { return errors.Errorf("Folder %s is not empty. It can only contain the devfile used.", path) } else if len(files) == 1 { @@ -1091,7 +1100,7 @@ func DownloadFileInMemory(url string) ([]byte, error) { } defer resp.Body.Close() - return ioutil.ReadAll(resp.Body) + return io.ReadAll(resp.Body) } // DownloadInMemory uses HTTPRequestParams to download the file and return bytes. @@ -1147,7 +1156,7 @@ func (g *GitUrl) downloadInMemoryWithClient(params HTTPRequestParams, httpClient } defer resp.Body.Close() - return ioutil.ReadAll(resp.Body) + return io.ReadAll(resp.Body) } // ValidateK8sResourceName sanitizes kubernetes resource name with the following requirements: diff --git a/pkg/util/util_test.go b/pkg/util/util_test.go index 19961b0c..795b8be4 100644 --- a/pkg/util/util_test.go +++ b/pkg/util/util_test.go @@ -17,11 +17,6 @@ package util import ( "fmt" - "github.com/devfile/library/v2/pkg/testingutil/filesystem" - "github.com/kylelemons/godebug/pretty" - "github.com/stretchr/testify/assert" - "io/ioutil" - corev1 "k8s.io/api/core/v1" "net" "net/http" "net/http/httptest" @@ -33,6 +28,11 @@ import ( "runtime" "strconv" "testing" + + "github.com/devfile/library/v2/pkg/testingutil/filesystem" + "github.com/kylelemons/godebug/pretty" + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" ) func TestNamespaceOpenShiftObject(t *testing.T) { @@ -919,7 +919,7 @@ func TestDownloadFile(t *testing.T) { t.Errorf("Failed to download file with error %s", err) } - got, err := ioutil.ReadFile(tt.filepath) + got, err := os.ReadFile(tt.filepath) if err != nil { t.Errorf("Failed to read file with error %s", err) } @@ -1043,11 +1043,11 @@ func TestValidateK8sResourceName(t *testing.T) { func TestValidateFile(t *testing.T) { // Create temp dir and temp file - tempDir, err := ioutil.TempDir("", "") + tempDir, err := os.MkdirTemp("", "") if err != nil { t.Errorf("Failed to create temp dir: %s, error: %v", tempDir, err) } - tempFile, err := ioutil.TempFile(tempDir, "") + tempFile, err := os.CreateTemp(tempDir, "") if err != nil { t.Errorf("Failed to create temp file: %s, error: %v", tempFile.Name(), err) } @@ -1086,13 +1086,13 @@ func TestValidateFile(t *testing.T) { func TestCopyFile(t *testing.T) { // Create temp dir - tempDir, err := ioutil.TempDir("", "") + tempDir, err := os.MkdirTemp("", "") if err != nil { t.Errorf("Failed to create temp dir: %s, error: %v", tempDir, err) } // Create temp file under temp dir as source file - tempFile, err := ioutil.TempFile(tempDir, "") + tempFile, err := os.CreateTemp(tempDir, "") if err != nil { t.Errorf("Failed to create temp file: %s, error: %v", tempFile.Name(), err) } diff --git a/replaceSchemaFile.go b/replaceSchemaFile.go index ade02f84..ab478a19 100644 --- a/replaceSchemaFile.go +++ b/replaceSchemaFile.go @@ -17,7 +17,6 @@ package main import ( "fmt" - "io/ioutil" "os" "strings" ) @@ -38,7 +37,7 @@ func ReplaceSchemaFile() { fmt.Printf("Writing to file: %s\n", filePath) fileContent := fmt.Sprintf("package %s\n\n// %s\nconst %s = `%s\n`\n", packageVersion, schemaURL, jsonSchemaVersion, newSchema) - if err := ioutil.WriteFile(filePath, []byte(fileContent), 0644); err != nil { + if err := os.WriteFile(filePath, []byte(fileContent), 0644); err != nil { printErr(err) os.Exit(1) } diff --git a/tests/v2/utils/library/command_test_utils.go b/tests/v2/utils/library/command_test_utils.go index 020f3a57..f36d36f5 100644 --- a/tests/v2/utils/library/command_test_utils.go +++ b/tests/v2/utils/library/command_test_utils.go @@ -18,7 +18,7 @@ package utils import ( "errors" "fmt" - "io/ioutil" + "os" "github.com/google/go-cmp/cmp" "sigs.k8s.io/yaml" @@ -81,7 +81,7 @@ func VerifyCommands(devfile *commonUtils.TestDevfile, parserCommands []schema.Co if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......marshall devfile %s", parserFilename))) } else { - err = ioutil.WriteFile(parserFilename, c, 0644) + err = os.WriteFile(parserFilename, c, 0644) if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......write devfile %s", parserFilename))) } @@ -91,7 +91,7 @@ func VerifyCommands(devfile *commonUtils.TestDevfile, parserCommands []schema.Co if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......marshall devfile %s", testFilename))) } else { - err = ioutil.WriteFile(testFilename, c, 0644) + err = os.WriteFile(testFilename, c, 0644) if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......write devfile %s", testFilename))) } diff --git a/tests/v2/utils/library/component_test_utils.go b/tests/v2/utils/library/component_test_utils.go index 45afc239..f9df63e3 100644 --- a/tests/v2/utils/library/component_test_utils.go +++ b/tests/v2/utils/library/component_test_utils.go @@ -18,7 +18,7 @@ package utils import ( "errors" "fmt" - "io/ioutil" + "os" schema "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" commonUtils "github.com/devfile/api/v2/test/v200/utils/common" @@ -87,7 +87,7 @@ func VerifyComponents(devfile *commonUtils.TestDevfile, parserComponents []schem if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......marshall devfile %s", parserFilename))) } else { - err = ioutil.WriteFile(parserFilename, c, 0644) + err = os.WriteFile(parserFilename, c, 0644) if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......write devfile %s", parserFilename))) } @@ -97,7 +97,7 @@ func VerifyComponents(devfile *commonUtils.TestDevfile, parserComponents []schem if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......marshall devfile %s", testFilename))) } else { - err = ioutil.WriteFile(testFilename, c, 0644) + err = os.WriteFile(testFilename, c, 0644) if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......write devfile %s", testFilename))) } diff --git a/tests/v2/utils/library/project_test_utils.go b/tests/v2/utils/library/project_test_utils.go index cac9c7df..b4beae0d 100644 --- a/tests/v2/utils/library/project_test_utils.go +++ b/tests/v2/utils/library/project_test_utils.go @@ -18,7 +18,7 @@ package utils import ( "errors" "fmt" - "io/ioutil" + "os" "github.com/google/go-cmp/cmp" "sigs.k8s.io/yaml" @@ -93,7 +93,7 @@ func VerifyProjects(devfile *commonUtils.TestDevfile, parserProjects []schema.Pr // Compare entire array of projects if !cmp.Equal(parserProjects, devfile.SchemaDevFile.Projects) { // Compare failed so compare each project to find which one(s) don't compare - errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Project array compare failed."))) + errorString = append(errorString, commonUtils.LogErrorMessage("Project array compare failed.")) for _, project := range parserProjects { if testProject, found := getSchemaProject(devfile.SchemaDevFile.Projects, project.Name); found { if !cmp.Equal(project, *testProject) { @@ -105,7 +105,7 @@ func VerifyProjects(devfile *commonUtils.TestDevfile, parserProjects []schema.Pr if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......marshall devfile %s", parserFilename))) } else { - err = ioutil.WriteFile(parserFilename, c, 0644) + err = os.WriteFile(parserFilename, c, 0644) if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......write devfile %s", parserFilename))) } @@ -115,7 +115,7 @@ func VerifyProjects(devfile *commonUtils.TestDevfile, parserProjects []schema.Pr if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......marshall devfile %s", testFilename))) } else { - err = ioutil.WriteFile(testFilename, c, 0644) + err = os.WriteFile(testFilename, c, 0644) if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......write devfile %s", testFilename))) } @@ -135,7 +135,7 @@ func VerifyProjects(devfile *commonUtils.TestDevfile, parserProjects []schema.Pr } } } else { - commonUtils.LogInfoMessage(fmt.Sprintf("Project structures matched")) + commonUtils.LogInfoMessage("Project structures matched") } var err error @@ -154,7 +154,7 @@ func VerifyStarterProjects(devfile *commonUtils.TestDevfile, parserStarterProjec // Compare entire array of projects if !cmp.Equal(parserStarterProjects, devfile.SchemaDevFile.StarterProjects) { // Compare failed so compare each project to find which one(s) don't compare - errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Starter Project array compare failed."))) + errorString = append(errorString, commonUtils.LogErrorMessage("Starter Project array compare failed.")) for _, starterProject := range parserStarterProjects { if testStarterProject, found := getSchemaStarterProject(devfile.SchemaDevFile.StarterProjects, starterProject.Name); found { if !cmp.Equal(starterProject, *testStarterProject) { @@ -166,7 +166,7 @@ func VerifyStarterProjects(devfile *commonUtils.TestDevfile, parserStarterProjec if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......marshall devfile %s", parserFilename))) } else { - err = ioutil.WriteFile(parserFilename, c, 0644) + err = os.WriteFile(parserFilename, c, 0644) if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......write devfile %s", parserFilename))) } @@ -176,7 +176,7 @@ func VerifyStarterProjects(devfile *commonUtils.TestDevfile, parserStarterProjec if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......marshall devfile %s", testFilename))) } else { - err = ioutil.WriteFile(testFilename, c, 0644) + err = os.WriteFile(testFilename, c, 0644) if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......write devfile %s", testFilename))) } @@ -196,7 +196,7 @@ func VerifyStarterProjects(devfile *commonUtils.TestDevfile, parserStarterProjec } } } else { - commonUtils.LogInfoMessage(fmt.Sprintf("Starter Project structures matched")) + commonUtils.LogInfoMessage("Starter Project structures matched") } var err error From 1cb7d3dc58cb40a22d2c4fe785cbf49dec3c49b0 Mon Sep 17 00:00:00 2001 From: Michael Valdron Date: Fri, 8 Mar 2024 14:26:07 -0500 Subject: [PATCH 4/8] update license headers Signed-off-by: Michael Valdron --- .clomonitor.yml | 15 +++++++++++++++ .codecov.yaml | 15 +++++++++++++++ .github/workflows/codecov.yml | 14 ++++++++++++++ .github/workflows/go.yml | 14 ++++++++++++++ .github/workflows/proxy-warming.yml | 14 ++++++++++++++ .github/workflows/scorecard.yml | 15 +++++++++++++++ Makefile | 15 +++++++++++++++ SECURITY-INSIGHTS.yml | 14 ++++++++++++++ devfile.yaml | 15 +++++++++++++++ main.go | 2 +- pkg/devfile/generator/generators.go | 2 +- pkg/devfile/generator/generators_test.go | 2 +- pkg/devfile/generator/policy.go | 2 +- pkg/devfile/generator/utils.go | 2 +- pkg/devfile/generator/utils_test.go | 2 +- pkg/devfile/imageNameSelector.go | 2 +- pkg/devfile/imageNameSelector_test.go | 2 +- pkg/devfile/parse.go | 2 +- pkg/devfile/parse_test.go | 2 +- pkg/devfile/parser/configurables.go | 2 +- pkg/devfile/parser/context/apiVersion.go | 2 +- pkg/devfile/parser/context/apiVersion_test.go | 2 +- pkg/devfile/parser/context/content.go | 2 +- pkg/devfile/parser/context/content_test.go | 2 +- pkg/devfile/parser/context/context.go | 2 +- pkg/devfile/parser/context/context_test.go | 2 +- pkg/devfile/parser/context/fakecontext.go | 2 +- pkg/devfile/parser/context/fs.go | 2 +- pkg/devfile/parser/context/location.go | 2 +- pkg/devfile/parser/context/location_test.go | 2 +- pkg/devfile/parser/context/schema.go | 2 +- pkg/devfile/parser/context/schema_test.go | 5 +++-- pkg/devfile/parser/data/helper.go | 2 +- pkg/devfile/parser/data/helper_test.go | 2 +- pkg/devfile/parser/data/interface.go | 2 +- .../parser/data/v2/2.0.0/devfileJsonSchema200.go | 2 +- .../parser/data/v2/2.1.0/devfileJsonSchema210.go | 2 +- pkg/devfile/parser/data/v2/attributes.go | 2 +- pkg/devfile/parser/data/v2/attributes_test.go | 5 +++-- pkg/devfile/parser/data/v2/commands.go | 7 ++++--- pkg/devfile/parser/data/v2/commands_test.go | 5 +++-- .../parser/data/v2/common/command_helper.go | 2 +- .../parser/data/v2/common/command_helper_test.go | 5 +++-- .../parser/data/v2/common/component_helper.go | 2 +- .../data/v2/common/component_helper_test.go | 5 +++-- pkg/devfile/parser/data/v2/common/errors.go | 2 +- pkg/devfile/parser/data/v2/common/options.go | 2 +- .../parser/data/v2/common/options_test.go | 2 +- .../parser/data/v2/common/project_helper.go | 2 +- .../parser/data/v2/common/project_helper_test.go | 5 +++-- pkg/devfile/parser/data/v2/components.go | 2 +- pkg/devfile/parser/data/v2/components_test.go | 5 +++-- pkg/devfile/parser/data/v2/containers.go | 2 +- pkg/devfile/parser/data/v2/containers_test.go | 2 +- pkg/devfile/parser/data/v2/events.go | 5 +++-- pkg/devfile/parser/data/v2/events_test.go | 7 ++++--- pkg/devfile/parser/data/v2/header.go | 2 +- pkg/devfile/parser/data/v2/header_test.go | 2 +- pkg/devfile/parser/data/v2/parent.go | 2 +- pkg/devfile/parser/data/v2/parent_test.go | 2 +- pkg/devfile/parser/data/v2/projects.go | 7 ++++--- pkg/devfile/parser/data/v2/projects_test.go | 2 +- pkg/devfile/parser/data/v2/types.go | 2 +- pkg/devfile/parser/data/v2/volumes.go | 2 +- pkg/devfile/parser/data/v2/volumes_test.go | 2 +- pkg/devfile/parser/data/v2/workspace.go | 2 +- pkg/devfile/parser/data/v2/workspace_test.go | 2 +- pkg/devfile/parser/data/versions.go | 2 +- pkg/devfile/parser/devfileobj.go | 2 +- pkg/devfile/parser/errors/errors.go | 2 +- pkg/devfile/parser/parse.go | 2 +- pkg/devfile/parser/parse_test.go | 2 +- pkg/devfile/parser/reader.go | 2 +- pkg/devfile/parser/reader_test.go | 2 +- pkg/devfile/parser/resolutionContext.go | 2 +- pkg/devfile/parser/sourceAttribute.go | 2 +- pkg/devfile/parser/sourceAttribute_test.go | 7 ++++--- pkg/devfile/parser/util/interface.go | 2 +- pkg/devfile/parser/util/mock.go | 2 +- pkg/devfile/parser/util/utils.go | 2 +- pkg/devfile/parser/util/utils_test.go | 2 +- pkg/devfile/parser/utils.go | 2 +- pkg/devfile/parser/utils_test.go | 2 +- pkg/devfile/parser/writer.go | 2 +- pkg/devfile/parser/writer_test.go | 2 +- pkg/devfile/validate/validate.go | 3 ++- pkg/testingutil/containers.go | 2 +- pkg/testingutil/devfile.go | 2 +- pkg/testingutil/filesystem/singleton.go | 2 +- pkg/testingutil/k8sClient.go | 2 +- pkg/testingutil/resources.go | 2 +- pkg/util/git.go | 2 +- pkg/util/git_test.go | 7 ++++--- pkg/util/httpcache.go | 2 +- pkg/util/mock.go | 2 +- pkg/util/util.go | 2 +- pkg/util/util_test.go | 2 +- replaceSchemaFile.go | 2 +- scripts/changelog-script.sh | 16 +++++++++++++++- scripts/updateApi.sh | 15 +++++++++++++++ tests/v2/libraryTest/library_test.go | 2 +- tests/v2/utils/library/command_test_utils.go | 2 +- tests/v2/utils/library/component_test_utils.go | 2 +- tests/v2/utils/library/project_test_utils.go | 2 +- tests/v2/utils/library/test_utils.go | 2 +- 105 files changed, 287 insertions(+), 113 deletions(-) diff --git a/.clomonitor.yml b/.clomonitor.yml index 3b610097..80633885 100644 --- a/.clomonitor.yml +++ b/.clomonitor.yml @@ -1,3 +1,18 @@ +# +# Copyright Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # CLOMonitor metadata file # This file must be located at the root of the repository diff --git a/.codecov.yaml b/.codecov.yaml index 4bff7045..95789fda 100644 --- a/.codecov.yaml +++ b/.codecov.yaml @@ -1,3 +1,18 @@ +# +# Copyright Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # See http://docs.codecov.io/docs/coverage-configuration coverage: precision: 2 # 2 = xx.xx%, 0 = xx% diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 1382f0a2..56706648 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,3 +1,17 @@ +# +# Copyright Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. name: Code Coverage Report on: push: diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index da20111f..2ae009ed 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,3 +1,17 @@ +# +# Copyright Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. name: Validate PRs on: diff --git a/.github/workflows/proxy-warming.yml b/.github/workflows/proxy-warming.yml index a63b7148..51cf9c15 100644 --- a/.github/workflows/proxy-warming.yml +++ b/.github/workflows/proxy-warming.yml @@ -1,3 +1,17 @@ +# +# Copyright Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. name: Renew documentation on: diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 88bea15b..8cf248d1 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -1,3 +1,18 @@ +# +# Copyright Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # This workflow uses actions that are not certified by GitHub. They are provided # by a third-party and are governed by separate terms of service, privacy # policy, and support documentation. diff --git a/Makefile b/Makefile index f4c95d6c..bed0ecfa 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,18 @@ +# +# Copyright Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + FILES := main default: bin diff --git a/SECURITY-INSIGHTS.yml b/SECURITY-INSIGHTS.yml index c7d0a004..edced808 100644 --- a/SECURITY-INSIGHTS.yml +++ b/SECURITY-INSIGHTS.yml @@ -1,3 +1,17 @@ +# +# Copyright Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. header: schema-version: 1.0.0 last-updated: '2024-03-01' diff --git a/devfile.yaml b/devfile.yaml index b683cd0e..acb4d6db 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -1,3 +1,18 @@ +# +# Copyright Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + schemaVersion: 2.2.0-latest metadata: name: nodejs diff --git a/main.go b/main.go index f2b37482..65ff0965 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/generator/generators.go b/pkg/devfile/generator/generators.go index 547433e5..3b1ffd4c 100644 --- a/pkg/devfile/generator/generators.go +++ b/pkg/devfile/generator/generators.go @@ -1,5 +1,5 @@ // -// Copyright 2022-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/generator/generators_test.go b/pkg/devfile/generator/generators_test.go index 9869672e..e5c13868 100644 --- a/pkg/devfile/generator/generators_test.go +++ b/pkg/devfile/generator/generators_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/generator/policy.go b/pkg/devfile/generator/policy.go index c0b83dd1..45412165 100644 --- a/pkg/devfile/generator/policy.go +++ b/pkg/devfile/generator/policy.go @@ -1,5 +1,5 @@ // -// Copyright 2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/generator/utils.go b/pkg/devfile/generator/utils.go index 8d8bce28..c29cfb70 100644 --- a/pkg/devfile/generator/utils.go +++ b/pkg/devfile/generator/utils.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/generator/utils_test.go b/pkg/devfile/generator/utils_test.go index 3a893f93..3499e660 100644 --- a/pkg/devfile/generator/utils_test.go +++ b/pkg/devfile/generator/utils_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/imageNameSelector.go b/pkg/devfile/imageNameSelector.go index 5dce1554..72d7e344 100644 --- a/pkg/devfile/imageNameSelector.go +++ b/pkg/devfile/imageNameSelector.go @@ -1,5 +1,5 @@ // -// Copyright 2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/imageNameSelector_test.go b/pkg/devfile/imageNameSelector_test.go index ca4dfec8..f9227d49 100644 --- a/pkg/devfile/imageNameSelector_test.go +++ b/pkg/devfile/imageNameSelector_test.go @@ -1,5 +1,5 @@ // -// Copyright 2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parse.go b/pkg/devfile/parse.go index d9a3ab0f..95d9e879 100644 --- a/pkg/devfile/parse.go +++ b/pkg/devfile/parse.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parse_test.go b/pkg/devfile/parse_test.go index 68daae17..a94cbf60 100644 --- a/pkg/devfile/parse_test.go +++ b/pkg/devfile/parse_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/configurables.go b/pkg/devfile/parser/configurables.go index 5d53c482..6d281b52 100644 --- a/pkg/devfile/parser/configurables.go +++ b/pkg/devfile/parser/configurables.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/context/apiVersion.go b/pkg/devfile/parser/context/apiVersion.go index 5ceffe6a..412ae315 100644 --- a/pkg/devfile/parser/context/apiVersion.go +++ b/pkg/devfile/parser/context/apiVersion.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/context/apiVersion_test.go b/pkg/devfile/parser/context/apiVersion_test.go index 05ea9f2a..a12aa9d8 100644 --- a/pkg/devfile/parser/context/apiVersion_test.go +++ b/pkg/devfile/parser/context/apiVersion_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/context/content.go b/pkg/devfile/parser/context/content.go index cc83b719..60abb660 100644 --- a/pkg/devfile/parser/context/content.go +++ b/pkg/devfile/parser/context/content.go @@ -1,5 +1,5 @@ // -// Copyright 2022-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/context/content_test.go b/pkg/devfile/parser/context/content_test.go index 9f6ee3fa..abc67362 100644 --- a/pkg/devfile/parser/context/content_test.go +++ b/pkg/devfile/parser/context/content_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/context/context.go b/pkg/devfile/parser/context/context.go index 413b6b46..fe1ac634 100644 --- a/pkg/devfile/parser/context/context.go +++ b/pkg/devfile/parser/context/context.go @@ -1,5 +1,5 @@ // -// Copyright 2022-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/context/context_test.go b/pkg/devfile/parser/context/context_test.go index 3d93c6e7..abe80385 100644 --- a/pkg/devfile/parser/context/context_test.go +++ b/pkg/devfile/parser/context/context_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/context/fakecontext.go b/pkg/devfile/parser/context/fakecontext.go index 8c286a47..fbc70489 100644 --- a/pkg/devfile/parser/context/fakecontext.go +++ b/pkg/devfile/parser/context/fakecontext.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/context/fs.go b/pkg/devfile/parser/context/fs.go index 56f1fde3..16cf41e1 100644 --- a/pkg/devfile/parser/context/fs.go +++ b/pkg/devfile/parser/context/fs.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/context/location.go b/pkg/devfile/parser/context/location.go index 559bb817..5cbe3200 100644 --- a/pkg/devfile/parser/context/location.go +++ b/pkg/devfile/parser/context/location.go @@ -1,5 +1,5 @@ // -// Copyright Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/context/location_test.go b/pkg/devfile/parser/context/location_test.go index 8358a7f9..1b2b2704 100644 --- a/pkg/devfile/parser/context/location_test.go +++ b/pkg/devfile/parser/context/location_test.go @@ -1,5 +1,5 @@ // -// Copyright Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/context/schema.go b/pkg/devfile/parser/context/schema.go index d5c32b06..e1972383 100644 --- a/pkg/devfile/parser/context/schema.go +++ b/pkg/devfile/parser/context/schema.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/context/schema_test.go b/pkg/devfile/parser/context/schema_test.go index 4d14eb2e..f7d29f0f 100644 --- a/pkg/devfile/parser/context/schema_test.go +++ b/pkg/devfile/parser/context/schema_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,9 +16,10 @@ package parser import ( - "github.com/stretchr/testify/assert" "testing" + "github.com/stretchr/testify/assert" + v200 "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/2.0.0" ) diff --git a/pkg/devfile/parser/data/helper.go b/pkg/devfile/parser/data/helper.go index 7ce98456..952b35fb 100644 --- a/pkg/devfile/parser/data/helper.go +++ b/pkg/devfile/parser/data/helper.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/helper_test.go b/pkg/devfile/parser/data/helper_test.go index da3d0f7c..d29ae474 100644 --- a/pkg/devfile/parser/data/helper_test.go +++ b/pkg/devfile/parser/data/helper_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/interface.go b/pkg/devfile/parser/data/interface.go index a24a06ed..f22bd40e 100644 --- a/pkg/devfile/parser/data/interface.go +++ b/pkg/devfile/parser/data/interface.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/2.0.0/devfileJsonSchema200.go b/pkg/devfile/parser/data/v2/2.0.0/devfileJsonSchema200.go index 431d5fc0..79320e15 100644 --- a/pkg/devfile/parser/data/v2/2.0.0/devfileJsonSchema200.go +++ b/pkg/devfile/parser/data/v2/2.0.0/devfileJsonSchema200.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/2.1.0/devfileJsonSchema210.go b/pkg/devfile/parser/data/v2/2.1.0/devfileJsonSchema210.go index c92b7a75..3ae5ee14 100644 --- a/pkg/devfile/parser/data/v2/2.1.0/devfileJsonSchema210.go +++ b/pkg/devfile/parser/data/v2/2.1.0/devfileJsonSchema210.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/attributes.go b/pkg/devfile/parser/data/v2/attributes.go index 6d7ba88a..871db25c 100644 --- a/pkg/devfile/parser/data/v2/attributes.go +++ b/pkg/devfile/parser/data/v2/attributes.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/attributes_test.go b/pkg/devfile/parser/data/v2/attributes_test.go index c869d849..3ac0bc12 100644 --- a/pkg/devfile/parser/data/v2/attributes_test.go +++ b/pkg/devfile/parser/data/v2/attributes_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,10 +16,11 @@ package v2 import ( - "github.com/stretchr/testify/assert" "reflect" "testing" + "github.com/stretchr/testify/assert" + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/api/v2/pkg/attributes" devfilepkg "github.com/devfile/api/v2/pkg/devfile" diff --git a/pkg/devfile/parser/data/v2/commands.go b/pkg/devfile/parser/data/v2/commands.go index 02e4b57a..30f2dc14 100644 --- a/pkg/devfile/parser/data/v2/commands.go +++ b/pkg/devfile/parser/data/v2/commands.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,11 @@ package v2 import ( "fmt" - v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" - "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common" "reflect" "strings" + + v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common" ) // GetCommands returns the slice of Command objects parsed from the Devfile diff --git a/pkg/devfile/parser/data/v2/commands_test.go b/pkg/devfile/parser/data/v2/commands_test.go index ff918005..cc852ef2 100644 --- a/pkg/devfile/parser/data/v2/commands_test.go +++ b/pkg/devfile/parser/data/v2/commands_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,11 @@ package v2 import ( "fmt" - "github.com/kylelemons/godebug/pretty" "reflect" "testing" + "github.com/kylelemons/godebug/pretty" + v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/api/v2/pkg/attributes" "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common" diff --git a/pkg/devfile/parser/data/v2/common/command_helper.go b/pkg/devfile/parser/data/v2/common/command_helper.go index f4a5cabf..7f8c492c 100644 --- a/pkg/devfile/parser/data/v2/common/command_helper.go +++ b/pkg/devfile/parser/data/v2/common/command_helper.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/common/command_helper_test.go b/pkg/devfile/parser/data/v2/common/command_helper_test.go index 8be31489..746bfb2f 100644 --- a/pkg/devfile/parser/data/v2/common/command_helper_test.go +++ b/pkg/devfile/parser/data/v2/common/command_helper_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,10 +16,11 @@ package common import ( - "github.com/stretchr/testify/assert" "reflect" "testing" + "github.com/stretchr/testify/assert" + v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" ) diff --git a/pkg/devfile/parser/data/v2/common/component_helper.go b/pkg/devfile/parser/data/v2/common/component_helper.go index fdb34371..78bb8fc2 100644 --- a/pkg/devfile/parser/data/v2/common/component_helper.go +++ b/pkg/devfile/parser/data/v2/common/component_helper.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/common/component_helper_test.go b/pkg/devfile/parser/data/v2/common/component_helper_test.go index f60bf2e8..6afec92d 100644 --- a/pkg/devfile/parser/data/v2/common/component_helper_test.go +++ b/pkg/devfile/parser/data/v2/common/component_helper_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,9 +16,10 @@ package common import ( - "github.com/stretchr/testify/assert" "testing" + "github.com/stretchr/testify/assert" + v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" ) diff --git a/pkg/devfile/parser/data/v2/common/errors.go b/pkg/devfile/parser/data/v2/common/errors.go index fd192d3d..882b5864 100644 --- a/pkg/devfile/parser/data/v2/common/errors.go +++ b/pkg/devfile/parser/data/v2/common/errors.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/common/options.go b/pkg/devfile/parser/data/v2/common/options.go index 4817788e..bb520454 100644 --- a/pkg/devfile/parser/data/v2/common/options.go +++ b/pkg/devfile/parser/data/v2/common/options.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/common/options_test.go b/pkg/devfile/parser/data/v2/common/options_test.go index 1a35c057..5b184654 100644 --- a/pkg/devfile/parser/data/v2/common/options_test.go +++ b/pkg/devfile/parser/data/v2/common/options_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/common/project_helper.go b/pkg/devfile/parser/data/v2/common/project_helper.go index 13291a87..def52e13 100644 --- a/pkg/devfile/parser/data/v2/common/project_helper.go +++ b/pkg/devfile/parser/data/v2/common/project_helper.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/common/project_helper_test.go b/pkg/devfile/parser/data/v2/common/project_helper_test.go index cf1828af..1ef5df55 100644 --- a/pkg/devfile/parser/data/v2/common/project_helper_test.go +++ b/pkg/devfile/parser/data/v2/common/project_helper_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,9 +16,10 @@ package common import ( - "github.com/stretchr/testify/assert" "testing" + "github.com/stretchr/testify/assert" + v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" ) diff --git a/pkg/devfile/parser/data/v2/components.go b/pkg/devfile/parser/data/v2/components.go index 1ea32835..e3d2a564 100644 --- a/pkg/devfile/parser/data/v2/components.go +++ b/pkg/devfile/parser/data/v2/components.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/components_test.go b/pkg/devfile/parser/data/v2/components_test.go index a170e447..bbee3c68 100644 --- a/pkg/devfile/parser/data/v2/components_test.go +++ b/pkg/devfile/parser/data/v2/components_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,11 @@ package v2 import ( "fmt" - "github.com/kylelemons/godebug/pretty" "reflect" "testing" + "github.com/kylelemons/godebug/pretty" + v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/api/v2/pkg/attributes" "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common" diff --git a/pkg/devfile/parser/data/v2/containers.go b/pkg/devfile/parser/data/v2/containers.go index c62ea195..1bca5607 100644 --- a/pkg/devfile/parser/data/v2/containers.go +++ b/pkg/devfile/parser/data/v2/containers.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/containers_test.go b/pkg/devfile/parser/data/v2/containers_test.go index 067d347c..45fb3002 100644 --- a/pkg/devfile/parser/data/v2/containers_test.go +++ b/pkg/devfile/parser/data/v2/containers_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/events.go b/pkg/devfile/parser/data/v2/events.go index d7caf1a8..dd7c63fa 100644 --- a/pkg/devfile/parser/data/v2/events.go +++ b/pkg/devfile/parser/data/v2/events.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,9 +17,10 @@ package v2 import ( "fmt" + "strings" + v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common" - "strings" ) // GetEvents returns the Events Object parsed from devfile diff --git a/pkg/devfile/parser/data/v2/events_test.go b/pkg/devfile/parser/data/v2/events_test.go index 5227f2a9..cdf71131 100644 --- a/pkg/devfile/parser/data/v2/events_test.go +++ b/pkg/devfile/parser/data/v2/events_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,11 +17,12 @@ package v2 import ( "fmt" - "github.com/kylelemons/godebug/pretty" - "github.com/stretchr/testify/assert" "reflect" "testing" + "github.com/kylelemons/godebug/pretty" + "github.com/stretchr/testify/assert" + v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" ) diff --git a/pkg/devfile/parser/data/v2/header.go b/pkg/devfile/parser/data/v2/header.go index 69f7ae5e..4198efa0 100644 --- a/pkg/devfile/parser/data/v2/header.go +++ b/pkg/devfile/parser/data/v2/header.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/header_test.go b/pkg/devfile/parser/data/v2/header_test.go index c04ba630..09376040 100644 --- a/pkg/devfile/parser/data/v2/header_test.go +++ b/pkg/devfile/parser/data/v2/header_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/parent.go b/pkg/devfile/parser/data/v2/parent.go index 932f9323..b08bf965 100644 --- a/pkg/devfile/parser/data/v2/parent.go +++ b/pkg/devfile/parser/data/v2/parent.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/parent_test.go b/pkg/devfile/parser/data/v2/parent_test.go index 3dc0efad..4145847a 100644 --- a/pkg/devfile/parser/data/v2/parent_test.go +++ b/pkg/devfile/parser/data/v2/parent_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/projects.go b/pkg/devfile/parser/data/v2/projects.go index bbd45e43..c8f86167 100644 --- a/pkg/devfile/parser/data/v2/projects.go +++ b/pkg/devfile/parser/data/v2/projects.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,11 @@ package v2 import ( "fmt" - v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" - "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common" "reflect" "strings" + + v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common" ) // GetProjects returns the Project Object parsed from devfile diff --git a/pkg/devfile/parser/data/v2/projects_test.go b/pkg/devfile/parser/data/v2/projects_test.go index c795a952..636b8d3c 100644 --- a/pkg/devfile/parser/data/v2/projects_test.go +++ b/pkg/devfile/parser/data/v2/projects_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/types.go b/pkg/devfile/parser/data/v2/types.go index c35b0d7e..7904fd81 100644 --- a/pkg/devfile/parser/data/v2/types.go +++ b/pkg/devfile/parser/data/v2/types.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/volumes.go b/pkg/devfile/parser/data/v2/volumes.go index 8f3a5d15..9ed9c0e3 100644 --- a/pkg/devfile/parser/data/v2/volumes.go +++ b/pkg/devfile/parser/data/v2/volumes.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/volumes_test.go b/pkg/devfile/parser/data/v2/volumes_test.go index 3884e41b..24c4596f 100644 --- a/pkg/devfile/parser/data/v2/volumes_test.go +++ b/pkg/devfile/parser/data/v2/volumes_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/workspace.go b/pkg/devfile/parser/data/v2/workspace.go index a1793e1a..71e1fdd3 100644 --- a/pkg/devfile/parser/data/v2/workspace.go +++ b/pkg/devfile/parser/data/v2/workspace.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/v2/workspace_test.go b/pkg/devfile/parser/data/v2/workspace_test.go index 07525882..57e87a17 100644 --- a/pkg/devfile/parser/data/v2/workspace_test.go +++ b/pkg/devfile/parser/data/v2/workspace_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/data/versions.go b/pkg/devfile/parser/data/versions.go index 0a92dc32..db1a42b5 100644 --- a/pkg/devfile/parser/data/versions.go +++ b/pkg/devfile/parser/data/versions.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/devfileobj.go b/pkg/devfile/parser/devfileobj.go index 10438960..c090c778 100644 --- a/pkg/devfile/parser/devfileobj.go +++ b/pkg/devfile/parser/devfileobj.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/errors/errors.go b/pkg/devfile/parser/errors/errors.go index 4df1c087..6d629644 100644 --- a/pkg/devfile/parser/errors/errors.go +++ b/pkg/devfile/parser/errors/errors.go @@ -1,5 +1,5 @@ // -// Copyright 2024 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/parse.go b/pkg/devfile/parser/parse.go index bfb3cd4a..32de0f29 100644 --- a/pkg/devfile/parser/parse.go +++ b/pkg/devfile/parser/parse.go @@ -1,5 +1,5 @@ // -// Copyright 2022-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/parse_test.go b/pkg/devfile/parser/parse_test.go index 1534f10b..f7180026 100644 --- a/pkg/devfile/parser/parse_test.go +++ b/pkg/devfile/parser/parse_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/reader.go b/pkg/devfile/parser/reader.go index ad3bdc9f..97cefcac 100644 --- a/pkg/devfile/parser/reader.go +++ b/pkg/devfile/parser/reader.go @@ -1,5 +1,5 @@ // -// Copyright 2022-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/reader_test.go b/pkg/devfile/parser/reader_test.go index 53d110e9..f648e04b 100644 --- a/pkg/devfile/parser/reader_test.go +++ b/pkg/devfile/parser/reader_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/resolutionContext.go b/pkg/devfile/parser/resolutionContext.go index 799ecd64..37026599 100644 --- a/pkg/devfile/parser/resolutionContext.go +++ b/pkg/devfile/parser/resolutionContext.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/sourceAttribute.go b/pkg/devfile/parser/sourceAttribute.go index d7365590..8009a47a 100644 --- a/pkg/devfile/parser/sourceAttribute.go +++ b/pkg/devfile/parser/sourceAttribute.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/sourceAttribute_test.go b/pkg/devfile/parser/sourceAttribute_test.go index d997ab9a..8913896f 100644 --- a/pkg/devfile/parser/sourceAttribute_test.go +++ b/pkg/devfile/parser/sourceAttribute_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,12 +16,13 @@ package parser import ( + "reflect" + "testing" + v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/api/v2/pkg/attributes" "github.com/kylelemons/godebug/pretty" "github.com/stretchr/testify/assert" - "reflect" - "testing" ) func TestAddSourceAttributesForOverrideAndMerge(t *testing.T) { diff --git a/pkg/devfile/parser/util/interface.go b/pkg/devfile/parser/util/interface.go index c1d64092..de28948e 100644 --- a/pkg/devfile/parser/util/interface.go +++ b/pkg/devfile/parser/util/interface.go @@ -1,5 +1,5 @@ // -// Copyright 2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/util/mock.go b/pkg/devfile/parser/util/mock.go index 3c1f042c..f0eff2ff 100644 --- a/pkg/devfile/parser/util/mock.go +++ b/pkg/devfile/parser/util/mock.go @@ -1,5 +1,5 @@ // -// Copyright 2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/util/utils.go b/pkg/devfile/parser/util/utils.go index cbd2769b..af840d86 100644 --- a/pkg/devfile/parser/util/utils.go +++ b/pkg/devfile/parser/util/utils.go @@ -1,5 +1,5 @@ // -// Copyright 2022-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/util/utils_test.go b/pkg/devfile/parser/util/utils_test.go index 873f9d46..e188ea9b 100644 --- a/pkg/devfile/parser/util/utils_test.go +++ b/pkg/devfile/parser/util/utils_test.go @@ -1,5 +1,5 @@ // -// Copyright 2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/utils.go b/pkg/devfile/parser/utils.go index 96a75bf3..57a6cd2b 100644 --- a/pkg/devfile/parser/utils.go +++ b/pkg/devfile/parser/utils.go @@ -1,5 +1,5 @@ // -// Copyright 2022-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/utils_test.go b/pkg/devfile/parser/utils_test.go index 8ccb9b9f..4895ee01 100644 --- a/pkg/devfile/parser/utils_test.go +++ b/pkg/devfile/parser/utils_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/writer.go b/pkg/devfile/parser/writer.go index a22c218e..948130a8 100644 --- a/pkg/devfile/parser/writer.go +++ b/pkg/devfile/parser/writer.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/parser/writer_test.go b/pkg/devfile/parser/writer_test.go index e31d49ed..d8e5710a 100644 --- a/pkg/devfile/parser/writer_test.go +++ b/pkg/devfile/parser/writer_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devfile/validate/validate.go b/pkg/devfile/validate/validate.go index e40d89ab..73f63cf0 100644 --- a/pkg/devfile/validate/validate.go +++ b/pkg/devfile/validate/validate.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ package validate import ( "fmt" + v2Validation "github.com/devfile/api/v2/pkg/validation" devfileData "github.com/devfile/library/v2/pkg/devfile/parser/data" v2 "github.com/devfile/library/v2/pkg/devfile/parser/data/v2" diff --git a/pkg/testingutil/containers.go b/pkg/testingutil/containers.go index 00720ea1..d8c73bab 100644 --- a/pkg/testingutil/containers.go +++ b/pkg/testingutil/containers.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/testingutil/devfile.go b/pkg/testingutil/devfile.go index 46ef97fa..46b16c4e 100644 --- a/pkg/testingutil/devfile.go +++ b/pkg/testingutil/devfile.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/testingutil/filesystem/singleton.go b/pkg/testingutil/filesystem/singleton.go index 1d16ade7..7c562708 100644 --- a/pkg/testingutil/filesystem/singleton.go +++ b/pkg/testingutil/filesystem/singleton.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/testingutil/k8sClient.go b/pkg/testingutil/k8sClient.go index 7a7ab087..809e6fce 100644 --- a/pkg/testingutil/k8sClient.go +++ b/pkg/testingutil/k8sClient.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/testingutil/resources.go b/pkg/testingutil/resources.go index 7e70cf9f..e0028dd7 100644 --- a/pkg/testingutil/resources.go +++ b/pkg/testingutil/resources.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/util/git.go b/pkg/util/git.go index f9ca6f1f..22ebf3ff 100644 --- a/pkg/util/git.go +++ b/pkg/util/git.go @@ -1,5 +1,5 @@ // -// Copyright 2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/util/git_test.go b/pkg/util/git_test.go index 634c62aa..c0369ba0 100644 --- a/pkg/util/git_test.go +++ b/pkg/util/git_test.go @@ -1,5 +1,5 @@ // -// Copyright 2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,12 +16,13 @@ package util import ( - "github.com/kylelemons/godebug/pretty" - "github.com/stretchr/testify/assert" "os" "path/filepath" "reflect" "testing" + + "github.com/kylelemons/godebug/pretty" + "github.com/stretchr/testify/assert" ) func Test_ParseGitUrl(t *testing.T) { diff --git a/pkg/util/httpcache.go b/pkg/util/httpcache.go index 8a45ff68..d3dd1b8a 100644 --- a/pkg/util/httpcache.go +++ b/pkg/util/httpcache.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/util/mock.go b/pkg/util/mock.go index 7a0b7759..9a87bfde 100644 --- a/pkg/util/mock.go +++ b/pkg/util/mock.go @@ -1,5 +1,5 @@ // -// Copyright 2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/util/util.go b/pkg/util/util.go index 057bdccd..18f36278 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -1,5 +1,5 @@ // -// Copyright 2022-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/util/util_test.go b/pkg/util/util_test.go index 795b8be4..fd23b87c 100644 --- a/pkg/util/util_test.go +++ b/pkg/util/util_test.go @@ -1,5 +1,5 @@ // -// Copyright 2021-2023 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/replaceSchemaFile.go b/replaceSchemaFile.go index ab478a19..331014d0 100644 --- a/replaceSchemaFile.go +++ b/replaceSchemaFile.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/scripts/changelog-script.sh b/scripts/changelog-script.sh index e5bbade9..b0a88de2 100755 --- a/scripts/changelog-script.sh +++ b/scripts/changelog-script.sh @@ -1,6 +1,20 @@ - #!/bin/bash +# +# Copyright Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # This script uses github_changelog_generator to generate a changelog and requires: # # 1. set an env GITHUB_TOKEN for the Github token diff --git a/scripts/updateApi.sh b/scripts/updateApi.sh index 91726f24..3593f817 100755 --- a/scripts/updateApi.sh +++ b/scripts/updateApi.sh @@ -1,5 +1,20 @@ #!/bin/bash +# +# Copyright Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + BLUE='\033[1;34m' GREEN='\033[0;32m' RED='\033[0;31m' diff --git a/tests/v2/libraryTest/library_test.go b/tests/v2/libraryTest/library_test.go index b4c2c9c4..65c13ebe 100644 --- a/tests/v2/libraryTest/library_test.go +++ b/tests/v2/libraryTest/library_test.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/v2/utils/library/command_test_utils.go b/tests/v2/utils/library/command_test_utils.go index f36d36f5..d3f0d8a3 100644 --- a/tests/v2/utils/library/command_test_utils.go +++ b/tests/v2/utils/library/command_test_utils.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/v2/utils/library/component_test_utils.go b/tests/v2/utils/library/component_test_utils.go index f9df63e3..c4d5265e 100644 --- a/tests/v2/utils/library/component_test_utils.go +++ b/tests/v2/utils/library/component_test_utils.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/v2/utils/library/project_test_utils.go b/tests/v2/utils/library/project_test_utils.go index b4beae0d..3e372a7b 100644 --- a/tests/v2/utils/library/project_test_utils.go +++ b/tests/v2/utils/library/project_test_utils.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/v2/utils/library/test_utils.go b/tests/v2/utils/library/test_utils.go index d8585967..2fae02a7 100644 --- a/tests/v2/utils/library/test_utils.go +++ b/tests/v2/utils/library/test_utils.go @@ -1,5 +1,5 @@ // -// Copyright 2022 Red Hat, Inc. +// Copyright Red Hat // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From acac033ea68c225248fc283a3193f2d1159fb79a Mon Sep 17 00:00:00 2001 From: Michael Valdron Date: Fri, 8 Mar 2024 15:20:37 -0500 Subject: [PATCH 5/8] update github.com/spf13/afero dependency Signed-off-by: Michael Valdron --- go.mod | 28 ++++++++++++++-------------- go.sum | 58 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/go.mod b/go.mod index 6dd57193..1bd95ae9 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 github.com/openshift/api v0.0.0-20200930075302-db52bc4ef99f github.com/pkg/errors v0.9.1 - github.com/spf13/afero v1.6.0 + github.com/spf13/afero v1.11.0 github.com/stretchr/testify v1.8.0 github.com/xeipuuv/gojsonschema v1.2.0 gopkg.in/yaml.v3 v3.0.1 @@ -39,7 +39,7 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect github.com/acomagu/bufpipe v1.0.3 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/containerd/containerd v1.5.9 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/devfile/registry-support/index/generator v0.0.0-20221018203505-df96d34d4273 // indirect @@ -60,7 +60,7 @@ require ( github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/swag v0.19.14 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/google/btree v1.0.1 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/gofuzz v1.2.0 // indirect @@ -99,18 +99,18 @@ require ( github.com/xanzy/ssh-agent v0.3.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect - golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/time v0.3.0 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect + golang.org/x/sync v0.5.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/time v0.5.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect - google.golang.org/grpc v1.49.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect + google.golang.org/grpc v1.59.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 717ec042..5ce0e4af 100644 --- a/go.sum +++ b/go.sum @@ -143,8 +143,9 @@ github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -163,7 +164,6 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= @@ -352,7 +352,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -478,8 +477,9 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -863,8 +863,9 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= @@ -959,8 +960,8 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -994,8 +995,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1090,8 +1091,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220107192237-5cfca573fb4d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1105,8 +1106,9 @@ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1118,8 +1120,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1215,14 +1217,14 @@ golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1232,8 +1234,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1242,8 +1244,8 @@ golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1392,8 +1394,8 @@ google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 h1:hrbNEivu7Zn1pxvHk6MBrq9iE22woVILTHqexqBxe6I= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1420,9 +1422,8 @@ google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1436,9 +1437,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 0444b09baa35ba00f5b3cb512175bbfa2a8b457c Mon Sep 17 00:00:00 2001 From: Michael Valdron Date: Fri, 8 Mar 2024 15:32:32 -0500 Subject: [PATCH 6/8] address security alerts Signed-off-by: Michael Valdron --- .github/workflows/codecov.yml | 4 ++++ .github/workflows/go.yml | 3 +++ .github/workflows/proxy-warming.yml | 3 +++ replaceSchemaFile.go | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 56706648..c9f6ca42 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -17,6 +17,10 @@ on: push: branches: - main + +# Declare default permissions as read only. +permissions: read-all + jobs: build-and-deploy: runs-on: ubuntu-20.04 diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 2ae009ed..ae319afa 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -20,6 +20,9 @@ on: pull_request: branches: [ main ] +# Declare default permissions as read only. +permissions: read-all + jobs: build: diff --git a/.github/workflows/proxy-warming.yml b/.github/workflows/proxy-warming.yml index 51cf9c15..32b65e64 100644 --- a/.github/workflows/proxy-warming.yml +++ b/.github/workflows/proxy-warming.yml @@ -21,6 +21,9 @@ on: tags: - 'v[0-9]+.[0-9]+.[0-9]+' +# Declare default permissions as read only. +permissions: read-all + jobs: build: name: Renew documentation diff --git a/replaceSchemaFile.go b/replaceSchemaFile.go index 331014d0..b4137892 100644 --- a/replaceSchemaFile.go +++ b/replaceSchemaFile.go @@ -37,7 +37,7 @@ func ReplaceSchemaFile() { fmt.Printf("Writing to file: %s\n", filePath) fileContent := fmt.Sprintf("package %s\n\n// %s\nconst %s = `%s\n`\n", packageVersion, schemaURL, jsonSchemaVersion, newSchema) - if err := os.WriteFile(filePath, []byte(fileContent), 0644); err != nil { + if err := os.WriteFile(filePath, []byte(fileContent), 0600); err != nil { printErr(err) os.Exit(1) } From d7335ee7c2ee35030af9ec66e9131183b2dfe927 Mon Sep 17 00:00:00 2001 From: Michael Valdron Date: Fri, 8 Mar 2024 16:53:14 -0500 Subject: [PATCH 7/8] add TestIsValidProjectDir Signed-off-by: Michael Valdron --- pkg/util/util.go | 16 ++++------ pkg/util/util_test.go | 68 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 11 deletions(-) diff --git a/pkg/util/util.go b/pkg/util/util.go index 18f36278..463593ad 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -855,21 +855,15 @@ func FilterIgnores(filesChanged, filesDeleted, absIgnoreRules []string) (filesCh // IsValidProjectDir checks that the folder to download the project from devfile is // either empty or only contains the devfile used. func IsValidProjectDir(path string, devfilePath string) error { - fileEntries, err := os.ReadDir(path) + return isValidProjectDirOnFS(path, devfilePath, filesystem.DefaultFs{}) +} + +func isValidProjectDirOnFS(path string, devfilePath string, fs filesystem.Filesystem) error { + files, err := fs.ReadDir(path) if err != nil { return err } - files := make([]os.FileInfo, 0, len(fileEntries)) - for _, fileEntry := range fileEntries { - info, err := fileEntry.Info() - if err != nil { - return err - } - - files = append(files, info) - } - if len(files) > 1 { return errors.Errorf("Folder %s is not empty. It can only contain the devfile used.", path) } else if len(files) == 1 { diff --git a/pkg/util/util_test.go b/pkg/util/util_test.go index fd23b87c..fe0a1785 100644 --- a/pkg/util/util_test.go +++ b/pkg/util/util_test.go @@ -853,6 +853,74 @@ func TestFilterIgnores(t *testing.T) { } } +func TestIsValidProjectDir(t *testing.T) { + const validProjectDirPath = "/projectDirs/validProjectDir" + const emptyProjectDirPath = "/projectDirs/emptyProjectDir" + const invalidProjectDirWithFiles = "/projectDirs/invalidProjectDirWithFiles" + const invalidProjectDirWithSubDirPath = "/projectDirs/invalidProjectDirWithSubDir" + fs := filesystem.NewFakeFs() + tests := []struct { + name string + path string + devfilePath string + isDevfilePathDir bool + otherFiles []string + wantErr bool + }{ + { + name: "Case 1: Valid project directory", + path: validProjectDirPath, + devfilePath: "devfile.yaml", + }, + { + name: "Case 2: Valid empty project directory", + path: emptyProjectDirPath, + }, + { + name: "Case 3: Invalid project directory with files", + path: invalidProjectDirWithFiles, + devfilePath: "devfile.yaml", + otherFiles: []string{"package.json", "app.js"}, + wantErr: true, + }, + { + name: "Case 4: Invalid project directory with subdirectory", + path: invalidProjectDirWithSubDirPath, + devfilePath: "devfile", + isDevfilePathDir: true, + wantErr: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Create test projectDir + fs.MkdirAll(tt.path, os.ModePerm) + + // create devfile (or subdir) + if tt.devfilePath != "" { + if tt.isDevfilePathDir { + fs.MkdirAll(filepath.Join(tt.path, tt.devfilePath), os.ModePerm) + } else { + fs.Create(filepath.Join(tt.path, tt.devfilePath)) + } + } + + // create other files + for _, otherFile := range tt.otherFiles { + fs.Create(filepath.Join(tt.path, otherFile)) + } + + err := isValidProjectDirOnFS(tt.path, tt.devfilePath, fs) + if !tt.wantErr && err != nil { + t.Errorf("Got unexpected error: %v", err) + } else if tt.wantErr && err == nil { + t.Errorf("Expected an error but got nil") + } + }) + } +} + func TestDownloadFile(t *testing.T) { // Start a local HTTP server server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { From 150786444bfbf96c2df71ed3ca4c3af58a3c7ac4 Mon Sep 17 00:00:00 2001 From: Michael Valdron Date: Fri, 8 Mar 2024 17:07:33 -0500 Subject: [PATCH 8/8] update docs Signed-off-by: Michael Valdron --- CONTRIBUTING.md | 2 +- README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f78bdcc1..138a7859 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ contribution. See the [DCO](./DCO) file for details. The following are required to work on devfile library: - Git -- Go 1.18 or later +- Go 1.19 or later ## Code of Conduct Before contributing to this repository, see [contributor code of conduct](https://github.com/devfile/api/blob/main/CODE_OF_CONDUCT.md#contributor-covenant-code-of-conduct) diff --git a/README.md b/README.md index ee49d292..62657d84 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@