-
Notifications
You must be signed in to change notification settings - Fork 479
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
Implement delete_progress API for resetting progress #42235
Conversation
end | ||
|
||
test "delete_progress deletes channel tokens" do | ||
# TODO: Write this test after the work to add script_ids to channel tokens is completed. |
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.
This could be written now since there is a script_id column on channel tokens.
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.
I wanted to use the same query methods that are used in the primary codepaths if possible and those haven't been updated to look at script_id
yet, right?
assert driver_user_level.driver? | ||
assert_equal 1, PairedUserLevel.pairs(driver_user_level).count | ||
|
||
# delete the driver's progress |
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.
Should be # delete the navigator's progress
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.
Good catch, thanks!
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.
Just left a few questions/comments!
84a2d6a
to
016eab7
Compare
This PR implements the the delete_progress API that will be used by admins to reset progress. See the tech spec for details on the design. As part of this work, soft-deletes are now enabled on the UserScript, UserLevel, and ChannelToken models.
The tests try to use the same methods to query the data that our primary codepaths use where possible to make the tests as realistic as possible.
Links
Testing story
Deployment strategy
Follow-up work
Privacy
Security
Caching
PR Checklist: