From fdec8a9d00a034ccd8e075008edd165147edf328 Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 15 Apr 2024 21:46:36 -0400 Subject: [PATCH] fix: action-tmate back to upstream, dead code removal (#2038) cleanup: upstream action-tmate has taken my PR, drop master reference. Also remove dead code from api.go Signed-off-by: Dave Lee --- .github/workflows/test.yml | 6 +++--- core/http/api.go | 18 ------------------ 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29bd3e08..156294b5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -121,7 +121,7 @@ jobs: PATH="$PATH:/root/go/bin" GO_TAGS="stablediffusion tts" make --jobs 5 --output-sync=target test - name: Setup tmate session if tests fail if: ${{ failure() }} - uses: dave-gray101/action-tmate@master + uses: mxschmitt/action-tmate@v3.18 with: connect-timeout-seconds: 180 @@ -174,7 +174,7 @@ jobs: make run-e2e-aio - name: Setup tmate session if tests fail if: ${{ failure() }} - uses: dave-gray101/action-tmate@master + uses: mxschmitt/action-tmate@v3.18 with: connect-timeout-seconds: 180 @@ -209,6 +209,6 @@ jobs: BUILD_TYPE="GITHUB_CI_HAS_BROKEN_METAL" CMAKE_ARGS="-DLLAMA_F16C=OFF -DLLAMA_AVX512=OFF -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF" make --jobs 4 --output-sync=target test - name: Setup tmate session if tests fail if: ${{ failure() }} - uses: dave-gray101/action-tmate@master + uses: mxschmitt/action-tmate@v3.18 with: connect-timeout-seconds: 180 \ No newline at end of file diff --git a/core/http/api.go b/core/http/api.go index 5c9095ea..7094899a 100644 --- a/core/http/api.go +++ b/core/http/api.go @@ -108,24 +108,6 @@ func App(application *core.Application) (*fiber.App, error) { return c.Next() } - // // Check for api_keys.json file - // fileContent, err := os.ReadFile("api_keys.json") - // if err == nil { - // // Parse JSON content from the file - // var fileKeys []string - // err := json.Unmarshal(fileContent, &fileKeys) - // if err != nil { - // return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"message": "Error parsing api_keys.json"}) - // } - - // // Add file keys to options.ApiKeys - // application.ApplicationConfig.ApiKeys = append(application.ApplicationConfig.ApiKeys, fileKeys...) - // } - - // if len(application.ApplicationConfig.ApiKeys) == 0 { - // return c.Next() - // } - authHeader := readAuthHeader(c) if authHeader == "" { return c.Status(fiber.StatusUnauthorized).JSON(fiber.Map{"message": "Authorization header missing"})