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

Use iterator in access token migration #1522

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

acidtv
Copy link
Contributor

@acidtv acidtv commented Nov 4, 2024

Fixes #1521

Description of the Change

This PR uses .iterator() instead of .all() in the 0012_add_token_checksum migration to prevent reading the whole table into memory.

I'm not sure if it makes sense to unittest this.

Checklist

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name in AUTHORS

@acidtv acidtv marked this pull request as ready for review November 4, 2024 15:10
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.38%. Comparing base (e34819a) to head (735c3fe).
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1522      +/-   ##
==========================================
- Coverage   97.41%   97.38%   -0.04%     
==========================================
  Files          34       34              
  Lines        2164     2214      +50     
==========================================
+ Hits         2108     2156      +48     
- Misses         56       58       +2     
Flag Coverage Δ
?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@n2ygk n2ygk left a comment

Choose a reason for hiding this comment

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

Thanks!

@n2ygk n2ygk merged commit 0d32dec into jazzband:master Nov 4, 2024
20 of 21 checks passed
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.

Migration oauth2_provider.0012_add_token_checksum does not work for large access token tables
2 participants