From e79a86416595d7caf16e713868e02f369d72e127 Mon Sep 17 00:00:00 2001 From: Bill Havanki Date: Thu, 8 Aug 2024 10:00:20 -0400 Subject: [PATCH] chore: Bump to major version 3 (#543) --- README.md | 23 ++++++++++++++++++----- cmd/delete.go | 4 ++-- cmd/env.go | 2 +- cmd/exec.go | 2 +- cmd/export.go | 2 +- cmd/find.go | 2 +- cmd/find_test.go | 2 +- cmd/history.go | 4 ++-- cmd/import.go | 4 ++-- cmd/list-services.go | 2 +- cmd/list.go | 4 ++-- cmd/read.go | 4 ++-- cmd/root.go | 2 +- cmd/tag-delete.go | 4 ++-- cmd/tag-read.go | 4 ++-- cmd/tag-write.go | 4 ++-- cmd/write.go | 4 ++-- environ/environ.go | 4 ++-- environ/environ_test.go | 2 +- go.mod | 2 +- main.go | 2 +- 21 files changed, 48 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 6cddfe05..09b8fc8b 100644 --- a/README.md +++ b/README.md @@ -8,16 +8,19 @@ For detailed info about using chamber, please read ## v3.0 Breaking Changes -_Version 3.0 has not yet been released. Changes described here are forward-looking._ - * **Use of the SSM Parameter Store's path-based API is now required.** Support added in v2.0 to avoid it has been removed. The `CHAMBER_NO_PATHS` environment variable no longer has any effect. You must migrate to the new storage format - using the instructions below. + using the instructions below, using a 2.x version of chamber. * **The `--min-throttle-delay` option no longer has any effect.** Support for specifying a minimum throttle delay has been removed from the underlying AWS SDK with no direct replacement. Instead, set the new `--retry-mode` option to "adaptive" to use an experimental model that accounts for throttling errors. +* **Context arguments are required for `Store` methods.** This is a consequence + of migrating to a new AWS SDK. This change has no effect for CLI users, but + those using chamber as a library must update their code to pass contexts. +* **The deprecated `NewS3Store` constructor has been removed.** Use + `NewS3StoreWithBucket` instead. ## v2.0 Breaking Changes @@ -52,7 +55,7 @@ at the time of release. If you have a functional go environment, you can install with: ```bash -go install github.com/segmentio/chamber/v2@latest +go install github.com/segmentio/chamber/v3@latest ``` ### Caveat About `chamber version` and `go install` @@ -443,7 +446,7 @@ you can use `CHAMBER_AWS_REGION` to override just for chamber. ### Custom SSM Endpoint If you'd like to use a custom SSM endpoint for chamber, you can use `CHAMBER_AWS_SSM_ENDPOINT` -to override AWS default URL. +to override the default URL. ## AWS Secrets Manager Chamber supports AWS Secrets Manager as an optional backend. For example: @@ -453,6 +456,16 @@ chamber -b secretsmanager write myservice foo fah chamber -b secretsmanager write myservice foo2 fah2 ``` +### Custom Secrets Manager Endpoint + +If you'd like to use a custom Secrets Manager endpoint for chamber, you can use +`CHAMBER_AWS_SECRETS_MANAGER_ENDPOINT` to override the default URL. + +> [!WARNING] +> Prior to v3.0.0, the endpoint could also be overridden with `CHAMBER_AWS_SSM_ENDPOINT`. This +> has been deprecated and will stop working in a future chamber release. Please use +> `CHAMBER_AWS_SECRETS_MANAGER_ENDPOINT` instead. + ## S3 Backend (Experimental) By default, chamber store secrets in AWS Parameter Store. We now also provide an diff --git a/cmd/delete.go b/cmd/delete.go index d31a7116..fb467e3d 100644 --- a/cmd/delete.go +++ b/cmd/delete.go @@ -4,8 +4,8 @@ import ( "fmt" analytics "github.com/segmentio/analytics-go/v3" - "github.com/segmentio/chamber/v2/store" - "github.com/segmentio/chamber/v2/utils" + "github.com/segmentio/chamber/v3/store" + "github.com/segmentio/chamber/v3/utils" "github.com/spf13/cobra" ) diff --git a/cmd/env.go b/cmd/env.go index 4653e468..2138f6f7 100644 --- a/cmd/env.go +++ b/cmd/env.go @@ -8,7 +8,7 @@ import ( "github.com/alessio/shellescape" analytics "github.com/segmentio/analytics-go/v3" - "github.com/segmentio/chamber/v2/utils" + "github.com/segmentio/chamber/v3/utils" "github.com/spf13/cobra" ) diff --git a/cmd/exec.go b/cmd/exec.go index 14754410..4d54bd90 100644 --- a/cmd/exec.go +++ b/cmd/exec.go @@ -7,7 +7,7 @@ import ( "strings" analytics "github.com/segmentio/analytics-go/v3" - "github.com/segmentio/chamber/v2/environ" + "github.com/segmentio/chamber/v3/environ" "github.com/spf13/cobra" ) diff --git a/cmd/export.go b/cmd/export.go index bcafd43d..e2222891 100644 --- a/cmd/export.go +++ b/cmd/export.go @@ -12,7 +12,7 @@ import ( "github.com/magiconair/properties" analytics "github.com/segmentio/analytics-go/v3" - "github.com/segmentio/chamber/v2/utils" + "github.com/segmentio/chamber/v3/utils" "github.com/spf13/cobra" "gopkg.in/yaml.v3" ) diff --git a/cmd/find.go b/cmd/find.go index fd96fc5d..489aa472 100644 --- a/cmd/find.go +++ b/cmd/find.go @@ -6,7 +6,7 @@ import ( "strings" "text/tabwriter" - "github.com/segmentio/chamber/v2/store" + "github.com/segmentio/chamber/v3/store" "github.com/spf13/cobra" ) diff --git a/cmd/find_test.go b/cmd/find_test.go index 81d19d5f..528c68aa 100644 --- a/cmd/find_test.go +++ b/cmd/find_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/segmentio/chamber/v2/store" + "github.com/segmentio/chamber/v3/store" "github.com/stretchr/testify/assert" ) diff --git a/cmd/history.go b/cmd/history.go index 0f887a89..db08b227 100644 --- a/cmd/history.go +++ b/cmd/history.go @@ -6,8 +6,8 @@ import ( "text/tabwriter" analytics "github.com/segmentio/analytics-go/v3" - "github.com/segmentio/chamber/v2/store" - "github.com/segmentio/chamber/v2/utils" + "github.com/segmentio/chamber/v3/store" + "github.com/segmentio/chamber/v3/utils" "github.com/spf13/cobra" ) diff --git a/cmd/import.go b/cmd/import.go index 91bec269..5b2a3d10 100644 --- a/cmd/import.go +++ b/cmd/import.go @@ -6,8 +6,8 @@ import ( "os" analytics "github.com/segmentio/analytics-go/v3" - "github.com/segmentio/chamber/v2/store" - "github.com/segmentio/chamber/v2/utils" + "github.com/segmentio/chamber/v3/store" + "github.com/segmentio/chamber/v3/utils" "github.com/spf13/cobra" "gopkg.in/yaml.v3" ) diff --git a/cmd/list-services.go b/cmd/list-services.go index 35d1d4f4..f2ce4ba1 100644 --- a/cmd/list-services.go +++ b/cmd/list-services.go @@ -6,7 +6,7 @@ import ( "sort" "text/tabwriter" - "github.com/segmentio/chamber/v2/utils" + "github.com/segmentio/chamber/v3/utils" "github.com/spf13/cobra" ) diff --git a/cmd/list.go b/cmd/list.go index 4f20ede8..671906a5 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -8,8 +8,8 @@ import ( "text/tabwriter" analytics "github.com/segmentio/analytics-go/v3" - "github.com/segmentio/chamber/v2/store" - "github.com/segmentio/chamber/v2/utils" + "github.com/segmentio/chamber/v3/store" + "github.com/segmentio/chamber/v3/utils" "github.com/spf13/cobra" ) diff --git a/cmd/read.go b/cmd/read.go index ac62324a..4268977c 100644 --- a/cmd/read.go +++ b/cmd/read.go @@ -6,8 +6,8 @@ import ( "text/tabwriter" analytics "github.com/segmentio/analytics-go/v3" - "github.com/segmentio/chamber/v2/store" - "github.com/segmentio/chamber/v2/utils" + "github.com/segmentio/chamber/v3/store" + "github.com/segmentio/chamber/v3/utils" "github.com/spf13/cobra" ) diff --git a/cmd/root.go b/cmd/root.go index 3230d8a1..39345527 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -12,7 +12,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" analytics "github.com/segmentio/analytics-go/v3" - "github.com/segmentio/chamber/v2/store" + "github.com/segmentio/chamber/v3/store" "github.com/spf13/cobra" ) diff --git a/cmd/tag-delete.go b/cmd/tag-delete.go index 6f72ba8a..f2505c2d 100644 --- a/cmd/tag-delete.go +++ b/cmd/tag-delete.go @@ -4,8 +4,8 @@ import ( "fmt" analytics "github.com/segmentio/analytics-go/v3" - "github.com/segmentio/chamber/v2/store" - "github.com/segmentio/chamber/v2/utils" + "github.com/segmentio/chamber/v3/store" + "github.com/segmentio/chamber/v3/utils" "github.com/spf13/cobra" ) diff --git a/cmd/tag-read.go b/cmd/tag-read.go index 367082a0..2866c5d9 100644 --- a/cmd/tag-read.go +++ b/cmd/tag-read.go @@ -6,8 +6,8 @@ import ( "text/tabwriter" analytics "github.com/segmentio/analytics-go/v3" - "github.com/segmentio/chamber/v2/store" - "github.com/segmentio/chamber/v2/utils" + "github.com/segmentio/chamber/v3/store" + "github.com/segmentio/chamber/v3/utils" "github.com/spf13/cobra" ) diff --git a/cmd/tag-write.go b/cmd/tag-write.go index 715e29c4..eefc47ed 100644 --- a/cmd/tag-write.go +++ b/cmd/tag-write.go @@ -7,8 +7,8 @@ import ( "text/tabwriter" analytics "github.com/segmentio/analytics-go/v3" - "github.com/segmentio/chamber/v2/store" - "github.com/segmentio/chamber/v2/utils" + "github.com/segmentio/chamber/v3/store" + "github.com/segmentio/chamber/v3/utils" "github.com/spf13/cobra" ) diff --git a/cmd/write.go b/cmd/write.go index 23db799a..898538db 100644 --- a/cmd/write.go +++ b/cmd/write.go @@ -8,8 +8,8 @@ import ( "strings" analytics "github.com/segmentio/analytics-go/v3" - "github.com/segmentio/chamber/v2/store" - "github.com/segmentio/chamber/v2/utils" + "github.com/segmentio/chamber/v3/store" + "github.com/segmentio/chamber/v3/utils" "github.com/spf13/cobra" ) diff --git a/environ/environ.go b/environ/environ.go index a482ad97..c31aeeee 100644 --- a/environ/environ.go +++ b/environ/environ.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" - "github.com/segmentio/chamber/v2/store" - "github.com/segmentio/chamber/v2/utils" + "github.com/segmentio/chamber/v3/store" + "github.com/segmentio/chamber/v3/utils" ) // environ is a slice of strings representing the environment, in the form "key=value". diff --git a/environ/environ_test.go b/environ/environ_test.go index 266666ed..e2ce75bd 100644 --- a/environ/environ_test.go +++ b/environ/environ_test.go @@ -4,7 +4,7 @@ import ( "sort" "testing" - "github.com/segmentio/chamber/v2/store" + "github.com/segmentio/chamber/v3/store" "github.com/stretchr/testify/assert" ) diff --git a/go.mod b/go.mod index 9b9efb56..58921f34 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/segmentio/chamber/v2 +module github.com/segmentio/chamber/v3 go 1.20 diff --git a/main.go b/main.go index 1becd487..9191295c 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/segmentio/chamber/v2/cmd" + "github.com/segmentio/chamber/v3/cmd" ) var (