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: set default value for users.session.duration (#9962) #10185

Merged

Conversation

numacci21
Copy link
Contributor

@numacci21 numacci21 commented Aug 3, 2022

Fixes #9962

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

NOTE:

  • Line 672, 1285-1287, 1320-1321, 1325 changes in settings_test.go have been automatically formatted.

@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Merging #10185 (caeda75) into master (3520dfc) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #10185      +/-   ##
==========================================
+ Coverage   45.93%   45.94%   +0.01%     
==========================================
  Files         227      227              
  Lines       27419    27418       -1     
==========================================
+ Hits        12594    12598       +4     
+ Misses      13114    13110       -4     
+ Partials     1711     1710       -1     
Impacted Files Coverage Δ
util/settings/settings.go 51.42% <100.00%> (+0.51%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Takuya Yaginuma <biz.mkgoat.yagi+github@gmail.com>
Signed-off-by: y-takuya <biz.mkgoat.yagi+github@gmail.com>
@numacci21 numacci21 force-pushed the default-users-session-duration branch from 02c4597 to c74a524 Compare August 3, 2022 16:14
Copy link
Collaborator

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@y-takuya thanks so much for this!

Could you add a quick note to docs/operator-manual/upgrading/2.4-2.5.md to say something to this effect:

Invalid user.session.duration values now fall back to 24h

Before v2.5, an invalid user.session.duration value in argocd-cm would 1) log a warning and 2) result in user sessions having no duration limit.

Starting with v2.5, invalid duration values will fall back to 24 hours.

@crenshaw-dev crenshaw-dev changed the title fix(#9962): set default value for users.session.duration fix: set default value for users.session.duration (#9962) Aug 3, 2022
y-takuya added 2 commits August 4, 2022 23:53
Signed-off-by: y-takuya <biz.mkgoat.yagi+github@gmail.com>
Signed-off-by: y-takuya <biz.mkgoat.yagi+github@gmail.com>
@numacci21
Copy link
Contributor Author

@crenshaw-dev Thank you very much for your comment and for revising the PR title. I added a note with mostly what you proposed.

Signed-off-by: y-takuya <biz.mkgoat.yagi+github@gmail.com>
@crenshaw-dev
Copy link
Collaborator

@y-takuya the test failure is due to a problem on the master branch. I'll update your branch after the fix is merged (should be in the next ~40min).

@numacci21
Copy link
Contributor Author

@crenshaw-dev I see. Thank you for updating my branch. The CI is still failing, but the reason was due to a network problem that failed to download the k3s binary (exit code 92). It might be a temporary issue, so I will try to re-trigger this CI again.

Copy link
Collaborator

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. thanks @y-takuya!

@crenshaw-dev crenshaw-dev merged commit 7488f68 into argoproj:master Aug 5, 2022
ashutosh16 pushed a commit to ashutosh16/argo-cd that referenced this pull request Aug 11, 2022
…goproj#10185)

* fix: set default value for users.session.duration

Signed-off-by: Takuya Yaginuma <biz.mkgoat.yagi+github@gmail.com>
Signed-off-by: y-takuya <biz.mkgoat.yagi+github@gmail.com>

* docs: add user.session.duration change

Signed-off-by: y-takuya <biz.mkgoat.yagi+github@gmail.com>

* docs: fix users.session.duration parameter name

Signed-off-by: y-takuya <biz.mkgoat.yagi+github@gmail.com>

* Retrigger CI pipeline

Signed-off-by: y-takuya <biz.mkgoat.yagi+github@gmail.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TOB-ARGO-TM8: Set a reasonable default if UserSessionDuration parsing fails
2 participants