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

only sync AMO policies (+ delete unused) #22255

Merged
merged 2 commits into from
May 20, 2024

Conversation

eviljeff
Copy link
Member

fixes mozilla/addons#14791 (I thought I'd need this for mozilla/addons#14777 but probably not now)

Now policy labels are exposed they are taken into account, and only policies with, or nested under, the AMO label, or no label (mainly for sub-policies, but requirements were ambiguous) are added. Because there'll be a lot of existing CinderPolicy instances I added a clean-up too, that deletes policies that weren't present in the recent sync (assuming we've not fk'd them to anything)

Can be tested by pressing the sync button in django admin and seeing only AMO labelled policies synced. Clean-up can be tested by having CinderPolicies that won't be in the recent sync (they need to have a modified date of yesterday or prior)

@eviljeff eviljeff requested a review from diox May 17, 2024 13:31
src/olympia/abuse/tasks.py Outdated Show resolved Hide resolved
@eviljeff eviljeff requested a review from diox May 17, 2024 17:16
@eviljeff eviljeff merged commit 85958ba into mozilla:master May 20, 2024
13 of 14 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
2 participants