-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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: set max for max cookie number to math.MaxInt
#16388
fix: set max for max cookie number to math.MaxInt
#16388
Conversation
Signed-off-by: OneMatchFox <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #16388 +/- ##
=======================================
Coverage 49.55% 49.55%
=======================================
Files 269 269
Lines 47046 47046
=======================================
Hits 23313 23313
Misses 21445 21445
Partials 2288 2288 ☔ View full report in Codecov by Sentry. |
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!
Co-authored-by: gdsoumya <[email protected]> Signed-off-by: Brian Fox <[email protected]>
math.MaxInt32
math.MaxInt
Thanks for the quick review folks. @gdsoumya are you able to cherry pick this across to the |
@onematchfox I think we can do that but I'll still check with other maintainers and see before doing that. |
/cherry-pick release-2.9 |
* fix: set max for max cookie number to `math.MaxInt32` Signed-off-by: OneMatchFox <[email protected]> * refactor: set max for max cookie number to `math.MaxInt` Co-authored-by: gdsoumya <[email protected]> Signed-off-by: Brian Fox <[email protected]> --------- Signed-off-by: OneMatchFox <[email protected]> Signed-off-by: Brian Fox <[email protected]> Co-authored-by: gdsoumya <[email protected]>
/cherry-pick release-2.8 |
* fix: set max for max cookie number to `math.MaxInt32` Signed-off-by: OneMatchFox <[email protected]> * refactor: set max for max cookie number to `math.MaxInt` Co-authored-by: gdsoumya <[email protected]> Signed-off-by: Brian Fox <[email protected]> --------- Signed-off-by: OneMatchFox <[email protected]> Signed-off-by: Brian Fox <[email protected]> Co-authored-by: gdsoumya <[email protected]>
@onematchfox the commit has been cherry picked to release branches. |
Thanks! |
* fix: set max for max cookie number to `math.MaxInt32` Signed-off-by: OneMatchFox <[email protected]> * refactor: set max for max cookie number to `math.MaxInt` Co-authored-by: gdsoumya <[email protected]> Signed-off-by: Brian Fox <[email protected]> --------- Signed-off-by: OneMatchFox <[email protected]> Signed-off-by: Brian Fox <[email protected]> Co-authored-by: gdsoumya <[email protected]>
* fix: set max for max cookie number to `math.MaxInt32` Signed-off-by: OneMatchFox <[email protected]> * refactor: set max for max cookie number to `math.MaxInt` Co-authored-by: gdsoumya <[email protected]> Signed-off-by: Brian Fox <[email protected]> --------- Signed-off-by: OneMatchFox <[email protected]> Signed-off-by: Brian Fox <[email protected]> Co-authored-by: gdsoumya <[email protected]>
* fix: set max for max cookie number to `math.MaxInt32` Signed-off-by: OneMatchFox <[email protected]> * refactor: set max for max cookie number to `math.MaxInt` Co-authored-by: gdsoumya <[email protected]> Signed-off-by: Brian Fox <[email protected]> --------- Signed-off-by: OneMatchFox <[email protected]> Signed-off-by: Brian Fox <[email protected]> Co-authored-by: gdsoumya <[email protected]>
* fix: set max for max cookie number to `math.MaxInt32` Signed-off-by: OneMatchFox <[email protected]> * refactor: set max for max cookie number to `math.MaxInt` Co-authored-by: gdsoumya <[email protected]> Signed-off-by: Brian Fox <[email protected]> --------- Signed-off-by: OneMatchFox <[email protected]> Signed-off-by: Brian Fox <[email protected]> Co-authored-by: gdsoumya <[email protected]> Signed-off-by: Kevin Lyda <[email protected]>
* fix: set max for max cookie number to `math.MaxInt32` Signed-off-by: OneMatchFox <[email protected]> * refactor: set max for max cookie number to `math.MaxInt` Co-authored-by: gdsoumya <[email protected]> Signed-off-by: Brian Fox <[email protected]> --------- Signed-off-by: OneMatchFox <[email protected]> Signed-off-by: Brian Fox <[email protected]> Co-authored-by: gdsoumya <[email protected]>
The
goreleaser
-based release build for terraform-provider-argocd is currently failing with the following error:The affected code in this project was introduced in #14979, which, set the max value of
common.EnvMaxCookieNumber
tomath.MaxInt64
. This, asgoreleaser
correctly identifies, results in an overflow since themax
parameter inParseNumFromEnv
is anint
(notint64
). Seeargo-cd/util/env/env.go
Line 20 in 6fa9b17
Why
goreleaser
is failing because of an issue initialising code in this project is a bit of a mystery to me, but regardless, this PR addresses the issue (assuming, of course, thatint
is big enough and the code should not be updated to useenv.ParseInt64FromEnv
).Related: argoproj-labs/terraform-provider-argocd#354
Checklist: