-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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(appcontroller): if a history limit is negative, automatically converted to 0 #22036
base: master
Are you sure you want to change the base?
fix(appcontroller): if a history limit is negative, automatically converted to 0 #22036
Conversation
✅ Preview Environment deployed on Bunnyshell
See: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
fix(appcontroller): if a history limit is negative, automatically converted to 0 Signed-off-by: kingbj0429 <[email protected]>
…oproj#21887) (argoproj#21936) Signed-off-by: rumstead <[email protected]> Co-authored-by: Ishita Sequeira <[email protected]> Co-authored-by: Blake Pettersson <[email protected]> Signed-off-by: kingbj0429 <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]> Signed-off-by: kingbj0429 <[email protected]>
Signed-off-by: reggie-k <[email protected]> Signed-off-by: Regina Voloshin <[email protected]> Signed-off-by: Alexandre Gaudreault <[email protected]> Co-authored-by: rumstead <[email protected]> Co-authored-by: Alexandre Gaudreault <[email protected]> Signed-off-by: kingbj0429 <[email protected]>
…abels (argoproj#22008) Signed-off-by: Leonardo Luz Almeida <[email protected]> Signed-off-by: kingbj0429 <[email protected]>
…#21990) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: kingbj0429 <[email protected]>
…rgoproj#21989) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: kingbj0429 <[email protected]>
Signed-off-by: Isaac Gaskin <[email protected]> Signed-off-by: kingbj0429 <[email protected]>
…rgoproj#21015) Signed-off-by: toyamagu2021 <[email protected]> Signed-off-by: toyamagu-2021 <[email protected]> Signed-off-by: kingbj0429 <[email protected]>
Signed-off-by: nitishfy <[email protected]> Signed-off-by: Nitish Kumar <[email protected]> Co-authored-by: Blake Pettersson <[email protected]> Signed-off-by: kingbj0429 <[email protected]>
Signed-off-by: Surajyadav <[email protected]> Signed-off-by: kingbj0429 <[email protected]>
0a156f9
to
bb59553
Compare
@@ -1287,6 +1287,9 @@ func (in RevisionHistories) LastRevisionHistory() RevisionHistory { | |||
|
|||
// Trunc truncates the list of history items to size n | |||
func (in RevisionHistories) Trunc(n int) RevisionHistories { | |||
if n < 0 { |
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.
although a smallish change, we should add some test cases
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.
which test cases do I add? :)
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 would expand on Test_appStateManager_persistRevisionHistory and add a case where "-1" becomes 0. It should be pretty easy to get 100% code coverage on your changes :)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22036 +/- ##
=========================================
Coverage ? 55.74%
=========================================
Files ? 342
Lines ? 57077
Branches ? 0
=========================================
Hits ? 31816
Misses ? 22619
Partials ? 2642 ☔ View full report in Codecov by Sentry. |
Related to #21691
There are two Expected Behaviors
I choose num 2.
Before
After
Checklist: