-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
exoscale: update Egoscale to v3.1.1 #2256
Conversation
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.
providers/dns/exoscale/exoscale.go
Outdated
@@ -84,12 +81,8 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) { | |||
return nil, errors.New("exoscale: credentials missing") | |||
} | |||
|
|||
egoscale.UserAgent = "go-acme/lego " + egoscale.UserAgent |
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.
Any reason for dropping it?
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.
Because it's a global variable, I don't want to produce side effects: if someone uses lego and exocale as a lib, modifying the global variable will be a problem.
If lego defines the global and an app uses exocale, what will be the user agent at the end?
It's not possible to know because it will depend on when and where the user agent is set:
- If lego is the last to set the variable then all the calls will have the lego user agent.
- If lego is the first to set the variable then all the calls will have the app user agent.
- If the app and/or lego defined the user agent through another global variable, it will be "random".
Another problem: with the global variable, if the user defines the user agent then information about the client (versions, etc.) will be discarded, expect if the user appends the previous user agent manually.
Generally speaking, global variables should be avoided for a lib.
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.
IMHO, the User-Agent
should be an option of the Client
like the other ClientOpt
instead of a global variable.
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 was hoping something like that: exoscale/egoscale@master...ldez:egoscale:feat/user-agent
I will not open a PR because it's a breaking change, except if you want it.
EDIT: I created a now-breaking version.
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.
LGTM
Update Egoscale library for the Exoscale DNS provider to v3.
v1 and v2 are deprecated: https://github.com/exoscale/egoscale?tab=readme-ov-file#deprecated-use-v3
exoscale/egoscale@v0.102.3...v3.1.1