From 7778f7630600ee4bceec7c9b305588e10a3c37e1 Mon Sep 17 00:00:00 2001 From: Spolti Date: Wed, 1 Nov 2023 15:54:39 -0300 Subject: [PATCH 1/5] bump go version from 1.17 to 1.19 chore: Go lang 1.17 and a little bit old and 1.19 as well. However, before taking a greater step to higher version would might be better to break it in smaller changes since the amount of changes that this update has required is a little bit high, here is a small description of what was changed by this update: - Outdated linters: - WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. - WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. - WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. - Deprecation of the io/ioutils package: - SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os] - Used the `os` package and the needed code changes applied - At puller/config.go - ( undefined: GetEnvString) - Fixed by `import . "github.com/kserve/modelmesh-runtime-adapter/internal/envconfig"` - Some comments and headers adjusted - small identation changes made as part of go fmt. Fixes https://github.com/kserve/modelmesh-runtime-adapter/issues/64 Signed-off-by: Spolti --- .golangci.yaml | 3 -- .pre-commit-config.yaml | 2 +- Dockerfile | 2 +- Makefile | 2 +- go.mod | 4 +-- go.sum | 3 +- internal/envconfig/envconfig.go | 8 ++--- internal/modelschema/modelschema.go | 6 ++-- internal/util/connect.go | 2 +- internal/util/connect_test.go | 2 +- internal/util/fileutil.go | 9 ++--- internal/util/join.go | 2 +- internal/util/join_test.go | 2 +- internal/util/loadmodel.go | 2 +- model-mesh-mlserver-adapter/main.go | 2 +- .../server/adaptmodellayout_test.go | 11 +++--- model-mesh-mlserver-adapter/server/config.go | 2 +- model-mesh-mlserver-adapter/server/server.go | 19 +++++----- .../server/server_test.go | 9 +++-- model-mesh-ovms-adapter/main.go | 2 +- .../server/adaptmodellayout.go | 11 +++--- .../server/adaptmodellayout_test.go | 7 ++-- model-mesh-ovms-adapter/server/config.go | 2 +- model-mesh-ovms-adapter/server/const.go | 2 +- model-mesh-ovms-adapter/server/modelconfig.go | 35 ++++++++++--------- .../server/modelmanager.go | 9 +++-- .../server/modelmanager_test.go | 2 +- model-mesh-ovms-adapter/server/server.go | 2 +- model-mesh-ovms-adapter/server/server_test.go | 5 ++- model-mesh-torchserve-adapter/main.go | 2 +- .../server/server.go | 2 +- .../server/server_test.go | 2 +- .../torchserve/mock_torchserve_server.go | 10 +++--- model-mesh-triton-adapter/main.go | 2 +- .../server/adaptmodellayout.go | 25 ++++++------- .../server/adaptmodellayout_test.go | 9 ++--- model-mesh-triton-adapter/server/config.go | 2 +- model-mesh-triton-adapter/server/const.go | 2 +- model-mesh-triton-adapter/server/schema.go | 2 +- .../server/schema_test.go | 2 +- model-mesh-triton-adapter/server/server.go | 2 +- .../server/server_test.go | 5 ++- model-mesh-triton-adapter/server/utils.go | 6 ++-- .../triton/adapter_client/adapter_client.go | 2 +- .../triton/mesh_client/mesh_client.go | 2 +- .../triton/mock_triton_server.go | 2 +- model-serving-puller/main.go | 2 +- model-serving-puller/puller/config.go | 8 ++--- model-serving-puller/puller/dotpath.go | 2 +- model-serving-puller/puller/dotpath_test.go | 2 +- model-serving-puller/puller/puller.go | 8 ++--- model-serving-puller/puller/puller_test.go | 7 ++-- model-serving-puller/server/config.go | 2 +- model-serving-puller/server/modelstate.go | 2 +- .../server/modelstate_test.go | 2 +- model-serving-puller/server/server.go | 2 +- model-serving-puller/server/server_test.go | 2 +- pullman/cache.go | 2 +- pullman/cache_test.go | 2 +- pullman/cmd/main.go | 6 ++-- pullman/config.go | 2 +- pullman/config_test.go | 2 +- pullman/helpers.go | 2 +- pullman/pullman.go | 2 +- pullman/pullman_test.go | 2 +- pullman/storageproviders/azure/downloader.go | 2 +- pullman/storageproviders/azure/provider.go | 2 +- .../storageproviders/azure/provider_test.go | 2 +- pullman/storageproviders/gcs/downloader.go | 2 +- pullman/storageproviders/gcs/provider.go | 2 +- pullman/storageproviders/gcs/provider_test.go | 2 +- pullman/storageproviders/http/downloader.go | 2 +- pullman/storageproviders/http/provider.go | 2 +- .../storageproviders/http/provider_test.go | 2 +- pullman/storageproviders/pvc/provider.go | 2 +- pullman/storageproviders/pvc/provider_test.go | 2 +- pullman/storageproviders/s3/downloader.go | 2 +- .../storageproviders/s3/downloader_test.go | 2 +- pullman/storageproviders/s3/provider.go | 2 +- pullman/storageproviders/s3/provider_test.go | 2 +- pullman/types.go | 2 +- scripts/fmt.sh | 11 ++++++ 82 files changed, 175 insertions(+), 175 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index 1fc97cbf..2e8eac46 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -93,16 +93,13 @@ linters: fast: false enable: # These are the defaults for golangci-lint - - deadcode - errcheck - gosimple - govet - ineffassign - staticcheck - - structcheck - typecheck - unused - - varcheck # Also enable these - goconst diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cf769448..9484e35d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ # limitations under the License. repos: - repo: https://github.com/golangci/golangci-lint - rev: v1.43.0 + rev: v1.51.1 hooks: - id: golangci-lint - repo: https://github.com/pre-commit/mirrors-prettier diff --git a/Dockerfile b/Dockerfile index 2fb9356b..dc1162ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ ############################################################################### # Stage 1: Create the developer image for the BUILDPLATFORM only ############################################################################### -ARG GOLANG_VERSION=1.17 +ARG GOLANG_VERSION=1.19 FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi8/go-toolset:$GOLANG_VERSION AS develop ARG PROTOC_VERSION=21.5 diff --git a/Makefile b/Makefile index eff2176f..4bda4657 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ run: use.develop .PHONY: test ## Run tests -test: +test: fmt ./scripts/run_tests.sh .PHONY: fmt diff --git a/go.mod b/go.mod index ad52bc76..4ca16f58 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/kserve/modelmesh-runtime-adapter -go 1.17 +go 1.19 require ( cloud.google.com/go/storage v1.28.1 @@ -12,7 +12,7 @@ require ( github.com/go-logr/zapr v1.2.3 github.com/golang/mock v1.6.0 github.com/joho/godotenv v1.4.0 - github.com/stretchr/testify v1.8.1 + github.com/stretchr/testify v1.8.4 go.uber.org/zap v1.23.0 golang.org/x/sync v0.1.0 google.golang.org/api v0.114.0 diff --git a/go.sum b/go.sum index 3db97026..5b285c5f 100644 --- a/go.sum +++ b/go.sum @@ -190,8 +190,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= diff --git a/internal/envconfig/envconfig.go b/internal/envconfig/envconfig.go index a56060f3..d4a6ce3e 100644 --- a/internal/envconfig/envconfig.go +++ b/internal/envconfig/envconfig.go @@ -21,7 +21,7 @@ import ( "github.com/go-logr/logr" ) -// Returns the string value of environment variable "key" or the default value +// GetEnvString Returns the string value of environment variable "key" or the default value // if "key" is not set. Note if the environment variable is set to an empty // string, this will return an empty string, not defaultValue. func GetEnvString(key string, defaultValue string) string { @@ -31,7 +31,7 @@ func GetEnvString(key string, defaultValue string) string { return defaultValue } -// Returns the integer of value environment variable "key" or the default value +// GetEnvInt Returns the integer of value environment variable "key" or the default value // if "key" is not set. Note if the environment variable is set to a non // integer, including an empty string, this will fail and exit. func GetEnvInt(key string, defaultValue int, log logr.Logger) int { @@ -70,7 +70,7 @@ func GetEnvFloat(key string, defaultValue float64, log logr.Logger) float64 { return defaultValue } -// Returns the bool value of environment variable "key" or the default value +// GetEnvBool Returns the bool value of environment variable "key" or the default value // if "key" is not set. Note if the environment variable is set to a non // boolean, including an empty string, this will fail and exit. func GetEnvBool(key string, defaultValue bool, log logr.Logger) bool { @@ -85,7 +85,7 @@ func GetEnvBool(key string, defaultValue bool, log logr.Logger) bool { return defaultValue } -// Returns the duration value of environment variable "key" or a default value +// GetEnvDuration Returns the duration value of environment variable "key" or a default value // Note if the environment variable cannot be parsed as a duration, including an // empty string, this will fail and exit. func GetEnvDuration(key string, defaultValue time.Duration, log logr.Logger) time.Duration { diff --git a/internal/modelschema/modelschema.go b/internal/modelschema/modelschema.go index 38e63c69..11874037 100644 --- a/internal/modelschema/modelschema.go +++ b/internal/modelschema/modelschema.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -16,7 +16,7 @@ package modelschema import ( "encoding/json" "fmt" - "io/ioutil" + "os" ) // Filename for the schema JSON @@ -55,7 +55,7 @@ const ( ) func NewFromFile(schemaFilename string) (*ModelSchema, error) { - jsonBytes, err := ioutil.ReadFile(schemaFilename) + jsonBytes, err := os.ReadFile(schemaFilename) if err != nil { return nil, fmt.Errorf("Unable to read model schema file %s: %w", schemaFilename, err) } diff --git a/internal/util/connect.go b/internal/util/connect.go index c6dd8d61..11166df9 100644 --- a/internal/util/connect.go +++ b/internal/util/connect.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/internal/util/connect_test.go b/internal/util/connect_test.go index b51b15bc..8d4fd218 100644 --- a/internal/util/connect_test.go +++ b/internal/util/connect_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/internal/util/fileutil.go b/internal/util/fileutil.go index cfb6dcde..e157b05c 100644 --- a/internal/util/fileutil.go +++ b/internal/util/fileutil.go @@ -4,13 +4,14 @@ // 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 +// 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. + package util import ( @@ -22,7 +23,7 @@ import ( // RemoveFileFromListOfFileInfo // The input `files` content is modified, the order of elements is changed -func RemoveFileFromListOfFileInfo(filename string, files []os.FileInfo) (bool, []os.FileInfo) { +func RemoveFileFromListOfFileInfo(filename string, files []os.DirEntry) (bool, []os.DirEntry) { var fileIndex int = -1 for i, f := range files { if f.Name() == filename { @@ -38,7 +39,7 @@ func RemoveFileFromListOfFileInfo(filename string, files []os.FileInfo) (bool, [ return true, files[:len(files)-1] } -// Check if a file exists at path +// FileExists Check if a file exists at path func FileExists(path string) (bool, error) { if _, err := os.Stat(path); err == nil { return true, nil @@ -49,7 +50,7 @@ func FileExists(path string) (bool, error) { } } -// Clear contents of directory if it exists. +// ClearDirectoryContents Clear contents of directory if it exists. // If condition is specified then only delete dir entries to which it returns true func ClearDirectoryContents(dirPath string, condition func(entry os.DirEntry) bool) error { files, err := os.ReadDir(dirPath) diff --git a/internal/util/join.go b/internal/util/join.go index d6c11914..57f7607e 100644 --- a/internal/util/join.go +++ b/internal/util/join.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/internal/util/join_test.go b/internal/util/join_test.go index 594be78f..325c5819 100644 --- a/internal/util/join_test.go +++ b/internal/util/join_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/internal/util/loadmodel.go b/internal/util/loadmodel.go index 030ad85f..b9621b66 100644 --- a/internal/util/loadmodel.go +++ b/internal/util/loadmodel.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-mlserver-adapter/main.go b/model-mesh-mlserver-adapter/main.go index 163b2dce..368f47e4 100644 --- a/model-mesh-mlserver-adapter/main.go +++ b/model-mesh-mlserver-adapter/main.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go b/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go index 2a021be4..5e9c3914 100644 --- a/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go +++ b/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -16,7 +16,6 @@ package server import ( "encoding/json" "fmt" - "io/ioutil" "os" "path/filepath" "strings" @@ -98,7 +97,7 @@ func (tt adaptModelLayoutTestCase) writeConfigFile(t *testing.T) { if jerr != nil { t.Fatal("Error marshalling config JSON", jerr) } - if err := ioutil.WriteFile(configFullPath, jsonBytes, 0644); err != nil { + if err := os.WriteFile(configFullPath, jsonBytes, 0644); err != nil { t.Fatalf("Unable to write config JSON: %v", err) } } @@ -110,7 +109,7 @@ func (tt adaptModelLayoutTestCase) writeSchemaFile(t *testing.T) { } schemaFullPath := filepath.Join(tt.getSourceDir(), tt.SchemaPath) - if werr := ioutil.WriteFile(schemaFullPath, jsonBytes, 0644); werr != nil { + if werr := os.WriteFile(schemaFullPath, jsonBytes, 0644); werr != nil { t.Fatal("Error writing JSON to schema file", werr) } } @@ -533,7 +532,7 @@ func TestAdaptModelLayoutForRuntime(t *testing.T) { } // read in the config to assert on it - configJSON, err2 := ioutil.ReadFile(configFilePath) + configJSON, err2 := os.ReadFile(configFilePath) if err2 != nil { t.Fatalf("Unable to read config file %s: %v", configFilePath, err2) } @@ -635,7 +634,7 @@ func assertCreateEmptyFile(path string, t *testing.T) { func createFile(path, contents string) error { os.MkdirAll(filepath.Dir(path), 0755) - err := ioutil.WriteFile(path, []byte(contents), 0644) + err := os.WriteFile(path, []byte(contents), 0644) return err } diff --git a/model-mesh-mlserver-adapter/server/config.go b/model-mesh-mlserver-adapter/server/config.go index c6da9e38..0ceef9d9 100644 --- a/model-mesh-mlserver-adapter/server/config.go +++ b/model-mesh-mlserver-adapter/server/config.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-mlserver-adapter/server/server.go b/model-mesh-mlserver-adapter/server/server.go index 1c4d33db..5fc499f0 100644 --- a/model-mesh-mlserver-adapter/server/server.go +++ b/model-mesh-mlserver-adapter/server/server.go @@ -17,7 +17,6 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" "os" "path/filepath" "strings" @@ -180,7 +179,7 @@ func adaptModelLayoutForRuntime(rootModelDir, modelID, modelType, modelPath, sch err = adaptModelLayout(modelID, modelType, modelPath, schemaPath, mlserverModelIDDir, false, log) } else { // model path is a directory, inspect the files - files, err1 := ioutil.ReadDir(modelPath) + files, err1 := os.ReadDir(modelPath) if err1 != nil { return fmt.Errorf("Could not read files in dir %s: %w", modelPath, err) } @@ -216,7 +215,7 @@ func adaptModelLayoutForRuntime(rootModelDir, modelID, modelType, modelPath, sch // Only minimal changes should be made to the model repo to get it to load. For // MLServer, this means writing the model ID into the configuration file and // just symlinking all other files -func adaptNativeModelLayout(files []os.FileInfo, modelID, modelPath, schemaPath, targetDir string, log logr.Logger) error { +func adaptNativeModelLayout(files []os.DirEntry, modelID, modelPath, schemaPath, targetDir string, log logr.Logger) error { for _, f := range files { filename := f.Name() source, err := util.SecureJoin(modelPath, filename) @@ -226,9 +225,9 @@ func adaptNativeModelLayout(files []os.FileInfo, modelID, modelPath, schemaPath, } // special handling of the config file if filename == mlserverRepositoryConfigFilename { - configJSON, err1 := ioutil.ReadFile(source) + configJSON, err1 := os.ReadFile(source) if err1 != nil { - return fmt.Errorf("Could not read model config file %s: %w", source, err1) + return fmt.Errorf("could not read model config file %s: %w", source, err1) } // process the config to set the model's `name` to the model-mesh model id @@ -243,9 +242,11 @@ func adaptNativeModelLayout(files []os.FileInfo, modelID, modelPath, schemaPath, "mlserverRepositoryConfigFilename", mlserverRepositoryConfigFilename) return jerr } - err1 = ioutil.WriteFile(target, processedConfigJSON, f.Mode()) + + fInfo, _ := f.Info() + err1 = os.WriteFile(target, processedConfigJSON, fInfo.Mode()) if err1 != nil { - return fmt.Errorf("Error writing config file %s: %w", source, err1) + return fmt.Errorf("error writing config file %s: %w", source, err1) } continue } @@ -257,7 +258,7 @@ func adaptNativeModelLayout(files []os.FileInfo, modelID, modelPath, schemaPath, } err = os.Symlink(source, link) if err != nil { - return fmt.Errorf("Error creating symlink to %s: %w", source, err) + return fmt.Errorf("error creating symlink to %s: %w", source, err) } } @@ -346,7 +347,7 @@ func adaptModelLayout(modelID, modelType, modelPath, schemaPath, targetDir strin "mlserverRepositoryConfigFilename", mlserverRepositoryConfigFilename) return err } - if err = ioutil.WriteFile(target, configJSON, 0664); err != nil { + if err = os.WriteFile(target, configJSON, 0664); err != nil { return fmt.Errorf("Error writing generated config file for %s: %w", modelID, err) } diff --git a/model-mesh-mlserver-adapter/server/server_test.go b/model-mesh-mlserver-adapter/server/server_test.go index dd4625f4..0e1d3726 100644 --- a/model-mesh-mlserver-adapter/server/server_test.go +++ b/model-mesh-mlserver-adapter/server/server_test.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -18,7 +18,6 @@ import ( "encoding/json" "flag" "fmt" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -215,7 +214,7 @@ func TestProcessConfigJSON(t *testing.T) { } func assertGeneratedModelDirIsCorrect(sourceDir string, generatedDir string, modelID string, t *testing.T) { - generatedFiles, err := ioutil.ReadDir(generatedDir) + generatedFiles, err := os.ReadDir(generatedDir) if err != nil { t.Errorf("Could not read files in generated dir [%s]: %v", generatedDir, err) } @@ -227,7 +226,7 @@ func assertGeneratedModelDirIsCorrect(sourceDir string, generatedDir string, mod if f.Name() == mlserverRepositoryConfigFilename { configFileFound = true // should have `name` field matching the modelID - configJSON, err := ioutil.ReadFile(filePath) + configJSON, err := os.ReadFile(filePath) if err != nil { t.Errorf("Unable to read config file %s: %v", filePath, err) } @@ -245,7 +244,7 @@ func assertGeneratedModelDirIsCorrect(sourceDir string, generatedDir string, mod // if not the config file, it should be a symlink pointing to a file in the // source dir that exists - if f.Mode()&os.ModeSymlink != os.ModeSymlink { + if f.Type()&os.ModeSymlink != os.ModeSymlink { t.Errorf("Expected [%s] to be a symlink.", filePath) } diff --git a/model-mesh-ovms-adapter/main.go b/model-mesh-ovms-adapter/main.go index 3a501d42..92f48f6f 100644 --- a/model-mesh-ovms-adapter/main.go +++ b/model-mesh-ovms-adapter/main.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-ovms-adapter/server/adaptmodellayout.go b/model-mesh-ovms-adapter/server/adaptmodellayout.go index aec36f7f..09d6a0eb 100644 --- a/model-mesh-ovms-adapter/server/adaptmodellayout.go +++ b/model-mesh-ovms-adapter/server/adaptmodellayout.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -16,7 +16,6 @@ package server import ( "context" "fmt" - "io/ioutil" "os" "path/filepath" "strconv" @@ -53,7 +52,7 @@ func adaptModelLayoutForRuntime(ctx context.Context, rootModelDir, modelID, mode // simple case if ModelPath points to a file err = createOvmsModelRepositoryFromPath(modelPath, "1", schemaPath, modelType, ovmsModelIDDir, log) } else { - files, err1 := ioutil.ReadDir(modelPath) + files, err1 := os.ReadDir(modelPath) if err1 != nil { return fmt.Errorf("Could not read files in dir %s: %w", modelPath, err1) } @@ -68,7 +67,7 @@ func adaptModelLayoutForRuntime(ctx context.Context, rootModelDir, modelID, mode // Creates the ovms model structure /models/_ovms_models/model-id/1/ // Within this path there will be a symlink back to the original /models/model-id directory tree. -func createOvmsModelRepositoryFromDirectory(files []os.FileInfo, modelPath, schemaPath, modelType, ovmsModelIDDir string, log logr.Logger) error { +func createOvmsModelRepositoryFromDirectory(files []os.DirEntry, modelPath, schemaPath, modelType, ovmsModelIDDir string, log logr.Logger) error { var err error // allow the directory to contain version directories @@ -126,8 +125,8 @@ func createOvmsModelRepositoryFromPath(modelPath, versionNumber, schemaPath, mod } // Returns the largest positive int dir as long as all fileInfo dirs are integers (files are ignored). -// If fileInfos is empty or contains any any non-integer dirs, this will return the empty string. -func largestNumberDir(fileInfos []os.FileInfo) string { +// If fileInfos is empty or contains any non-integer dirs, this will return the empty string. +func largestNumberDir(fileInfos []os.DirEntry) string { largestInt := 0 largestDir := "" for _, f := range fileInfos { diff --git a/model-mesh-ovms-adapter/server/adaptmodellayout_test.go b/model-mesh-ovms-adapter/server/adaptmodellayout_test.go index eec0657b..3d750027 100644 --- a/model-mesh-ovms-adapter/server/adaptmodellayout_test.go +++ b/model-mesh-ovms-adapter/server/adaptmodellayout_test.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -16,7 +16,6 @@ package server import ( "context" "encoding/json" - "io/ioutil" "os" "path/filepath" "testing" @@ -82,7 +81,7 @@ func (tt adaptModelLayoutTestCase) writeSchemaFile(t *testing.T) { } schemaFullpath := filepath.Join(tt.getSourceDir(), tt.SchemaPath) - if werr := ioutil.WriteFile(schemaFullpath, jsonBytes, 0644); werr != nil { + if werr := os.WriteFile(schemaFullpath, jsonBytes, 0644); werr != nil { t.Fatal("Error writing JSON to schema file", werr) } } @@ -253,9 +252,7 @@ func findSymlinks(root string) []string { return result } -// // Definition of writeModelLayoutForRuntime test cases -// var adaptModelLayoutTests = []adaptModelLayoutTestCase{ // Group: ONNX format { diff --git a/model-mesh-ovms-adapter/server/config.go b/model-mesh-ovms-adapter/server/config.go index a8bcc33f..d24fd135 100644 --- a/model-mesh-ovms-adapter/server/config.go +++ b/model-mesh-ovms-adapter/server/config.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-ovms-adapter/server/const.go b/model-mesh-ovms-adapter/server/const.go index 8221e648..ff0f5bbe 100644 --- a/model-mesh-ovms-adapter/server/const.go +++ b/model-mesh-ovms-adapter/server/const.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-ovms-adapter/server/modelconfig.go b/model-mesh-ovms-adapter/server/modelconfig.go index 5b3a8ef5..9477a36e 100644 --- a/model-mesh-ovms-adapter/server/modelconfig.go +++ b/model-mesh-ovms-adapter/server/modelconfig.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -19,22 +19,23 @@ package server // JSON Schema: https://github.com/openvinotoolkit/model_server/blob/eab97207fbe9078f83a3f85b468418555b02959a/src/schema.cpp#L28 // // EXAMPLE: -// { -// "model_config_list": [ -// { -// "config": { -// "name": "model_name1", -// "base_path": "/models/model1" -// } -// }, -// { -// "config": { -// "name": "model_name2", -// "base_path": "/models/model1" -// } -// } -// ] -// } +// +// { +// "model_config_list": [ +// { +// "config": { +// "name": "model_name1", +// "base_path": "/models/model1" +// } +// }, +// { +// "config": { +// "name": "model_name2", +// "base_path": "/models/model1" +// } +// } +// ] +// } type OvmsMultiModelRepositoryConfig struct { ModelConfigList []OvmsMultiModelConfigListEntry `json:"model_config_list"` } diff --git a/model-mesh-ovms-adapter/server/modelmanager.go b/model-mesh-ovms-adapter/server/modelmanager.go index 9f2df8d1..fca6739b 100644 --- a/model-mesh-ovms-adapter/server/modelmanager.go +++ b/model-mesh-ovms-adapter/server/modelmanager.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( @@ -20,7 +21,6 @@ import ( "fmt" "io" "io/fs" - "io/ioutil" "net/http" "os" "path/filepath" @@ -261,7 +261,7 @@ type request struct { // Run loop for the manager's internal actor that owns the model repository config // -// Maintains a slice of batched requests that are in process in the reload +// # Maintains a slice of batched requests that are in process in the reload // // Returns results from the reload operation once it completes // Receives a stream of requests from its channel @@ -343,7 +343,6 @@ func (mm *OvmsModelManager) run() { // requests that will not change the state and ignoring requests that are // cancelled. // -// // We need a criteria to determine when to stop grabbing requests after a reload // is needed; here we take the approach of waiting for a period of time after a // request is received @@ -512,7 +511,7 @@ func (mm *OvmsModelManager) writeConfig() error { return fmt.Errorf("Error marshalling config file: %w", err) } - if err := ioutil.WriteFile(mm.modelConfigFilename, modelRepositoryConfigJSON, mm.config.ModelConfigFilePerms); err != nil { + if err := os.WriteFile(mm.modelConfigFilename, modelRepositoryConfigJSON, mm.config.ModelConfigFilePerms); err != nil { return fmt.Errorf("Error writing config file: %w", err) } diff --git a/model-mesh-ovms-adapter/server/modelmanager_test.go b/model-mesh-ovms-adapter/server/modelmanager_test.go index cc08d9ce..2355278a 100644 --- a/model-mesh-ovms-adapter/server/modelmanager_test.go +++ b/model-mesh-ovms-adapter/server/modelmanager_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-ovms-adapter/server/server.go b/model-mesh-ovms-adapter/server/server.go index efe2efc7..3c7399d8 100644 --- a/model-mesh-ovms-adapter/server/server.go +++ b/model-mesh-ovms-adapter/server/server.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-ovms-adapter/server/server_test.go b/model-mesh-ovms-adapter/server/server_test.go index f38c9b16..7ef32e7f 100644 --- a/model-mesh-ovms-adapter/server/server_test.go +++ b/model-mesh-ovms-adapter/server/server_test.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -18,7 +18,6 @@ import ( "encoding/json" "flag" "fmt" - "io/ioutil" "net/http" "os" "os/exec" @@ -255,7 +254,7 @@ func TestAdapter(t *testing.T) { } func checkEntryExistsInModelConfig(modelid string, path string) error { - configBytes, err := ioutil.ReadFile(testModelConfigFile) + configBytes, err := os.ReadFile(testModelConfigFile) if err != nil { return fmt.Errorf("Unable to read config file: %w", err) } diff --git a/model-mesh-torchserve-adapter/main.go b/model-mesh-torchserve-adapter/main.go index 333fbf8c..43c45071 100644 --- a/model-mesh-torchserve-adapter/main.go +++ b/model-mesh-torchserve-adapter/main.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-torchserve-adapter/server/server.go b/model-mesh-torchserve-adapter/server/server.go index 03843460..45bccdd6 100644 --- a/model-mesh-torchserve-adapter/server/server.go +++ b/model-mesh-torchserve-adapter/server/server.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-torchserve-adapter/server/server_test.go b/model-mesh-torchserve-adapter/server/server_test.go index c2f0ced6..f8ffb4cf 100644 --- a/model-mesh-torchserve-adapter/server/server_test.go +++ b/model-mesh-torchserve-adapter/server/server_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go b/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go index dbac8c13..9cf2e4d1 100644 --- a/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go +++ b/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -105,10 +105,10 @@ func serve(server *grpc.Server, port uint16, log logr.Logger) { // Implements gomock TestReporter interface: // -// type TestReporter interface { -// Errorf(format string, args ...interface{}) -// Fatalf(format string, args ...interface{}) -// } +// type TestReporter interface { +// Errorf(format string, args ...interface{}) +// Fatalf(format string, args ...interface{}) +// } type CustomReporter struct { log logr.Logger } diff --git a/model-mesh-triton-adapter/main.go b/model-mesh-triton-adapter/main.go index ec9493cd..8391fd66 100644 --- a/model-mesh-triton-adapter/main.go +++ b/model-mesh-triton-adapter/main.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-triton-adapter/server/adaptmodellayout.go b/model-mesh-triton-adapter/server/adaptmodellayout.go index 394cc5df..3663bbf2 100644 --- a/model-mesh-triton-adapter/server/adaptmodellayout.go +++ b/model-mesh-triton-adapter/server/adaptmodellayout.go @@ -4,20 +4,20 @@ // 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 +// 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. + package server import ( "context" "errors" "fmt" - "io/ioutil" "os" "path/filepath" "strconv" @@ -100,7 +100,7 @@ func adaptModelLayoutForRuntime(ctx context.Context, rootModelDir, modelID, mode // simple case if ModelPath points to a file err = createTritonModelRepositoryFromPath(modelPath, "1", schemaPath, modelType, tritonModelIDDir, log) } else { - files, err1 := ioutil.ReadDir(modelPath) + files, err1 := os.ReadDir(modelPath) if err1 != nil { return fmt.Errorf("Could not read files in dir %s: %w", modelPath, err1) } @@ -121,7 +121,7 @@ func adaptModelLayoutForRuntime(ctx context.Context, rootModelDir, modelID, mode // Creates the triton model structure /models/_triton_models/model-id/1/model.X where // model.X is a file or directory with a name defined by the model type (see modelTypeToDirNameMapping and modelTypeToFileNameMapping). // Within this path there will be a symlink back to the original /models/model-id directory tree. -func createTritonModelRepositoryFromDirectory(files []os.FileInfo, modelPath, schemaPath, modelType, tritonModelIDDir string, log logr.Logger) error { +func createTritonModelRepositoryFromDirectory(files []os.DirEntry, modelPath, schemaPath, modelType, tritonModelIDDir string, log logr.Logger) error { var err error // for backwards compatibility, remove any file called _schema.json from @@ -138,7 +138,7 @@ func createTritonModelRepositoryFromDirectory(files []os.FileInfo, modelPath, sc return err } - if files, err = ioutil.ReadDir(modelPath); err != nil { + if files, err = os.ReadDir(modelPath); err != nil { return fmt.Errorf("Could not read files in dir %s: %w", modelPath, err) } } else { @@ -233,7 +233,7 @@ func createTritonModelRepositoryFromPath(modelPath, versionNumber, schemaPath, m // If the Triton specific config file exists, assume the model files has the // proper structure, but process the config.pbtxt to remove the `name` field. // All other files are symlinked to their source -func adaptNativeModelLayout(files []os.FileInfo, sourceModelIDDir, schemaPath, tritonModelIDDir string, log logr.Logger) error { +func adaptNativeModelLayout(files []os.DirEntry, sourceModelIDDir, schemaPath, tritonModelIDDir string, log logr.Logger) error { for _, f := range files { var err1 error filename := f.Name() @@ -245,7 +245,7 @@ func adaptNativeModelLayout(files []os.FileInfo, sourceModelIDDir, schemaPath, t // special handling of the config file if filename == tritonRepositoryConfigFilename { - pbtxt, err2 := ioutil.ReadFile(source) + pbtxt, err2 := os.ReadFile(source) if err2 != nil { return fmt.Errorf("Error reading config file %s: %w", source, err2) } @@ -261,7 +261,8 @@ func adaptNativeModelLayout(files []os.FileInfo, sourceModelIDDir, schemaPath, t return err2 } - if err2 = ioutil.WriteFile(target, processedPbtxt, f.Mode()); err2 != nil { + info, _ := f.Info() + if err2 = os.WriteFile(target, processedPbtxt, info.Mode()); err2 != nil { return fmt.Errorf("Error writing config file %s: %w", source, err2) } @@ -283,8 +284,8 @@ func adaptNativeModelLayout(files []os.FileInfo, sourceModelIDDir, schemaPath, t } // Returns the largest positive int dir as long as all fileInfo dirs are integers (files are ignored). -// If fileInfos is empty or contains any any non-integer dirs, this will return the empty string. -func largestNumberDir(fileInfos []os.FileInfo) string { +// If fileInfos is empty or contains any non-integer dirs, this will return the empty string. +func largestNumberDir(fileInfos []os.DirEntry) string { largestInt := 0 largestDir := "" for _, f := range fileInfos { @@ -307,8 +308,8 @@ func largestNumberDir(fileInfos []os.FileInfo) string { // Returns true if these the files make up the top level of a triton model repository. // In other words, the parent of the files is the root of the triton repository (we don't pass the parent path // because then we'd have to read the filesystem more than once). -// Currently this is using the existence of file 'config.pbtxt' to determine it is a triton repository. -func isTritonModelRepository(files []os.FileInfo) bool { +// Currently, this is using the existence of file 'config.pbtxt' to determine it is a triton repository. +func isTritonModelRepository(files []os.DirEntry) bool { for _, f := range files { if f.Name() == tritonRepositoryConfigFilename { return true diff --git a/model-mesh-triton-adapter/server/adaptmodellayout_test.go b/model-mesh-triton-adapter/server/adaptmodellayout_test.go index b390f05a..c077440d 100644 --- a/model-mesh-triton-adapter/server/adaptmodellayout_test.go +++ b/model-mesh-triton-adapter/server/adaptmodellayout_test.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -17,7 +17,6 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" "os" "path/filepath" "strings" @@ -172,7 +171,7 @@ func (tt adaptModelLayoutTestCase) writeSchemaFile(t *testing.T) { } schemaFullpath := filepath.Join(tt.getSourceDir(), tt.SchemaPath) - if werr := ioutil.WriteFile(schemaFullpath, jsonBytes, 0644); werr != nil { + if werr := os.WriteFile(schemaFullpath, jsonBytes, 0644); werr != nil { t.Fatal("Error writing JSON to schema file", werr) } } @@ -278,7 +277,7 @@ func assertConfigFileContents(t *testing.T, tt adaptModelLayoutTestCase) { // read in the generated config file configFilePath := filepath.Join(tt.getTargetDir(), "config.pbtxt") - configFileContents, err := ioutil.ReadFile(configFilePath) + configFileContents, err := os.ReadFile(configFilePath) if err != nil { t.Fatalf("Unable to read config file [%s]: %v", configFilePath, err) } @@ -379,9 +378,7 @@ func findSymlinks(root string) []string { return result } -// // Definition of writeModelLayoutForRuntime test cases -// var adaptModelLayoutTests = []adaptModelLayoutTestCase{ // Group: file layout / model path support { diff --git a/model-mesh-triton-adapter/server/config.go b/model-mesh-triton-adapter/server/config.go index 31ae3d30..1fa136aa 100644 --- a/model-mesh-triton-adapter/server/config.go +++ b/model-mesh-triton-adapter/server/config.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-triton-adapter/server/const.go b/model-mesh-triton-adapter/server/const.go index 599c5639..c7e3b768 100644 --- a/model-mesh-triton-adapter/server/const.go +++ b/model-mesh-triton-adapter/server/const.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-triton-adapter/server/schema.go b/model-mesh-triton-adapter/server/schema.go index 93835d08..da459e88 100644 --- a/model-mesh-triton-adapter/server/schema.go +++ b/model-mesh-triton-adapter/server/schema.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-triton-adapter/server/schema_test.go b/model-mesh-triton-adapter/server/schema_test.go index 6008d5d4..8f6959d7 100644 --- a/model-mesh-triton-adapter/server/schema_test.go +++ b/model-mesh-triton-adapter/server/schema_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-triton-adapter/server/server.go b/model-mesh-triton-adapter/server/server.go index 05f64a71..6b831f14 100644 --- a/model-mesh-triton-adapter/server/server.go +++ b/model-mesh-triton-adapter/server/server.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-triton-adapter/server/server_test.go b/model-mesh-triton-adapter/server/server_test.go index 5262c8e9..9434ed70 100644 --- a/model-mesh-triton-adapter/server/server_test.go +++ b/model-mesh-triton-adapter/server/server_test.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -17,7 +17,6 @@ import ( "context" "flag" "fmt" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -156,7 +155,7 @@ func TestAdapter(t *testing.T) { // Check that the `name` property was removed from the config file { var err1 error - pbtxt, err1 := ioutil.ReadFile(configFile) + pbtxt, err1 := os.ReadFile(configFile) if err1 != nil { t.Errorf("Unable to read config file %s: %v", configFile, err) } diff --git a/model-mesh-triton-adapter/server/utils.go b/model-mesh-triton-adapter/server/utils.go index 39484124..7bc456b5 100644 --- a/model-mesh-triton-adapter/server/utils.go +++ b/model-mesh-triton-adapter/server/utils.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( @@ -18,7 +19,6 @@ import ( "context" "fmt" "io" - "io/ioutil" "os" "os/exec" "strconv" @@ -55,7 +55,7 @@ func writeConfigPbtxt(filename string, modelConfig *triton.ModelConfig) error { return fmt.Errorf("Unable to marshal config.pbtxt: %w", err) } - if err = ioutil.WriteFile(filename, pbtxtOut, 0644); err != nil { + if err = os.WriteFile(filename, pbtxtOut, 0644); err != nil { return fmt.Errorf("Unable to write config.pbtxt: %w", err) } return nil diff --git a/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go b/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go index d881072c..079428bc 100644 --- a/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go +++ b/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go b/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go index 0b78e950..ab0c27b3 100644 --- a/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go +++ b/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-triton-adapter/triton/mock_triton_server.go b/model-mesh-triton-adapter/triton/mock_triton_server.go index a9c18e2b..a9ba2b4b 100644 --- a/model-mesh-triton-adapter/triton/mock_triton_server.go +++ b/model-mesh-triton-adapter/triton/mock_triton_server.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-serving-puller/main.go b/model-serving-puller/main.go index 3bd2d6ed..487b021e 100644 --- a/model-serving-puller/main.go +++ b/model-serving-puller/main.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-serving-puller/puller/config.go b/model-serving-puller/puller/config.go index 2ccd8130..2af39601 100644 --- a/model-serving-puller/puller/config.go +++ b/model-serving-puller/puller/config.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -16,13 +16,13 @@ package puller import ( "encoding/json" "fmt" - "io/ioutil" "os" "github.com/go-logr/logr" - . "github.com/kserve/modelmesh-runtime-adapter/internal/envconfig" "github.com/kserve/modelmesh-runtime-adapter/internal/util" + + . "github.com/kserve/modelmesh-runtime-adapter/internal/envconfig" ) // PullerConfiguration stores configuration variables for the puller server @@ -72,7 +72,7 @@ func (config *PullerConfiguration) GetStorageConfiguration(storageKey string, lo return nil, fmt.Errorf("Storage secretKey not found: %s", storageKey) } - bytes, err := ioutil.ReadFile(configPath) + bytes, err := os.ReadFile(configPath) if err != nil { return nil, fmt.Errorf("Could not read storage configuration from %s: %v", configPath, err) } diff --git a/model-serving-puller/puller/dotpath.go b/model-serving-puller/puller/dotpath.go index dbb73ee7..42329d15 100644 --- a/model-serving-puller/puller/dotpath.go +++ b/model-serving-puller/puller/dotpath.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-serving-puller/puller/dotpath_test.go b/model-serving-puller/puller/dotpath_test.go index 75684ba9..7441b913 100644 --- a/model-serving-puller/puller/dotpath_test.go +++ b/model-serving-puller/puller/dotpath_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-serving-puller/puller/puller.go b/model-serving-puller/puller/puller.go index 6229f1dc..89481e91 100644 --- a/model-serving-puller/puller/puller.go +++ b/model-serving-puller/puller/puller.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -17,7 +17,6 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" "os" "path/filepath" @@ -58,7 +57,8 @@ type Puller struct { } // PullerInterface is the interface for `pullman` -// useful to mock for testing +// +// useful to mock for testing type PullerInterface interface { Pull(context.Context, pullman.PullCommand) error } @@ -291,7 +291,7 @@ func (p *Puller) ClearLocalModelStorage(exclude string) error { } func (p *Puller) ListModels() ([]string, error) { - entries, err := ioutil.ReadDir(p.PullerConfig.RootModelDir) + entries, err := os.ReadDir(p.PullerConfig.RootModelDir) if err != nil { return nil, err } diff --git a/model-serving-puller/puller/puller_test.go b/model-serving-puller/puller/puller_test.go index 0db7586f..5d86a4ff 100644 --- a/model-serving-puller/puller/puller_test.go +++ b/model-serving-puller/puller/puller_test.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -17,7 +17,6 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" "os" "path/filepath" "testing" @@ -99,7 +98,7 @@ func eqPullCommand(pc *pullman.PullCommand) gomock.Matcher { // helper to create a RepositoryConfig from the testdata storage config dir func readStorageConfig(key string) (*pullman.RepositoryConfig, error) { - j, err := ioutil.ReadFile(filepath.Join(StorageConfigDir, key)) + j, err := os.ReadFile(filepath.Join(StorageConfigDir, key)) if err != nil { return nil, err } @@ -428,7 +427,7 @@ func Test_ProcessLoadModelRequest_SuccessStorageTypeOnly(t *testing.T) { func Test_ProcessLoadModelRequest_DefaultStorageKey(t *testing.T) { // create a typeless default storage config file for this test defaultConfigFile := filepath.Join(StorageConfigDir, "default") - err := ioutil.WriteFile(defaultConfigFile, []byte(`{"type": "typeless-default"}`), 0555) + err := os.WriteFile(defaultConfigFile, []byte(`{"type": "typeless-default"}`), 0555) assert.NoError(t, err) defer func() { errd := os.Remove(defaultConfigFile) diff --git a/model-serving-puller/server/config.go b/model-serving-puller/server/config.go index 73481f17..aa8c4797 100644 --- a/model-serving-puller/server/config.go +++ b/model-serving-puller/server/config.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-serving-puller/server/modelstate.go b/model-serving-puller/server/modelstate.go index 25488f87..68b601a8 100644 --- a/model-serving-puller/server/modelstate.go +++ b/model-serving-puller/server/modelstate.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-serving-puller/server/modelstate_test.go b/model-serving-puller/server/modelstate_test.go index d830db51..ada5a067 100644 --- a/model-serving-puller/server/modelstate_test.go +++ b/model-serving-puller/server/modelstate_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-serving-puller/server/server.go b/model-serving-puller/server/server.go index e5d31466..d3b97026 100644 --- a/model-serving-puller/server/server.go +++ b/model-serving-puller/server/server.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-serving-puller/server/server_test.go b/model-serving-puller/server/server_test.go index 03ab95d8..0478f396 100644 --- a/model-serving-puller/server/server_test.go +++ b/model-serving-puller/server/server_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/cache.go b/pullman/cache.go index 53a7c55f..d6573450 100644 --- a/pullman/cache.go +++ b/pullman/cache.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/cache_test.go b/pullman/cache_test.go index 0a2bdb3e..9d49a6af 100644 --- a/pullman/cache_test.go +++ b/pullman/cache_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/cmd/main.go b/pullman/cmd/main.go index d9f62648..ff6fc6ba 100644 --- a/pullman/cmd/main.go +++ b/pullman/cmd/main.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -18,7 +18,7 @@ import ( "encoding/json" "flag" "fmt" - "io/ioutil" + "os" "github.com/go-logr/zapr" "go.uber.org/zap" @@ -65,7 +65,7 @@ func main() { manager := pullman.NewPullManager(zapr.NewLogger(zaplog)) // create repository from the config file - configMapJSON, err := ioutil.ReadFile(configFilename) + configMapJSON, err := os.ReadFile(configFilename) if err != nil { fmt.Printf("Error reading config file [%s]: %v\n", configFilename, err) return diff --git a/pullman/config.go b/pullman/config.go index 849350c4..909a74b0 100644 --- a/pullman/config.go +++ b/pullman/config.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/config_test.go b/pullman/config_test.go index 74a8fa81..006166b1 100644 --- a/pullman/config_test.go +++ b/pullman/config_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/helpers.go b/pullman/helpers.go index eea88dad..85d53428 100644 --- a/pullman/helpers.go +++ b/pullman/helpers.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/pullman.go b/pullman/pullman.go index 0ce0be19..51369c16 100644 --- a/pullman/pullman.go +++ b/pullman/pullman.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/pullman_test.go b/pullman/pullman_test.go index dd02a0f9..a647e263 100644 --- a/pullman/pullman_test.go +++ b/pullman/pullman_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/azure/downloader.go b/pullman/storageproviders/azure/downloader.go index 698f8481..6a38595d 100644 --- a/pullman/storageproviders/azure/downloader.go +++ b/pullman/storageproviders/azure/downloader.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/azure/provider.go b/pullman/storageproviders/azure/provider.go index 6651fd49..92bd721b 100644 --- a/pullman/storageproviders/azure/provider.go +++ b/pullman/storageproviders/azure/provider.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/azure/provider_test.go b/pullman/storageproviders/azure/provider_test.go index 7ca9b1fb..ce327e6b 100644 --- a/pullman/storageproviders/azure/provider_test.go +++ b/pullman/storageproviders/azure/provider_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/gcs/downloader.go b/pullman/storageproviders/gcs/downloader.go index c95ee225..d9ebb631 100644 --- a/pullman/storageproviders/gcs/downloader.go +++ b/pullman/storageproviders/gcs/downloader.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/gcs/provider.go b/pullman/storageproviders/gcs/provider.go index d2a71199..69cbaead 100644 --- a/pullman/storageproviders/gcs/provider.go +++ b/pullman/storageproviders/gcs/provider.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/gcs/provider_test.go b/pullman/storageproviders/gcs/provider_test.go index 0f534633..b113b714 100644 --- a/pullman/storageproviders/gcs/provider_test.go +++ b/pullman/storageproviders/gcs/provider_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/http/downloader.go b/pullman/storageproviders/http/downloader.go index 2e320d19..dc3332cf 100644 --- a/pullman/storageproviders/http/downloader.go +++ b/pullman/storageproviders/http/downloader.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/http/provider.go b/pullman/storageproviders/http/provider.go index 2d70d77a..18a97cc5 100644 --- a/pullman/storageproviders/http/provider.go +++ b/pullman/storageproviders/http/provider.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/http/provider_test.go b/pullman/storageproviders/http/provider_test.go index b3e85efe..a51a455f 100644 --- a/pullman/storageproviders/http/provider_test.go +++ b/pullman/storageproviders/http/provider_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/pvc/provider.go b/pullman/storageproviders/pvc/provider.go index 68139b50..949c71f4 100644 --- a/pullman/storageproviders/pvc/provider.go +++ b/pullman/storageproviders/pvc/provider.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/pvc/provider_test.go b/pullman/storageproviders/pvc/provider_test.go index 66685257..ca316745 100644 --- a/pullman/storageproviders/pvc/provider_test.go +++ b/pullman/storageproviders/pvc/provider_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/s3/downloader.go b/pullman/storageproviders/s3/downloader.go index 74184717..0cb8be14 100644 --- a/pullman/storageproviders/s3/downloader.go +++ b/pullman/storageproviders/s3/downloader.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/s3/downloader_test.go b/pullman/storageproviders/s3/downloader_test.go index aa058e99..fd88e02c 100644 --- a/pullman/storageproviders/s3/downloader_test.go +++ b/pullman/storageproviders/s3/downloader_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/s3/provider.go b/pullman/storageproviders/s3/provider.go index 22fd4998..a33aba7c 100644 --- a/pullman/storageproviders/s3/provider.go +++ b/pullman/storageproviders/s3/provider.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/storageproviders/s3/provider_test.go b/pullman/storageproviders/s3/provider_test.go index 4b306053..429fdcc5 100644 --- a/pullman/storageproviders/s3/provider_test.go +++ b/pullman/storageproviders/s3/provider_test.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/pullman/types.go b/pullman/types.go index 5d65dfda..e11a3b4a 100644 --- a/pullman/types.go +++ b/pullman/types.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/scripts/fmt.sh b/scripts/fmt.sh index 7617f0ce..4821ffd7 100755 --- a/scripts/fmt.sh +++ b/scripts/fmt.sh @@ -13,9 +13,20 @@ # See the License for the specific language governing permissions and # limitations under the License.# +# Fix: 'fatal: detected dubious ownership in repository', +# only do this if it is running into the develop image +if [ "${PWD}" == "/opt/app" ]; then + git config --global --add safe.directory "*" +fi + pre-commit run --all-files RETURN_CODE=$? +## cat this file for helping on identifying the root cause when some issue happens +if [ -f /$USER/.cache/pre-commit/pre-commit.log ]; then + cat /$USER/.cache/pre-commit/pre-commit.log +fi + function echoError() { LIGHT_YELLOW='\033[1;33m' NC='\033[0m' # No Color From e0e001d38616494280a695d6bb56050b5756d567 Mon Sep 17 00:00:00 2001 From: Spolti Date: Wed, 15 Nov 2023 11:44:21 -0300 Subject: [PATCH 2/5] review suggestions Signed-off-by: Spolti --- Dockerfile | 2 ++ Makefile | 2 +- model-mesh-ovms-adapter/server/modelmanager.go | 5 ++--- scripts/fmt.sh | 6 ------ 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index dc1162ef..eba7ca90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -93,6 +93,8 @@ RUN true \ COPY .pre-commit-config.yaml ./ RUN git init && \ pre-commit install-hooks && \ + # Fix: 'fatal: detected dubious ownership in repository' \ + git config --global --add safe.directory "*" && \ rm -rf .git # Download dependencies before copying the source so they will be cached diff --git a/Makefile b/Makefile index 4bda4657..eff2176f 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ run: use.develop .PHONY: test ## Run tests -test: fmt +test: ./scripts/run_tests.sh .PHONY: fmt diff --git a/model-mesh-ovms-adapter/server/modelmanager.go b/model-mesh-ovms-adapter/server/modelmanager.go index fca6739b..1ebe5796 100644 --- a/model-mesh-ovms-adapter/server/modelmanager.go +++ b/model-mesh-ovms-adapter/server/modelmanager.go @@ -259,9 +259,8 @@ type request struct { c chan<- error } -// Run loop for the manager's internal actor that owns the model repository config -// -// # Maintains a slice of batched requests that are in process in the reload +// run loop for the manager's internal actor that owns the model repository config +// Maintains a slice of batched requests that are in process in the reload // // Returns results from the reload operation once it completes // Receives a stream of requests from its channel diff --git a/scripts/fmt.sh b/scripts/fmt.sh index 4821ffd7..3b406114 100755 --- a/scripts/fmt.sh +++ b/scripts/fmt.sh @@ -13,12 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License.# -# Fix: 'fatal: detected dubious ownership in repository', -# only do this if it is running into the develop image -if [ "${PWD}" == "/opt/app" ]; then - git config --global --add safe.directory "*" -fi - pre-commit run --all-files RETURN_CODE=$? From c1280e5ecf2e76389d3cc3ea7f08ee5f585cb026 Mon Sep 17 00:00:00 2001 From: Spolti Date: Thu, 23 Nov 2023 17:29:24 -0300 Subject: [PATCH 3/5] apply suggestions Signed-off-by: Spolti --- .pre-commit-config.yaml | 2 ++ internal/envconfig/envconfig.go | 8 ++++---- internal/util/fileutil.go | 2 +- scripts/fmt.sh | 6 +++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9484e35d..edfeed9a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,9 @@ repos: rev: v1.51.1 hooks: - id: golangci-lint + log_file: /tmp/pre-commit.log - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.4.1 hooks: - id: prettier + log_file: /tmp/pre-commit.log diff --git a/internal/envconfig/envconfig.go b/internal/envconfig/envconfig.go index d4a6ce3e..a56060f3 100644 --- a/internal/envconfig/envconfig.go +++ b/internal/envconfig/envconfig.go @@ -21,7 +21,7 @@ import ( "github.com/go-logr/logr" ) -// GetEnvString Returns the string value of environment variable "key" or the default value +// Returns the string value of environment variable "key" or the default value // if "key" is not set. Note if the environment variable is set to an empty // string, this will return an empty string, not defaultValue. func GetEnvString(key string, defaultValue string) string { @@ -31,7 +31,7 @@ func GetEnvString(key string, defaultValue string) string { return defaultValue } -// GetEnvInt Returns the integer of value environment variable "key" or the default value +// Returns the integer of value environment variable "key" or the default value // if "key" is not set. Note if the environment variable is set to a non // integer, including an empty string, this will fail and exit. func GetEnvInt(key string, defaultValue int, log logr.Logger) int { @@ -70,7 +70,7 @@ func GetEnvFloat(key string, defaultValue float64, log logr.Logger) float64 { return defaultValue } -// GetEnvBool Returns the bool value of environment variable "key" or the default value +// Returns the bool value of environment variable "key" or the default value // if "key" is not set. Note if the environment variable is set to a non // boolean, including an empty string, this will fail and exit. func GetEnvBool(key string, defaultValue bool, log logr.Logger) bool { @@ -85,7 +85,7 @@ func GetEnvBool(key string, defaultValue bool, log logr.Logger) bool { return defaultValue } -// GetEnvDuration Returns the duration value of environment variable "key" or a default value +// Returns the duration value of environment variable "key" or a default value // Note if the environment variable cannot be parsed as a duration, including an // empty string, this will fail and exit. func GetEnvDuration(key string, defaultValue time.Duration, log logr.Logger) time.Duration { diff --git a/internal/util/fileutil.go b/internal/util/fileutil.go index e157b05c..b2d29727 100644 --- a/internal/util/fileutil.go +++ b/internal/util/fileutil.go @@ -39,7 +39,7 @@ func RemoveFileFromListOfFileInfo(filename string, files []os.DirEntry) (bool, [ return true, files[:len(files)-1] } -// FileExists Check if a file exists at path +// Check if a file exists at path func FileExists(path string) (bool, error) { if _, err := os.Stat(path); err == nil { return true, nil diff --git a/scripts/fmt.sh b/scripts/fmt.sh index 3b406114..51234c45 100755 --- a/scripts/fmt.sh +++ b/scripts/fmt.sh @@ -16,9 +16,9 @@ pre-commit run --all-files RETURN_CODE=$? -## cat this file for helping on identifying the root cause when some issue happens -if [ -f /$USER/.cache/pre-commit/pre-commit.log ]; then - cat /$USER/.cache/pre-commit/pre-commit.log +# cat this file for helping on identifying the root cause when some issue happens +if [ -f /tmp/pre-commit.log ]; then + cat /tmp/pre-commit.log fi function echoError() { From cd9b8dd89408dd241d022f7b7c31e96a568f3975 Mon Sep 17 00:00:00 2001 From: Spolti Date: Tue, 28 Nov 2023 14:17:13 -0300 Subject: [PATCH 4/5] remove tab from license and add new line after it Signed-off-by: Spolti --- internal/envconfig/envconfig.go | 3 ++- internal/modelschema/modelschema.go | 3 ++- internal/util/connect.go | 3 ++- internal/util/connect_test.go | 3 ++- internal/util/fileutil.go | 2 +- internal/util/join.go | 3 ++- internal/util/join_test.go | 3 ++- internal/util/loadmodel.go | 3 ++- model-mesh-mlserver-adapter/main.go | 3 ++- model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go | 3 ++- model-mesh-mlserver-adapter/server/adaptmodellayout_test.go | 3 ++- model-mesh-mlserver-adapter/server/config.go | 3 ++- model-mesh-mlserver-adapter/server/server.go | 3 ++- model-mesh-mlserver-adapter/server/server_test.go | 3 ++- model-mesh-ovms-adapter/main.go | 3 ++- model-mesh-ovms-adapter/server/adaptmodellayout.go | 3 ++- model-mesh-ovms-adapter/server/adaptmodellayout_test.go | 3 ++- model-mesh-ovms-adapter/server/config.go | 3 ++- model-mesh-ovms-adapter/server/const.go | 3 ++- model-mesh-ovms-adapter/server/modelconfig.go | 3 ++- model-mesh-ovms-adapter/server/modelmanager.go | 2 +- model-mesh-ovms-adapter/server/modelmanager_test.go | 3 ++- model-mesh-ovms-adapter/server/server.go | 3 ++- model-mesh-ovms-adapter/server/server_test.go | 3 ++- model-mesh-torchserve-adapter/main.go | 3 ++- model-mesh-torchserve-adapter/server/config.go | 3 ++- .../torchserve/mock_torchserve_server.go | 3 ++- model-mesh-triton-adapter/main.go | 3 ++- model-mesh-triton-adapter/server/adaptmodellayout.go | 2 +- model-mesh-triton-adapter/server/adaptmodellayout_test.go | 3 ++- model-mesh-triton-adapter/server/config.go | 3 ++- model-mesh-triton-adapter/server/const.go | 3 ++- model-mesh-triton-adapter/server/schema.go | 3 ++- model-mesh-triton-adapter/server/schema_test.go | 3 ++- model-mesh-triton-adapter/server/server.go | 3 ++- model-mesh-triton-adapter/server/server_test.go | 3 ++- model-mesh-triton-adapter/server/utils.go | 2 +- .../triton/adapter_client/adapter_client.go | 3 ++- model-mesh-triton-adapter/triton/mesh_client/mesh_client.go | 3 ++- model-mesh-triton-adapter/triton/mock_triton_server.go | 3 ++- model-serving-puller/main.go | 3 ++- model-serving-puller/puller/config.go | 3 ++- model-serving-puller/puller/dotpath.go | 3 ++- model-serving-puller/puller/dotpath_test.go | 3 ++- model-serving-puller/puller/puller.go | 3 ++- model-serving-puller/puller/puller_test.go | 3 ++- model-serving-puller/server/config.go | 3 ++- model-serving-puller/server/modelstate.go | 3 ++- model-serving-puller/server/modelstate_test.go | 3 ++- model-serving-puller/server/server.go | 3 ++- model-serving-puller/server/server_test.go | 3 ++- pullman/cache.go | 3 ++- pullman/cache_test.go | 3 ++- pullman/cmd/main.go | 3 ++- pullman/config.go | 3 ++- pullman/config_test.go | 3 ++- pullman/helpers.go | 3 ++- pullman/pullman.go | 3 ++- pullman/pullman_test.go | 3 ++- pullman/storageproviders/azure/downloader.go | 3 ++- pullman/storageproviders/azure/provider.go | 3 ++- pullman/storageproviders/azure/provider_test.go | 3 ++- pullman/storageproviders/gcs/downloader.go | 3 ++- pullman/storageproviders/gcs/provider.go | 3 ++- pullman/storageproviders/gcs/provider_test.go | 3 ++- pullman/storageproviders/http/downloader.go | 3 ++- pullman/storageproviders/http/provider.go | 3 ++- pullman/storageproviders/http/provider_test.go | 3 ++- pullman/storageproviders/pvc/provider.go | 3 ++- pullman/storageproviders/pvc/provider_test.go | 3 ++- pullman/storageproviders/s3/downloader.go | 3 ++- pullman/storageproviders/s3/downloader_test.go | 3 ++- pullman/storageproviders/s3/provider.go | 3 ++- pullman/storageproviders/s3/provider_test.go | 3 ++- pullman/types.go | 3 ++- scripts/fmt.sh | 2 +- 76 files changed, 147 insertions(+), 76 deletions(-) diff --git a/internal/envconfig/envconfig.go b/internal/envconfig/envconfig.go index a56060f3..5213c431 100644 --- a/internal/envconfig/envconfig.go +++ b/internal/envconfig/envconfig.go @@ -4,13 +4,14 @@ // 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 +// 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. + package envconfig import ( diff --git a/internal/modelschema/modelschema.go b/internal/modelschema/modelschema.go index 11874037..2902c405 100644 --- a/internal/modelschema/modelschema.go +++ b/internal/modelschema/modelschema.go @@ -4,13 +4,14 @@ // 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 +// 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. + package modelschema import ( diff --git a/internal/util/connect.go b/internal/util/connect.go index 11166df9..3dbb1bf7 100644 --- a/internal/util/connect.go +++ b/internal/util/connect.go @@ -4,13 +4,14 @@ // 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 +// 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. + package util import ( diff --git a/internal/util/connect_test.go b/internal/util/connect_test.go index 8d4fd218..6876bd98 100644 --- a/internal/util/connect_test.go +++ b/internal/util/connect_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package util import ( diff --git a/internal/util/fileutil.go b/internal/util/fileutil.go index b2d29727..7092ee2d 100644 --- a/internal/util/fileutil.go +++ b/internal/util/fileutil.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/internal/util/join.go b/internal/util/join.go index 57f7607e..d358eded 100644 --- a/internal/util/join.go +++ b/internal/util/join.go @@ -4,13 +4,14 @@ // 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 +// 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. + package util import ( diff --git a/internal/util/join_test.go b/internal/util/join_test.go index 325c5819..77e0400f 100644 --- a/internal/util/join_test.go +++ b/internal/util/join_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package util import ( diff --git a/internal/util/loadmodel.go b/internal/util/loadmodel.go index b9621b66..dc694108 100644 --- a/internal/util/loadmodel.go +++ b/internal/util/loadmodel.go @@ -4,13 +4,14 @@ // 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 +// 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. + package util import ( diff --git a/model-mesh-mlserver-adapter/main.go b/model-mesh-mlserver-adapter/main.go index 368f47e4..fcbbcb74 100644 --- a/model-mesh-mlserver-adapter/main.go +++ b/model-mesh-mlserver-adapter/main.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go b/model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go index a577c1cd..db76cb9d 100644 --- a/model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go +++ b/model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go b/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go index 5e9c3914..4732be04 100644 --- a/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go +++ b/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-mlserver-adapter/server/config.go b/model-mesh-mlserver-adapter/server/config.go index 0ceef9d9..8afadb20 100644 --- a/model-mesh-mlserver-adapter/server/config.go +++ b/model-mesh-mlserver-adapter/server/config.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-mlserver-adapter/server/server.go b/model-mesh-mlserver-adapter/server/server.go index 5fc499f0..100978c6 100644 --- a/model-mesh-mlserver-adapter/server/server.go +++ b/model-mesh-mlserver-adapter/server/server.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-mlserver-adapter/server/server_test.go b/model-mesh-mlserver-adapter/server/server_test.go index 0e1d3726..0de1e52e 100644 --- a/model-mesh-mlserver-adapter/server/server_test.go +++ b/model-mesh-mlserver-adapter/server/server_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-ovms-adapter/main.go b/model-mesh-ovms-adapter/main.go index 92f48f6f..807a84a6 100644 --- a/model-mesh-ovms-adapter/main.go +++ b/model-mesh-ovms-adapter/main.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-mesh-ovms-adapter/server/adaptmodellayout.go b/model-mesh-ovms-adapter/server/adaptmodellayout.go index 09d6a0eb..e5d7bf3a 100644 --- a/model-mesh-ovms-adapter/server/adaptmodellayout.go +++ b/model-mesh-ovms-adapter/server/adaptmodellayout.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-ovms-adapter/server/adaptmodellayout_test.go b/model-mesh-ovms-adapter/server/adaptmodellayout_test.go index 3d750027..48e68ac5 100644 --- a/model-mesh-ovms-adapter/server/adaptmodellayout_test.go +++ b/model-mesh-ovms-adapter/server/adaptmodellayout_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-ovms-adapter/server/config.go b/model-mesh-ovms-adapter/server/config.go index d24fd135..c27e3624 100644 --- a/model-mesh-ovms-adapter/server/config.go +++ b/model-mesh-ovms-adapter/server/config.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-ovms-adapter/server/const.go b/model-mesh-ovms-adapter/server/const.go index ff0f5bbe..228aa48b 100644 --- a/model-mesh-ovms-adapter/server/const.go +++ b/model-mesh-ovms-adapter/server/const.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server const ( diff --git a/model-mesh-ovms-adapter/server/modelconfig.go b/model-mesh-ovms-adapter/server/modelconfig.go index 9477a36e..8b9d7df1 100644 --- a/model-mesh-ovms-adapter/server/modelconfig.go +++ b/model-mesh-ovms-adapter/server/modelconfig.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server // Types defining the structure of the OVMS Multi-Model config file diff --git a/model-mesh-ovms-adapter/server/modelmanager.go b/model-mesh-ovms-adapter/server/modelmanager.go index 1ebe5796..84160b06 100644 --- a/model-mesh-ovms-adapter/server/modelmanager.go +++ b/model-mesh-ovms-adapter/server/modelmanager.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-ovms-adapter/server/modelmanager_test.go b/model-mesh-ovms-adapter/server/modelmanager_test.go index 2355278a..142b1758 100644 --- a/model-mesh-ovms-adapter/server/modelmanager_test.go +++ b/model-mesh-ovms-adapter/server/modelmanager_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-ovms-adapter/server/server.go b/model-mesh-ovms-adapter/server/server.go index 3c7399d8..3b0a1c54 100644 --- a/model-mesh-ovms-adapter/server/server.go +++ b/model-mesh-ovms-adapter/server/server.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-ovms-adapter/server/server_test.go b/model-mesh-ovms-adapter/server/server_test.go index 7ef32e7f..52df935a 100644 --- a/model-mesh-ovms-adapter/server/server_test.go +++ b/model-mesh-ovms-adapter/server/server_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-torchserve-adapter/main.go b/model-mesh-torchserve-adapter/main.go index 43c45071..bd2de4d3 100644 --- a/model-mesh-torchserve-adapter/main.go +++ b/model-mesh-torchserve-adapter/main.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-mesh-torchserve-adapter/server/config.go b/model-mesh-torchserve-adapter/server/config.go index 1af6d858..b6ac1e58 100644 --- a/model-mesh-torchserve-adapter/server/config.go +++ b/model-mesh-torchserve-adapter/server/config.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go b/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go index 9cf2e4d1..8c446df6 100644 --- a/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go +++ b/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-mesh-triton-adapter/main.go b/model-mesh-triton-adapter/main.go index 8391fd66..88f8735a 100644 --- a/model-mesh-triton-adapter/main.go +++ b/model-mesh-triton-adapter/main.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-mesh-triton-adapter/server/adaptmodellayout.go b/model-mesh-triton-adapter/server/adaptmodellayout.go index 3663bbf2..6c142718 100644 --- a/model-mesh-triton-adapter/server/adaptmodellayout.go +++ b/model-mesh-triton-adapter/server/adaptmodellayout.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-triton-adapter/server/adaptmodellayout_test.go b/model-mesh-triton-adapter/server/adaptmodellayout_test.go index c077440d..d2667868 100644 --- a/model-mesh-triton-adapter/server/adaptmodellayout_test.go +++ b/model-mesh-triton-adapter/server/adaptmodellayout_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-triton-adapter/server/config.go b/model-mesh-triton-adapter/server/config.go index 1fa136aa..0835f134 100644 --- a/model-mesh-triton-adapter/server/config.go +++ b/model-mesh-triton-adapter/server/config.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-triton-adapter/server/const.go b/model-mesh-triton-adapter/server/const.go index c7e3b768..4f2de6db 100644 --- a/model-mesh-triton-adapter/server/const.go +++ b/model-mesh-triton-adapter/server/const.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server const ( diff --git a/model-mesh-triton-adapter/server/schema.go b/model-mesh-triton-adapter/server/schema.go index da459e88..655cbbff 100644 --- a/model-mesh-triton-adapter/server/schema.go +++ b/model-mesh-triton-adapter/server/schema.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server // Refer to this proto file for schema and supported data types diff --git a/model-mesh-triton-adapter/server/schema_test.go b/model-mesh-triton-adapter/server/schema_test.go index 8f6959d7..f6a6b052 100644 --- a/model-mesh-triton-adapter/server/schema_test.go +++ b/model-mesh-triton-adapter/server/schema_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-triton-adapter/server/server.go b/model-mesh-triton-adapter/server/server.go index 6b831f14..8466ec0b 100644 --- a/model-mesh-triton-adapter/server/server.go +++ b/model-mesh-triton-adapter/server/server.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-triton-adapter/server/server_test.go b/model-mesh-triton-adapter/server/server_test.go index 9434ed70..ac32d957 100644 --- a/model-mesh-triton-adapter/server/server_test.go +++ b/model-mesh-triton-adapter/server/server_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-triton-adapter/server/utils.go b/model-mesh-triton-adapter/server/utils.go index 7bc456b5..19b33ada 100644 --- a/model-mesh-triton-adapter/server/utils.go +++ b/model-mesh-triton-adapter/server/utils.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go b/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go index 079428bc..ba5887bf 100644 --- a/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go +++ b/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go b/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go index ab0c27b3..119f8253 100644 --- a/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go +++ b/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-mesh-triton-adapter/triton/mock_triton_server.go b/model-mesh-triton-adapter/triton/mock_triton_server.go index a9ba2b4b..02a2fb2b 100644 --- a/model-mesh-triton-adapter/triton/mock_triton_server.go +++ b/model-mesh-triton-adapter/triton/mock_triton_server.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-serving-puller/main.go b/model-serving-puller/main.go index 487b021e..8e444607 100644 --- a/model-serving-puller/main.go +++ b/model-serving-puller/main.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-serving-puller/puller/config.go b/model-serving-puller/puller/config.go index 2af39601..78c394ec 100644 --- a/model-serving-puller/puller/config.go +++ b/model-serving-puller/puller/config.go @@ -4,13 +4,14 @@ // 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 +// 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. + package puller import ( diff --git a/model-serving-puller/puller/dotpath.go b/model-serving-puller/puller/dotpath.go index 42329d15..a4cfde40 100644 --- a/model-serving-puller/puller/dotpath.go +++ b/model-serving-puller/puller/dotpath.go @@ -4,13 +4,14 @@ // 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 +// 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. + package puller import ( diff --git a/model-serving-puller/puller/dotpath_test.go b/model-serving-puller/puller/dotpath_test.go index 7441b913..499fa035 100644 --- a/model-serving-puller/puller/dotpath_test.go +++ b/model-serving-puller/puller/dotpath_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package puller import ( diff --git a/model-serving-puller/puller/puller.go b/model-serving-puller/puller/puller.go index 89481e91..0c4dae98 100644 --- a/model-serving-puller/puller/puller.go +++ b/model-serving-puller/puller/puller.go @@ -4,13 +4,14 @@ // 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 +// 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. + package puller import ( diff --git a/model-serving-puller/puller/puller_test.go b/model-serving-puller/puller/puller_test.go index 5d86a4ff..99f87685 100644 --- a/model-serving-puller/puller/puller_test.go +++ b/model-serving-puller/puller/puller_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package puller import ( diff --git a/model-serving-puller/server/config.go b/model-serving-puller/server/config.go index aa8c4797..b76e9215 100644 --- a/model-serving-puller/server/config.go +++ b/model-serving-puller/server/config.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-serving-puller/server/modelstate.go b/model-serving-puller/server/modelstate.go index 68b601a8..cc9046ee 100644 --- a/model-serving-puller/server/modelstate.go +++ b/model-serving-puller/server/modelstate.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-serving-puller/server/modelstate_test.go b/model-serving-puller/server/modelstate_test.go index ada5a067..53770ffb 100644 --- a/model-serving-puller/server/modelstate_test.go +++ b/model-serving-puller/server/modelstate_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-serving-puller/server/server.go b/model-serving-puller/server/server.go index d3b97026..9507fbf9 100644 --- a/model-serving-puller/server/server.go +++ b/model-serving-puller/server/server.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-serving-puller/server/server_test.go b/model-serving-puller/server/server_test.go index 0478f396..9a4b14fa 100644 --- a/model-serving-puller/server/server_test.go +++ b/model-serving-puller/server/server_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/pullman/cache.go b/pullman/cache.go index d6573450..ff0cafd7 100644 --- a/pullman/cache.go +++ b/pullman/cache.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/pullman/cache_test.go b/pullman/cache_test.go index 9d49a6af..0a818a1d 100644 --- a/pullman/cache_test.go +++ b/pullman/cache_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/pullman/cmd/main.go b/pullman/cmd/main.go index ff6fc6ba..cacb26d1 100644 --- a/pullman/cmd/main.go +++ b/pullman/cmd/main.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/pullman/config.go b/pullman/config.go index 909a74b0..af768fb3 100644 --- a/pullman/config.go +++ b/pullman/config.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/pullman/config_test.go b/pullman/config_test.go index 006166b1..d36e6d9b 100644 --- a/pullman/config_test.go +++ b/pullman/config_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/pullman/helpers.go b/pullman/helpers.go index 85d53428..6835798c 100644 --- a/pullman/helpers.go +++ b/pullman/helpers.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/pullman/pullman.go b/pullman/pullman.go index 51369c16..90b11261 100644 --- a/pullman/pullman.go +++ b/pullman/pullman.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/pullman/pullman_test.go b/pullman/pullman_test.go index a647e263..201ba013 100644 --- a/pullman/pullman_test.go +++ b/pullman/pullman_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/pullman/storageproviders/azure/downloader.go b/pullman/storageproviders/azure/downloader.go index 6a38595d..0599e0cb 100644 --- a/pullman/storageproviders/azure/downloader.go +++ b/pullman/storageproviders/azure/downloader.go @@ -4,13 +4,14 @@ // 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 +// 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. + package azureprovider import ( diff --git a/pullman/storageproviders/azure/provider.go b/pullman/storageproviders/azure/provider.go index 92bd721b..4973c673 100644 --- a/pullman/storageproviders/azure/provider.go +++ b/pullman/storageproviders/azure/provider.go @@ -4,13 +4,14 @@ // 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 +// 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. + package azureprovider import ( diff --git a/pullman/storageproviders/azure/provider_test.go b/pullman/storageproviders/azure/provider_test.go index ce327e6b..c7e5a750 100644 --- a/pullman/storageproviders/azure/provider_test.go +++ b/pullman/storageproviders/azure/provider_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package azureprovider import ( diff --git a/pullman/storageproviders/gcs/downloader.go b/pullman/storageproviders/gcs/downloader.go index d9ebb631..4a512127 100644 --- a/pullman/storageproviders/gcs/downloader.go +++ b/pullman/storageproviders/gcs/downloader.go @@ -4,13 +4,14 @@ // 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 +// 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. + package gcsprovider import ( diff --git a/pullman/storageproviders/gcs/provider.go b/pullman/storageproviders/gcs/provider.go index 69cbaead..b0b8012d 100644 --- a/pullman/storageproviders/gcs/provider.go +++ b/pullman/storageproviders/gcs/provider.go @@ -4,13 +4,14 @@ // 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 +// 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. + package gcsprovider import ( diff --git a/pullman/storageproviders/gcs/provider_test.go b/pullman/storageproviders/gcs/provider_test.go index b113b714..a8748b2c 100644 --- a/pullman/storageproviders/gcs/provider_test.go +++ b/pullman/storageproviders/gcs/provider_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package gcsprovider import ( diff --git a/pullman/storageproviders/http/downloader.go b/pullman/storageproviders/http/downloader.go index dc3332cf..5331223c 100644 --- a/pullman/storageproviders/http/downloader.go +++ b/pullman/storageproviders/http/downloader.go @@ -4,13 +4,14 @@ // 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 +// 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. + package httpprovider import ( diff --git a/pullman/storageproviders/http/provider.go b/pullman/storageproviders/http/provider.go index 18a97cc5..88ad8d0c 100644 --- a/pullman/storageproviders/http/provider.go +++ b/pullman/storageproviders/http/provider.go @@ -4,13 +4,14 @@ // 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 +// 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. + package httpprovider import ( diff --git a/pullman/storageproviders/http/provider_test.go b/pullman/storageproviders/http/provider_test.go index a51a455f..b2c1a8fe 100644 --- a/pullman/storageproviders/http/provider_test.go +++ b/pullman/storageproviders/http/provider_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package httpprovider import ( diff --git a/pullman/storageproviders/pvc/provider.go b/pullman/storageproviders/pvc/provider.go index 949c71f4..0e7d2d7f 100644 --- a/pullman/storageproviders/pvc/provider.go +++ b/pullman/storageproviders/pvc/provider.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pvcprovider import ( diff --git a/pullman/storageproviders/pvc/provider_test.go b/pullman/storageproviders/pvc/provider_test.go index ca316745..6973d9e1 100644 --- a/pullman/storageproviders/pvc/provider_test.go +++ b/pullman/storageproviders/pvc/provider_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pvcprovider import ( diff --git a/pullman/storageproviders/s3/downloader.go b/pullman/storageproviders/s3/downloader.go index 0cb8be14..d643f00c 100644 --- a/pullman/storageproviders/s3/downloader.go +++ b/pullman/storageproviders/s3/downloader.go @@ -4,13 +4,14 @@ // 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 +// 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. + package s3provider import ( diff --git a/pullman/storageproviders/s3/downloader_test.go b/pullman/storageproviders/s3/downloader_test.go index fd88e02c..0c429944 100644 --- a/pullman/storageproviders/s3/downloader_test.go +++ b/pullman/storageproviders/s3/downloader_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package s3provider import ( diff --git a/pullman/storageproviders/s3/provider.go b/pullman/storageproviders/s3/provider.go index a33aba7c..057319ed 100644 --- a/pullman/storageproviders/s3/provider.go +++ b/pullman/storageproviders/s3/provider.go @@ -4,13 +4,14 @@ // 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 +// 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. + package s3provider import ( diff --git a/pullman/storageproviders/s3/provider_test.go b/pullman/storageproviders/s3/provider_test.go index 429fdcc5..37d578e5 100644 --- a/pullman/storageproviders/s3/provider_test.go +++ b/pullman/storageproviders/s3/provider_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package s3provider import ( diff --git a/pullman/types.go b/pullman/types.go index e11a3b4a..86644a36 100644 --- a/pullman/types.go +++ b/pullman/types.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/scripts/fmt.sh b/scripts/fmt.sh index 51234c45..474307b8 100755 --- a/scripts/fmt.sh +++ b/scripts/fmt.sh @@ -11,7 +11,7 @@ # 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.# +# limitations under the License. pre-commit run --all-files RETURN_CODE=$? From 0348f61c640583d65ae37d9346c26180d0f3cb76 Mon Sep 17 00:00:00 2001 From: Spolti Date: Tue, 28 Nov 2023 14:23:03 -0300 Subject: [PATCH 5/5] rename the pre-commint log file Signed-off-by: Spolti --- .dockerignore | 2 ++ .gitignore | 3 +++ .pre-commit-config.yaml | 4 ++-- internal/envconfig/envconfig.go | 3 +-- internal/modelschema/modelschema.go | 3 +-- internal/util/connect.go | 3 +-- internal/util/connect_test.go | 3 +-- internal/util/fileutil.go | 3 +-- internal/util/join.go | 3 +-- internal/util/join_test.go | 3 +-- internal/util/loadmodel.go | 3 +-- model-mesh-mlserver-adapter/main.go | 3 +-- model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go | 3 +-- model-mesh-mlserver-adapter/server/adaptmodellayout_test.go | 3 +-- model-mesh-mlserver-adapter/server/config.go | 3 +-- model-mesh-mlserver-adapter/server/server.go | 3 +-- model-mesh-mlserver-adapter/server/server_test.go | 3 +-- model-mesh-ovms-adapter/main.go | 3 +-- model-mesh-ovms-adapter/server/adaptmodellayout.go | 3 +-- model-mesh-ovms-adapter/server/adaptmodellayout_test.go | 3 +-- model-mesh-ovms-adapter/server/config.go | 3 +-- model-mesh-ovms-adapter/server/const.go | 3 +-- model-mesh-ovms-adapter/server/modelconfig.go | 3 +-- model-mesh-ovms-adapter/server/modelmanager.go | 3 +-- model-mesh-ovms-adapter/server/modelmanager_test.go | 3 +-- model-mesh-ovms-adapter/server/server.go | 3 +-- model-mesh-ovms-adapter/server/server_test.go | 3 +-- model-mesh-torchserve-adapter/main.go | 3 +-- model-mesh-torchserve-adapter/server/config.go | 3 +-- .../torchserve/mock_torchserve_server.go | 3 +-- model-mesh-triton-adapter/main.go | 3 +-- model-mesh-triton-adapter/server/adaptmodellayout.go | 3 +-- model-mesh-triton-adapter/server/adaptmodellayout_test.go | 3 +-- model-mesh-triton-adapter/server/config.go | 3 +-- model-mesh-triton-adapter/server/const.go | 3 +-- model-mesh-triton-adapter/server/schema.go | 3 +-- model-mesh-triton-adapter/server/schema_test.go | 3 +-- model-mesh-triton-adapter/server/server.go | 3 +-- model-mesh-triton-adapter/server/server_test.go | 3 +-- model-mesh-triton-adapter/server/utils.go | 3 +-- .../triton/adapter_client/adapter_client.go | 3 +-- model-mesh-triton-adapter/triton/mesh_client/mesh_client.go | 3 +-- model-mesh-triton-adapter/triton/mock_triton_server.go | 3 +-- model-serving-puller/main.go | 3 +-- model-serving-puller/puller/config.go | 3 +-- model-serving-puller/puller/dotpath.go | 3 +-- model-serving-puller/puller/dotpath_test.go | 3 +-- model-serving-puller/puller/puller.go | 3 +-- model-serving-puller/puller/puller_test.go | 3 +-- model-serving-puller/server/config.go | 3 +-- model-serving-puller/server/modelstate.go | 3 +-- model-serving-puller/server/modelstate_test.go | 3 +-- model-serving-puller/server/server.go | 3 +-- pullman/cache.go | 3 +-- pullman/cache_test.go | 3 +-- pullman/cmd/main.go | 3 +-- pullman/config.go | 3 +-- pullman/config_test.go | 3 +-- pullman/helpers.go | 3 +-- pullman/pullman.go | 3 +-- pullman/pullman_test.go | 3 +-- pullman/storageproviders/azure/downloader.go | 3 +-- pullman/storageproviders/azure/provider.go | 3 +-- pullman/storageproviders/azure/provider_test.go | 3 +-- pullman/storageproviders/gcs/downloader.go | 3 +-- pullman/storageproviders/gcs/provider.go | 3 +-- pullman/storageproviders/gcs/provider_test.go | 3 +-- pullman/storageproviders/http/downloader.go | 3 +-- scripts/fmt.sh | 4 ++-- 69 files changed, 74 insertions(+), 134 deletions(-) diff --git a/.dockerignore b/.dockerignore index a81ec834..d7898a32 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,3 +4,5 @@ .DS_Store Dockerfile temp +.pre-commit.log + diff --git a/.gitignore b/.gitignore index 351ba82e..f2611a2d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ *.iml public/ + +.pre-commit.log + diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index edfeed9a..3b429b16 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,9 +16,9 @@ repos: rev: v1.51.1 hooks: - id: golangci-lint - log_file: /tmp/pre-commit.log + log_file: .pre-commit.log - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.4.1 hooks: - id: prettier - log_file: /tmp/pre-commit.log + log_file: .pre-commit.log diff --git a/internal/envconfig/envconfig.go b/internal/envconfig/envconfig.go index 5213c431..a56060f3 100644 --- a/internal/envconfig/envconfig.go +++ b/internal/envconfig/envconfig.go @@ -4,14 +4,13 @@ // 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 +// 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. - package envconfig import ( diff --git a/internal/modelschema/modelschema.go b/internal/modelschema/modelschema.go index 2902c405..11874037 100644 --- a/internal/modelschema/modelschema.go +++ b/internal/modelschema/modelschema.go @@ -4,14 +4,13 @@ // 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 +// 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. - package modelschema import ( diff --git a/internal/util/connect.go b/internal/util/connect.go index 3dbb1bf7..11166df9 100644 --- a/internal/util/connect.go +++ b/internal/util/connect.go @@ -4,14 +4,13 @@ // 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 +// 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. - package util import ( diff --git a/internal/util/connect_test.go b/internal/util/connect_test.go index 6876bd98..8d4fd218 100644 --- a/internal/util/connect_test.go +++ b/internal/util/connect_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package util import ( diff --git a/internal/util/fileutil.go b/internal/util/fileutil.go index 7092ee2d..f1c86c02 100644 --- a/internal/util/fileutil.go +++ b/internal/util/fileutil.go @@ -4,14 +4,13 @@ // 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 +// 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. - package util import ( diff --git a/internal/util/join.go b/internal/util/join.go index d358eded..57f7607e 100644 --- a/internal/util/join.go +++ b/internal/util/join.go @@ -4,14 +4,13 @@ // 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 +// 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. - package util import ( diff --git a/internal/util/join_test.go b/internal/util/join_test.go index 77e0400f..325c5819 100644 --- a/internal/util/join_test.go +++ b/internal/util/join_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package util import ( diff --git a/internal/util/loadmodel.go b/internal/util/loadmodel.go index dc694108..b9621b66 100644 --- a/internal/util/loadmodel.go +++ b/internal/util/loadmodel.go @@ -4,14 +4,13 @@ // 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 +// 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. - package util import ( diff --git a/model-mesh-mlserver-adapter/main.go b/model-mesh-mlserver-adapter/main.go index fcbbcb74..368f47e4 100644 --- a/model-mesh-mlserver-adapter/main.go +++ b/model-mesh-mlserver-adapter/main.go @@ -4,14 +4,13 @@ // 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 +// 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. - package main import ( diff --git a/model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go b/model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go index db76cb9d..a577c1cd 100644 --- a/model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go +++ b/model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go @@ -4,14 +4,13 @@ // 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 +// 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. - package main import ( diff --git a/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go b/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go index 4732be04..5e9c3914 100644 --- a/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go +++ b/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-mlserver-adapter/server/config.go b/model-mesh-mlserver-adapter/server/config.go index 8afadb20..0ceef9d9 100644 --- a/model-mesh-mlserver-adapter/server/config.go +++ b/model-mesh-mlserver-adapter/server/config.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-mlserver-adapter/server/server.go b/model-mesh-mlserver-adapter/server/server.go index 100978c6..5fc499f0 100644 --- a/model-mesh-mlserver-adapter/server/server.go +++ b/model-mesh-mlserver-adapter/server/server.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-mlserver-adapter/server/server_test.go b/model-mesh-mlserver-adapter/server/server_test.go index 0de1e52e..0e1d3726 100644 --- a/model-mesh-mlserver-adapter/server/server_test.go +++ b/model-mesh-mlserver-adapter/server/server_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-ovms-adapter/main.go b/model-mesh-ovms-adapter/main.go index 807a84a6..92f48f6f 100644 --- a/model-mesh-ovms-adapter/main.go +++ b/model-mesh-ovms-adapter/main.go @@ -4,14 +4,13 @@ // 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 +// 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. - package main import ( diff --git a/model-mesh-ovms-adapter/server/adaptmodellayout.go b/model-mesh-ovms-adapter/server/adaptmodellayout.go index e5d7bf3a..09d6a0eb 100644 --- a/model-mesh-ovms-adapter/server/adaptmodellayout.go +++ b/model-mesh-ovms-adapter/server/adaptmodellayout.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-ovms-adapter/server/adaptmodellayout_test.go b/model-mesh-ovms-adapter/server/adaptmodellayout_test.go index 48e68ac5..3d750027 100644 --- a/model-mesh-ovms-adapter/server/adaptmodellayout_test.go +++ b/model-mesh-ovms-adapter/server/adaptmodellayout_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-ovms-adapter/server/config.go b/model-mesh-ovms-adapter/server/config.go index c27e3624..d24fd135 100644 --- a/model-mesh-ovms-adapter/server/config.go +++ b/model-mesh-ovms-adapter/server/config.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-ovms-adapter/server/const.go b/model-mesh-ovms-adapter/server/const.go index 228aa48b..ff0f5bbe 100644 --- a/model-mesh-ovms-adapter/server/const.go +++ b/model-mesh-ovms-adapter/server/const.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server const ( diff --git a/model-mesh-ovms-adapter/server/modelconfig.go b/model-mesh-ovms-adapter/server/modelconfig.go index 8b9d7df1..9477a36e 100644 --- a/model-mesh-ovms-adapter/server/modelconfig.go +++ b/model-mesh-ovms-adapter/server/modelconfig.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server // Types defining the structure of the OVMS Multi-Model config file diff --git a/model-mesh-ovms-adapter/server/modelmanager.go b/model-mesh-ovms-adapter/server/modelmanager.go index 84160b06..270c70f1 100644 --- a/model-mesh-ovms-adapter/server/modelmanager.go +++ b/model-mesh-ovms-adapter/server/modelmanager.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-ovms-adapter/server/modelmanager_test.go b/model-mesh-ovms-adapter/server/modelmanager_test.go index 142b1758..2355278a 100644 --- a/model-mesh-ovms-adapter/server/modelmanager_test.go +++ b/model-mesh-ovms-adapter/server/modelmanager_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-ovms-adapter/server/server.go b/model-mesh-ovms-adapter/server/server.go index 3b0a1c54..3c7399d8 100644 --- a/model-mesh-ovms-adapter/server/server.go +++ b/model-mesh-ovms-adapter/server/server.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-ovms-adapter/server/server_test.go b/model-mesh-ovms-adapter/server/server_test.go index 52df935a..7ef32e7f 100644 --- a/model-mesh-ovms-adapter/server/server_test.go +++ b/model-mesh-ovms-adapter/server/server_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-torchserve-adapter/main.go b/model-mesh-torchserve-adapter/main.go index bd2de4d3..43c45071 100644 --- a/model-mesh-torchserve-adapter/main.go +++ b/model-mesh-torchserve-adapter/main.go @@ -4,14 +4,13 @@ // 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 +// 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. - package main import ( diff --git a/model-mesh-torchserve-adapter/server/config.go b/model-mesh-torchserve-adapter/server/config.go index b6ac1e58..1af6d858 100644 --- a/model-mesh-torchserve-adapter/server/config.go +++ b/model-mesh-torchserve-adapter/server/config.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go b/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go index 8c446df6..9cf2e4d1 100644 --- a/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go +++ b/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go @@ -4,14 +4,13 @@ // 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 +// 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. - package main import ( diff --git a/model-mesh-triton-adapter/main.go b/model-mesh-triton-adapter/main.go index 88f8735a..8391fd66 100644 --- a/model-mesh-triton-adapter/main.go +++ b/model-mesh-triton-adapter/main.go @@ -4,14 +4,13 @@ // 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 +// 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. - package main import ( diff --git a/model-mesh-triton-adapter/server/adaptmodellayout.go b/model-mesh-triton-adapter/server/adaptmodellayout.go index 6c142718..643a212d 100644 --- a/model-mesh-triton-adapter/server/adaptmodellayout.go +++ b/model-mesh-triton-adapter/server/adaptmodellayout.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-triton-adapter/server/adaptmodellayout_test.go b/model-mesh-triton-adapter/server/adaptmodellayout_test.go index d2667868..c077440d 100644 --- a/model-mesh-triton-adapter/server/adaptmodellayout_test.go +++ b/model-mesh-triton-adapter/server/adaptmodellayout_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-triton-adapter/server/config.go b/model-mesh-triton-adapter/server/config.go index 0835f134..1fa136aa 100644 --- a/model-mesh-triton-adapter/server/config.go +++ b/model-mesh-triton-adapter/server/config.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-triton-adapter/server/const.go b/model-mesh-triton-adapter/server/const.go index 4f2de6db..c7e3b768 100644 --- a/model-mesh-triton-adapter/server/const.go +++ b/model-mesh-triton-adapter/server/const.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server const ( diff --git a/model-mesh-triton-adapter/server/schema.go b/model-mesh-triton-adapter/server/schema.go index 655cbbff..da459e88 100644 --- a/model-mesh-triton-adapter/server/schema.go +++ b/model-mesh-triton-adapter/server/schema.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server // Refer to this proto file for schema and supported data types diff --git a/model-mesh-triton-adapter/server/schema_test.go b/model-mesh-triton-adapter/server/schema_test.go index f6a6b052..8f6959d7 100644 --- a/model-mesh-triton-adapter/server/schema_test.go +++ b/model-mesh-triton-adapter/server/schema_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-triton-adapter/server/server.go b/model-mesh-triton-adapter/server/server.go index 8466ec0b..6b831f14 100644 --- a/model-mesh-triton-adapter/server/server.go +++ b/model-mesh-triton-adapter/server/server.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-triton-adapter/server/server_test.go b/model-mesh-triton-adapter/server/server_test.go index ac32d957..9434ed70 100644 --- a/model-mesh-triton-adapter/server/server_test.go +++ b/model-mesh-triton-adapter/server/server_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-triton-adapter/server/utils.go b/model-mesh-triton-adapter/server/utils.go index 19b33ada..111b4834 100644 --- a/model-mesh-triton-adapter/server/utils.go +++ b/model-mesh-triton-adapter/server/utils.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go b/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go index ba5887bf..079428bc 100644 --- a/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go +++ b/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go @@ -4,14 +4,13 @@ // 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 +// 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. - package main import ( diff --git a/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go b/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go index 119f8253..ab0c27b3 100644 --- a/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go +++ b/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go @@ -4,14 +4,13 @@ // 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 +// 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. - package main import ( diff --git a/model-mesh-triton-adapter/triton/mock_triton_server.go b/model-mesh-triton-adapter/triton/mock_triton_server.go index 02a2fb2b..a9ba2b4b 100644 --- a/model-mesh-triton-adapter/triton/mock_triton_server.go +++ b/model-mesh-triton-adapter/triton/mock_triton_server.go @@ -4,14 +4,13 @@ // 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 +// 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. - package main import ( diff --git a/model-serving-puller/main.go b/model-serving-puller/main.go index 8e444607..487b021e 100644 --- a/model-serving-puller/main.go +++ b/model-serving-puller/main.go @@ -4,14 +4,13 @@ // 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 +// 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. - package main import ( diff --git a/model-serving-puller/puller/config.go b/model-serving-puller/puller/config.go index 78c394ec..2af39601 100644 --- a/model-serving-puller/puller/config.go +++ b/model-serving-puller/puller/config.go @@ -4,14 +4,13 @@ // 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 +// 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. - package puller import ( diff --git a/model-serving-puller/puller/dotpath.go b/model-serving-puller/puller/dotpath.go index a4cfde40..42329d15 100644 --- a/model-serving-puller/puller/dotpath.go +++ b/model-serving-puller/puller/dotpath.go @@ -4,14 +4,13 @@ // 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 +// 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. - package puller import ( diff --git a/model-serving-puller/puller/dotpath_test.go b/model-serving-puller/puller/dotpath_test.go index 499fa035..7441b913 100644 --- a/model-serving-puller/puller/dotpath_test.go +++ b/model-serving-puller/puller/dotpath_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package puller import ( diff --git a/model-serving-puller/puller/puller.go b/model-serving-puller/puller/puller.go index 0c4dae98..89481e91 100644 --- a/model-serving-puller/puller/puller.go +++ b/model-serving-puller/puller/puller.go @@ -4,14 +4,13 @@ // 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 +// 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. - package puller import ( diff --git a/model-serving-puller/puller/puller_test.go b/model-serving-puller/puller/puller_test.go index 99f87685..5d86a4ff 100644 --- a/model-serving-puller/puller/puller_test.go +++ b/model-serving-puller/puller/puller_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package puller import ( diff --git a/model-serving-puller/server/config.go b/model-serving-puller/server/config.go index b76e9215..aa8c4797 100644 --- a/model-serving-puller/server/config.go +++ b/model-serving-puller/server/config.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-serving-puller/server/modelstate.go b/model-serving-puller/server/modelstate.go index cc9046ee..68b601a8 100644 --- a/model-serving-puller/server/modelstate.go +++ b/model-serving-puller/server/modelstate.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-serving-puller/server/modelstate_test.go b/model-serving-puller/server/modelstate_test.go index 53770ffb..ada5a067 100644 --- a/model-serving-puller/server/modelstate_test.go +++ b/model-serving-puller/server/modelstate_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/model-serving-puller/server/server.go b/model-serving-puller/server/server.go index 9507fbf9..d3b97026 100644 --- a/model-serving-puller/server/server.go +++ b/model-serving-puller/server/server.go @@ -4,14 +4,13 @@ // 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 +// 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. - package server import ( diff --git a/pullman/cache.go b/pullman/cache.go index ff0cafd7..d6573450 100644 --- a/pullman/cache.go +++ b/pullman/cache.go @@ -4,14 +4,13 @@ // 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 +// 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. - package pullman import ( diff --git a/pullman/cache_test.go b/pullman/cache_test.go index 0a818a1d..9d49a6af 100644 --- a/pullman/cache_test.go +++ b/pullman/cache_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package pullman import ( diff --git a/pullman/cmd/main.go b/pullman/cmd/main.go index cacb26d1..ff6fc6ba 100644 --- a/pullman/cmd/main.go +++ b/pullman/cmd/main.go @@ -4,14 +4,13 @@ // 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 +// 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. - package main import ( diff --git a/pullman/config.go b/pullman/config.go index af768fb3..909a74b0 100644 --- a/pullman/config.go +++ b/pullman/config.go @@ -4,14 +4,13 @@ // 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 +// 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. - package pullman import ( diff --git a/pullman/config_test.go b/pullman/config_test.go index d36e6d9b..006166b1 100644 --- a/pullman/config_test.go +++ b/pullman/config_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package pullman import ( diff --git a/pullman/helpers.go b/pullman/helpers.go index 6835798c..85d53428 100644 --- a/pullman/helpers.go +++ b/pullman/helpers.go @@ -4,14 +4,13 @@ // 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 +// 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. - package pullman import ( diff --git a/pullman/pullman.go b/pullman/pullman.go index 90b11261..51369c16 100644 --- a/pullman/pullman.go +++ b/pullman/pullman.go @@ -4,14 +4,13 @@ // 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 +// 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. - package pullman import ( diff --git a/pullman/pullman_test.go b/pullman/pullman_test.go index 201ba013..a647e263 100644 --- a/pullman/pullman_test.go +++ b/pullman/pullman_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package pullman import ( diff --git a/pullman/storageproviders/azure/downloader.go b/pullman/storageproviders/azure/downloader.go index 0599e0cb..6a38595d 100644 --- a/pullman/storageproviders/azure/downloader.go +++ b/pullman/storageproviders/azure/downloader.go @@ -4,14 +4,13 @@ // 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 +// 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. - package azureprovider import ( diff --git a/pullman/storageproviders/azure/provider.go b/pullman/storageproviders/azure/provider.go index 4973c673..92bd721b 100644 --- a/pullman/storageproviders/azure/provider.go +++ b/pullman/storageproviders/azure/provider.go @@ -4,14 +4,13 @@ // 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 +// 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. - package azureprovider import ( diff --git a/pullman/storageproviders/azure/provider_test.go b/pullman/storageproviders/azure/provider_test.go index c7e5a750..ce327e6b 100644 --- a/pullman/storageproviders/azure/provider_test.go +++ b/pullman/storageproviders/azure/provider_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package azureprovider import ( diff --git a/pullman/storageproviders/gcs/downloader.go b/pullman/storageproviders/gcs/downloader.go index 4a512127..d9ebb631 100644 --- a/pullman/storageproviders/gcs/downloader.go +++ b/pullman/storageproviders/gcs/downloader.go @@ -4,14 +4,13 @@ // 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 +// 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. - package gcsprovider import ( diff --git a/pullman/storageproviders/gcs/provider.go b/pullman/storageproviders/gcs/provider.go index b0b8012d..69cbaead 100644 --- a/pullman/storageproviders/gcs/provider.go +++ b/pullman/storageproviders/gcs/provider.go @@ -4,14 +4,13 @@ // 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 +// 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. - package gcsprovider import ( diff --git a/pullman/storageproviders/gcs/provider_test.go b/pullman/storageproviders/gcs/provider_test.go index a8748b2c..b113b714 100644 --- a/pullman/storageproviders/gcs/provider_test.go +++ b/pullman/storageproviders/gcs/provider_test.go @@ -4,14 +4,13 @@ // 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 +// 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. - package gcsprovider import ( diff --git a/pullman/storageproviders/http/downloader.go b/pullman/storageproviders/http/downloader.go index 5331223c..dc3332cf 100644 --- a/pullman/storageproviders/http/downloader.go +++ b/pullman/storageproviders/http/downloader.go @@ -4,14 +4,13 @@ // 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 +// 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. - package httpprovider import ( diff --git a/scripts/fmt.sh b/scripts/fmt.sh index 474307b8..36eb5b76 100755 --- a/scripts/fmt.sh +++ b/scripts/fmt.sh @@ -17,8 +17,8 @@ pre-commit run --all-files RETURN_CODE=$? # cat this file for helping on identifying the root cause when some issue happens -if [ -f /tmp/pre-commit.log ]; then - cat /tmp/pre-commit.log +if [ -f .pre-commit.log ]; then + cat .pre-commit.log fi function echoError() {