-
Notifications
You must be signed in to change notification settings - Fork 0
Fix test caching - only cache pagination DB to avoid max models errors #57
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: b-rad-c <25362581+b-rad-c@users.noreply.github.com>
Co-authored-by: b-rad-c <25362581+b-rad-c@users.noreply.github.com>
Co-authored-by: b-rad-c <25362581+b-rad-c@users.noreply.github.com>
…ments Co-authored-by: b-rad-c <25362581+b-rad-c@users.noreply.github.com>
|
@copilot - this isn't working, when I run with the cache I get the following: These tests are failing due to max models exceeded. Some of the models have a limit to the number of models each user can create. We'll need to either delete all the items each user has created or just delete the crud db. During setup the pagination db is the time consuming setup, so I'm thinking to solve this it'll be easier to just delete and re-create the crud DB each time so that we don't get these errors. changes requested
|
b-rad-c
left a comment
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.
@copilot - see my previous comment on the PR, we need changes
… errors Co-authored-by: b-rad-c <25362581+b-rad-c@users.noreply.github.com>
... Fixed in commit 2ea257b. The cache now only caches the pagination DB (the expensive part) and always recreates the crud DB to avoid MAX_MODELS_EXCEEDED errors. Tests now pass with
Tested and verified: |
The
--use-cacheflag raisedRuntimeError: Need to fix cache with new auth systembecause test setup wasn't updated when auth moved to JWT tokens. After initial fix, tests were failing with MAX_MODELS_EXCEEDED errors because cached users already had models from previous test runs.Changes
Added
login_cached_user()helper that authenticates to cached users by:subclaimUpdated
setUpClasscache logic:--use-cache) to prevent MAX_MODELS_EXCEEDED errorsTesting
--use-cache(backward compatible)--use-cache(no MAX_MODELS_EXCEEDED errors)Tests now run with
--use-cachewithout MAX_MODELS_EXCEEDED errors while still benefiting from cached pagination DB performance.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.