From 9fdc98cfd07ab0ae35c87372b927fdaea242ecb7 Mon Sep 17 00:00:00 2001 From: Marco Molteni Date: Fri, 26 Jan 2024 10:37:15 +0100 Subject: [PATCH 1/3] build: use Go 1.21, update deps --- Taskfile.yml | 6 +++--- go.mod | 8 ++++---- go.sum | 11 +++++++++++ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index da2fc8c..647c91d 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -8,9 +8,9 @@ vars: sh: "echo $(which gotestsum 2> /dev/null)" TESTRUNNER: "{{if .GOTESTSUM}}{{base .GOTESTSUM}} --{{else}}go test{{end}}" # - GOLANGCI_VERSION: v1.43.0 - GOTESTSUM_VERSION: v1.7.0 - GOLINES_VERSION: v0.7.0 + GOLANGCI_VERSION: v1.55.2 + GOTESTSUM_VERSION: v1.11.0 + GOLINES_VERSION: v0.12.2 tasks: diff --git a/go.mod b/go.mod index 24b057d..c70874e 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,12 @@ module github.com/pix4d/terravalet -go 1.17 +go 1.21 require ( - github.com/alexflint/go-arg v1.4.2 + github.com/alexflint/go-arg v1.4.3 github.com/dexyk/stringosim v0.0.0-20170922105913-9d0b3e91a842 - github.com/google/go-cmp v0.5.7 + github.com/google/go-cmp v0.6.0 github.com/scylladb/go-set v1.0.3-0.20200225121959-cc7b2070d91e ) -require github.com/alexflint/go-scalar v1.1.0 // indirect +require github.com/alexflint/go-scalar v1.2.0 // indirect diff --git a/go.sum b/go.sum index 07eee7a..03b80f0 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,13 @@ github.com/alexflint/go-arg v1.4.2 h1:lDWZAXxpAnZUq4qwb86p/3rIJJ2Li81EoMbTMujhVa0= github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM= +github.com/alexflint/go-arg v1.4.3 h1:9rwwEBpMXfKQKceuZfYcwuc/7YY7tWJbFsgG5cAU/uo= +github.com/alexflint/go-arg v1.4.3/go.mod h1:3PZ/wp/8HuqRZMUUgu7I+e1qcpUbvmS258mRXkFH4IA= github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw= github.com/alexflint/go-scalar v1.1.0 h1:aaAouLLzI9TChcPXotr6gUhq+Scr8rl0P9P4PnltbhM= github.com/alexflint/go-scalar v1.1.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o= +github.com/alexflint/go-scalar v1.2.0 h1:WR7JPKkeNpnYIOfHRa7ivM21aWAdHD0gEWHCx+WQBRw= +github.com/alexflint/go-scalar v1.2.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o= +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/dexyk/stringosim v0.0.0-20170922105913-9d0b3e91a842 h1:FWXGhOthNyZKdK0YVyDrkg5dCXOfKvexcRG37U1v6AQ= @@ -11,11 +16,17 @@ github.com/fatih/set v0.2.1 h1:nn2CaJyknWE/6txyUDGwysr3G5QC6xWB/PtVjPBbeaA= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/scylladb/go-set v1.0.3-0.20200225121959-cc7b2070d91e h1:7q6NSFZDeGfvvtIRwBrU/aegEYJYmvev0cHAwo17zZQ= github.com/scylladb/go-set v1.0.3-0.20200225121959-cc7b2070d91e/go.mod h1:DkpGd78rljTxKAnTDPFqXSGxvETQnJyuSOQwsHycqfs= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 54719b6614d5e7cf726b6f0ba7f9625365f42a81 Mon Sep 17 00:00:00 2001 From: Marco Molteni Date: Fri, 26 Jan 2024 10:40:37 +0100 Subject: [PATCH 2/3] ci: update infra and deps --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52f7ead..77f9a0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,19 +6,19 @@ jobs: all: strategy: matrix: - go-version: [1.17.x] + go-version: [1.21.x] os: [ubuntu-latest] - task-version: [v3.10.0] + task-version: [v3.34.0] runs-on: ${{ matrix.os }} steps: - name: Install Go ${{ matrix.go-version }} - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go-version }} - name: Install task ${{ matrix.task-version }} run: go install github.com/go-task/task/v3/cmd/task@${{ matrix.task-version }} - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: # By default, actions/checkout will persist the GITHUB_TOKEN, so that further # steps in the job can perform authenticated git commands (that is: WRITE to From 27c08bdaa60eb81ec203d91bc4557fdcc00ca81a Mon Sep 17 00:00:00 2001 From: Marco Molteni Date: Fri, 26 Jan 2024 11:45:00 +0100 Subject: [PATCH 3/3] update CHANGELOG --- CHANGELOG.md | 8 ++++++-- README.md | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0b7a64..e843de0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The script generated by `terravalet import` now prints each command before executing it. This helps to understand which command is being executed. +### Changes + +- Use Go 1.21 + ## [v0.7.2] - (2023-02-28) ### Fixes @@ -21,7 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixes -- import: use quote formatting verb to allow for multi word resource addresses +- import: use quote formatting verb to allow for multi-word resource addresses ## [v0.7.0] - (2022-02-08) @@ -142,7 +146,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changes -- Migration script: do not print any more the count `>>> 1/N`, because each time N changed, this was causing N spurious diffs, hiding the real elements that changed. The `terravalet_output_format` is now 2. +- Migration script: do not print anymore the count `>>> 1/N`, because each time N changed, this was causing N spurious diffs, hiding the real elements that changed. The `terravalet_output_format` is now 2. - Migration script: do not take a lock; it is useless as long as the operations are strictly on a local state file. This speeds up the runtime. ### New diff --git a/README.md b/README.md index d01319d..40c6534 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ There are three modes of operation: - [Move resources](#-move-resources-from-one-state-to-another) from one Terraform state to another. - [Import existing resources](#-import-existing-resources) into Terraform state. -they will be explained in the following sections. +They will be explained in the following sections. You can also look at the tests and in particular at the files below [testdata/](testdata) for a rough idea.