Conversation
|
@audiodude , do you think we should remove storing the tokens via Redis given there's always going to be one instance of the class and it maintains state. There could be restarts of the application or multiple instances but they can all generate newer tokens and continue to function independently as generating a new token doesn't invalidate the other. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1146 +/- ##
==========================================
+ Coverage 92.78% 92.83% +0.04%
==========================================
Files 74 74
Lines 4311 4324 +13
==========================================
+ Hits 4000 4014 +14
+ Misses 311 310 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@audiodude shall we merge and deploy this soon? WP1 seems to be the last system using "old" username/password auth to Zimfarm (cannot say for sure, since all I see is logs using "old" API endpoints). |
|
Yes I generally feel good about the concept and am eager to merge. However, I do want to do a detailed code review first and I haven't had the time. Mostly just to make sure I understand the changes and the new flow. |
That's certainly a valid design. But this PR already has it continuing to use Redis, and we need Redis for other parts of the system, so I think it's fine to leave (though you could add an issue if you'd like for the future). |
audiodude
left a comment
There was a problem hiding this comment.
This looks great, thank you so much!
just a few comments.
Rationale
This PR enhances WP1 to optionally authenticate with Zimfarm using ouath (via Ory) instead of just username and password.
Changes
ZimfarmErrorwhen no token can be generated instead of delegating it to callersThis closes #1144