-
Notifications
You must be signed in to change notification settings - Fork 78
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
add EnableDualStack option #707
base: master
Are you sure you want to change the base?
Conversation
bd933e0
to
fb8a503
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking a look and adding this option!
Could you please split the Go module changes into a separate PR? It's not related to this feature and is quite different.
It is also not necessary per my in-line comment as that line does not correspond to the version it compiles with and so may not be accepted/merged at all
s3/s3.go
Outdated
@@ -192,7 +193,9 @@ func NewS3Client(ctx context.Context, opts S3ClientOpts) (S3Client, error) { | |||
if opts.Trace { | |||
minioClient.TraceOn(log.StandardLogger().Out) | |||
} | |||
|
|||
if opts.DisableDualStack { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if opts.DisableDualStack { | |
if !opts.EnableDualstack { |
I would match the existing naming and capitalization of Minio's
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did it intentionally since Minio enables it by default and if the client doesn't specify true
in this field explicitly, it always disable it. But, if you think it's fine, I follow your suggestion
go.mod
Outdated
@@ -1,6 +1,6 @@ | |||
module github.com/argoproj/pkg | |||
|
|||
go 1.14 | |||
go 1.22.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the Go docs, this is the minimum required Go version. Afaik, this repo does not use any newer Go features and so does not need to raise its version
That is also different from the version this compiles with or is linted with, which is listed in the GHA Workflows, e.g.
Line 19 in 42ec18a
go-version: 1.19 |
The consuming applications also set their own Go versions that compile this package. By definition, they must be at least as high as this go.mod
version, which also makes this a breaking change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I reverted it
s3/s3.go
Outdated
RoleSessionName string | ||
UseSDKCreds bool | ||
EncryptOpts EncryptOpts | ||
DisableDualStack bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if we should just inherit options here and parse a JSON blob in Argo Workflows's configuration of extraOpts
. As this continues to expand and add to the spec. Allowing arbitrary options may make more sense.
cc @Joibel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean like this?
type ExtraOpts struct {
EnableDualStack bool
}
type S3ClientOpts struct {
...
ExtraOpts ExtraOpts
}
9847d93
to
4c3338e
Compare
Signed-off-by: Hiroki6 <hirokifujino0108@gmail.com> Signed-off-by: Hiroki6 <hiroki@spread.ai>
Signed-off-by: Hiroki6 <hirokifujino0108@gmail.com> Signed-off-by: Hiroki6 <hiroki@spread.ai>
Signed-off-by: Hiroki6 <hirokifujino0108@gmail.com> Signed-off-by: Hiroki6 <hiroki@spread.ai>
Signed-off-by: Hiroki6 <hirokifujino0108@gmail.com> Signed-off-by: Hiroki6 <hiroki@spread.ai>
4c3338e
to
7e9cc49
Compare
Related to argoproj/argo-workflows#13433