Bug #18013

[api] the rake tasks db:check_long_lived_tokens and db:fix_long_lived_tokens should take API.MaxTokenLifeTime into account

Added by Ward Vandewege 2 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
08/12/2021
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-

Description

These rake tasks only consider the Login.TokenLifeTime configuration value.

We want to use API.MaxTokenLifeTime instead. And if that is not set, use Login.TokenLifeTime, since the docs state that the former takes precedence.


Subtasks

Task #18014: review 18013-token-rake-task-fixResolvedWard Vandewege

Associated revisions

Revision b190f9b1
Added by Ward Vandewege 2 months ago

Merge branch '18013-token-rake-task-fix'

closes #18013

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <>

History

#1 Updated by Ward Vandewege 2 months ago

  • Status changed from New to In Progress

#2 Updated by Ward Vandewege 2 months ago

  • Description updated (diff)

#3 Updated by Ward Vandewege 2 months ago

Ready for review at 377467f5285670a797ec02b4ca6c5a129c289a39 on branch 18013-token-rake-task-fix. Tests are running at https://ci.arvados.org/view/Developer/job/developer-run-tests/2635/.

#4 Updated by Lucas Di Pentima 2 months ago

Just one comment:

  • At line 55 there's a next call that AFAICT makes the rake task return early but in that task, I think the idea is to report so maybe it would make more sense to just display the warning and continue with the iteration?

Apart from that, it LGTM.

#5 Updated by Ward Vandewege 2 months ago

Lucas Di Pentima wrote:

Just one comment:

  • At line 55 there's a next call that AFAICT makes the rake task return early but in that task, I think the idea is to report so maybe it would make more sense to just display the warning and continue with the iteration?

Apart from that, it LGTM.

Well, that `next` call is inside a loop so it just continues to the next iteration. It's true that the other `next` calls in the rake task make the task return early (they are the equivalent of a `return`). This is a rake task oddity, maybe I should just add a comment along those lines? If that makes sense I can merge this.

#6 Updated by Ward Vandewege 2 months ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved

Also available in: Atom PDF