Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct wiring of disable s3express auth toggle #2394

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changelog/03de8b0c1add4877bcfd5472db61ee82.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "03de8b0c-1add-4877-bcfd-5472db61ee82",
"type": "bugfix",
"description": "Correct resolution of S3Express auth disable toggle.",
"modules": [
"config"
]
}
20 changes: 10 additions & 10 deletions config/load_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@
// The sdk app ID retrieved from env var or shared config to be added to request user agent header
AppID string

// Whether S3 S3Beta2022a auth is disabled.
S3DisableS3Beta2022aAuth *bool
// Whether S3 Express auth is disabled.
S3DisableExpressAuth *bool
}

func (o LoadOptions) getDefaultsMode(ctx context.Context) (aws.DefaultsMode, bool, error) {
Expand Down Expand Up @@ -1048,21 +1048,21 @@
}
}

// GetS3DisableS3Beta2022aAuth returns the configured value for
// [EnvConfig.S3DisableS3Beta2022aAuth].
func (o LoadOptions) GetS3DisableS3Beta2022aAuth() (value, ok bool) {
if o.S3DisableS3Beta2022aAuth == nil {
// GetS3DisableExpressAuth returns the configured value for
// [EnvConfig.S3DisableExpressAuth].
func (o LoadOptions) GetS3DisableExpressAuth() (value, ok bool) {
if o.S3DisableExpressAuth == nil {
return false, false
}

return *o.S3DisableS3Beta2022aAuth, true
return *o.S3DisableExpressAuth, true
}

// WithS3DisableS3Beta2022aAuth sets [LoadOptions.S3DisableS3Beta2022aAuth]
// WithS3DisableExpressAuth sets [LoadOptions.S3DisableExpressAuth]

Check failure on line 1061 in config/load_options.go

View workflow job for this annotation

GitHub Actions / Unix SDK tests (ubuntu-latest, 1.19)

comment on exported function WithS3DisableS3ExpressAuth should be of the form "WithS3DisableS3ExpressAuth ..."

Check failure on line 1061 in config/load_options.go

View workflow job for this annotation

GitHub Actions / Unix SDK tests (ubuntu-latest, 1.21)

comment on exported function WithS3DisableS3ExpressAuth should be of the form "WithS3DisableS3ExpressAuth ..."
// to the value provided.
func WithS3DisableS3Beta2022aAuth(v bool) LoadOptionsFunc {
func WithS3DisableS3ExpressAuth(v bool) LoadOptionsFunc {
return func(o *LoadOptions) error {
o.S3DisableS3Beta2022aAuth = &v
o.S3DisableExpressAuth = &v
return nil
}
}