From dc7a4787dd1ac5201138828d07574a2660fae1c5 Mon Sep 17 00:00:00 2001 From: mbfreder Date: Thu, 7 Aug 2025 10:34:40 -0700 Subject: [PATCH 1/3] chore(deps): Update go-chi to v5.2.2 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 5519b8c..9f4a9e9 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.24 require ( github.com/aws/aws-lambda-go v1.46.0 - github.com/go-chi/chi v1.5.5 + github.com/go-chi/chi v5.2.2 github.com/google/uuid v1.6.0 github.com/jessevdk/go-flags v1.5.0 github.com/sirupsen/logrus v1.9.3 From 28edb0f5ee4650391ec324bd93d3734516a370a6 Mon Sep 17 00:00:00 2001 From: mbfreder Date: Thu, 7 Aug 2025 13:07:54 -0700 Subject: [PATCH 2/3] Fix Go-Chi v5 module path and Go version - Update go.mod to use correct Go-Chi v5 module path (github.com/go-chi/chi/v5) - Update all import statements to use v5 path - Fix Go version from 1.24 to 1.21 to match installed version - All tests passing locally --- .github/workflows/automated-tests.yml | 24 +++++++++++++++++++ go.mod | 4 ++-- go.sum | 4 ++-- lambda/core/directinvoke/directinvoke.go | 2 +- lambda/core/directinvoke/directinvoke_test.go | 2 +- lambda/rapi/handler/invocationerror.go | 2 +- lambda/rapi/handler/invocationerror_test.go | 2 +- lambda/rapi/handler/invocationresponse.go | 2 +- lambda/rapi/middleware/middleware.go | 2 +- lambda/rapi/middleware/middleware_test.go | 2 +- lambda/rapi/router.go | 2 +- lambda/rapi/server.go | 2 +- lambda/rapidcore/standalone/middleware.go | 2 +- lambda/rapidcore/standalone/router.go | 2 +- 14 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/automated-tests.yml diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml new file mode 100644 index 0000000..45b3b7a --- /dev/null +++ b/.github/workflows/automated-tests.yml @@ -0,0 +1,24 @@ +name: GitHub Actions to run integration tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + release: + types: + - released + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: run integration tests + run: make integ-tests-with-docker + diff --git a/go.mod b/go.mod index 9f4a9e9..93e2bab 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module go.amzn.com -go 1.24 +go 1.21 require ( github.com/aws/aws-lambda-go v1.46.0 - github.com/go-chi/chi v5.2.2 + github.com/go-chi/chi/v5 v5.2.2 github.com/google/uuid v1.6.0 github.com/jessevdk/go-flags v1.5.0 github.com/sirupsen/logrus v1.9.3 diff --git a/go.sum b/go.sum index 8974775..9fd0886 100644 --- a/go.sum +++ b/go.sum @@ -3,8 +3,8 @@ github.com/aws/aws-lambda-go v1.46.0/go.mod h1:dpMpZgvWx5vuQJfBt0zqBha60q7Dd7Rfg github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-chi/chi v1.5.5 h1:vOB/HbEMt9QqBqErz07QehcOKHaWFtuj87tTDVz2qXE= -github.com/go-chi/chi v1.5.5/go.mod h1:C9JqLr3tIYjDOZpzn+BCuxY8z8vmca43EeMgyZt7irw= +github.com/go-chi/chi/v5 v5.2.2 h1:CMwsvRVTbXVytCk1Wd72Zy1LAsAh9GxMmSNWLHCG618= +github.com/go-chi/chi/v5 v5.2.2/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= diff --git a/lambda/core/directinvoke/directinvoke.go b/lambda/core/directinvoke/directinvoke.go index 3510132..6b97cbe 100644 --- a/lambda/core/directinvoke/directinvoke.go +++ b/lambda/core/directinvoke/directinvoke.go @@ -11,7 +11,7 @@ import ( "strconv" "strings" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" "go.amzn.com/lambda/core/bandwidthlimiter" "go.amzn.com/lambda/fatalerror" "go.amzn.com/lambda/interop" diff --git a/lambda/core/directinvoke/directinvoke_test.go b/lambda/core/directinvoke/directinvoke_test.go index 94b6323..e6646bf 100644 --- a/lambda/core/directinvoke/directinvoke_test.go +++ b/lambda/core/directinvoke/directinvoke_test.go @@ -17,7 +17,7 @@ import ( "testing" "time" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.amzn.com/lambda/fatalerror" diff --git a/lambda/rapi/handler/invocationerror.go b/lambda/rapi/handler/invocationerror.go index d434461..afd346d 100644 --- a/lambda/rapi/handler/invocationerror.go +++ b/lambda/rapi/handler/invocationerror.go @@ -18,7 +18,7 @@ import ( "go.amzn.com/lambda/core" "go.amzn.com/lambda/rapi/rendering" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" log "github.com/sirupsen/logrus" ) diff --git a/lambda/rapi/handler/invocationerror_test.go b/lambda/rapi/handler/invocationerror_test.go index 72e6719..76a3b4e 100644 --- a/lambda/rapi/handler/invocationerror_test.go +++ b/lambda/rapi/handler/invocationerror_test.go @@ -19,7 +19,7 @@ import ( "go.amzn.com/lambda/rapi/model" "go.amzn.com/lambda/testdata" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" "github.com/stretchr/testify/assert" ) diff --git a/lambda/rapi/handler/invocationresponse.go b/lambda/rapi/handler/invocationresponse.go index d267775..ba08b14 100644 --- a/lambda/rapi/handler/invocationresponse.go +++ b/lambda/rapi/handler/invocationresponse.go @@ -12,7 +12,7 @@ import ( "go.amzn.com/lambda/interop" "go.amzn.com/lambda/rapi/rendering" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" log "github.com/sirupsen/logrus" ) diff --git a/lambda/rapi/middleware/middleware.go b/lambda/rapi/middleware/middleware.go index d45798b..a83a232 100644 --- a/lambda/rapi/middleware/middleware.go +++ b/lambda/rapi/middleware/middleware.go @@ -12,7 +12,7 @@ import ( "go.amzn.com/lambda/rapi/handler" "go.amzn.com/lambda/rapi/rendering" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" "go.amzn.com/lambda/appctx" log "github.com/sirupsen/logrus" diff --git a/lambda/rapi/middleware/middleware_test.go b/lambda/rapi/middleware/middleware_test.go index a0b9134..51c9a90 100644 --- a/lambda/rapi/middleware/middleware_test.go +++ b/lambda/rapi/middleware/middleware_test.go @@ -12,7 +12,7 @@ import ( "net/http/httptest" "testing" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" "github.com/google/uuid" "github.com/stretchr/testify/assert" "go.amzn.com/lambda/appctx" diff --git a/lambda/rapi/router.go b/lambda/rapi/router.go index dc036bc..9933550 100644 --- a/lambda/rapi/router.go +++ b/lambda/rapi/router.go @@ -11,7 +11,7 @@ import ( "go.amzn.com/lambda/rapi/middleware" "go.amzn.com/lambda/telemetry" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" "go.amzn.com/lambda/core" "go.amzn.com/lambda/rapi/rendering" diff --git a/lambda/rapi/server.go b/lambda/rapi/server.go index d17270a..aafc295 100644 --- a/lambda/rapi/server.go +++ b/lambda/rapi/server.go @@ -9,7 +9,7 @@ import ( "net" "net/http" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" "go.amzn.com/lambda/appctx" "go.amzn.com/lambda/core" diff --git a/lambda/rapidcore/standalone/middleware.go b/lambda/rapidcore/standalone/middleware.go index 06baae3..4465a40 100644 --- a/lambda/rapidcore/standalone/middleware.go +++ b/lambda/rapidcore/standalone/middleware.go @@ -6,7 +6,7 @@ package standalone import ( "net/http" - "github.com/go-chi/chi/middleware" + "github.com/go-chi/chi/v5/middleware" log "github.com/sirupsen/logrus" ) diff --git a/lambda/rapidcore/standalone/router.go b/lambda/rapidcore/standalone/router.go index 7957c32..c0b8fc1 100644 --- a/lambda/rapidcore/standalone/router.go +++ b/lambda/rapidcore/standalone/router.go @@ -12,7 +12,7 @@ import ( "go.amzn.com/lambda/rapidcore" "go.amzn.com/lambda/rapidcore/standalone/telemetry" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" ) type InteropServer interface { From dd9ee8288145aece13dfe1f604037ccfbdddbfd6 Mon Sep 17 00:00:00 2001 From: mbfreder Date: Thu, 7 Aug 2025 13:38:03 -0700 Subject: [PATCH 3/3] Remove accidental workflow file and finalize Go-Chi v5 fix - Remove accidentally added automated-tests.yml workflow - Keep Go 1.24 as intended for CI environment - Maintain Go-Chi v5 module path fix (github.com/go-chi/chi/v5) - All tests pass locally with Go 1.21, CI should work with Go 1.24 --- .github/workflows/automated-tests.yml | 24 ------------------------ go.mod | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 .github/workflows/automated-tests.yml diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml deleted file mode 100644 index 45b3b7a..0000000 --- a/.github/workflows/automated-tests.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: GitHub Actions to run integration tests - -on: - push: - branches: - - main - pull_request: - branches: - - main - release: - types: - - released - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: run integration tests - run: make integ-tests-with-docker - diff --git a/go.mod b/go.mod index 93e2bab..5118f72 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module go.amzn.com -go 1.21 +go 1.24 require ( github.com/aws/aws-lambda-go v1.46.0