From e0e001d38616494280a695d6bb56050b5756d567 Mon Sep 17 00:00:00 2001 From: Spolti Date: Wed, 15 Nov 2023 11:44:21 -0300 Subject: [PATCH] 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=$?