-
Notifications
You must be signed in to change notification settings - Fork 552
When resolving multiple jobs in a reviewer action, record activity & notify owners once #23459
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
When resolving multiple jobs in a reviewer action, record activity & notify owners once #23459
Conversation
359fccb
to
bd62d47
Compare
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 overall agree with the strategy, just some questions about the changes in record_decision
.
And record_decision
could really do with some refactoring - it's become a very complex chunk of code.
for version in self.target_versions: | ||
now = datetime.now() |
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.
did you intend to move this out of the loop? It doesn't change anything here.
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.
Yes, minor detail but I wanted to guarantee all the versions got the same datestatuschanged
to make tracking any issues easier.
# executed completely and log an activity, the rest are no-op that | ||
# we just need for record-keeping purposes. We will only notify the | ||
# owners for that "complete" one. | ||
notify_owners = action_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.
what's the thinking about defaulting notify_owners
to action_completed
? I don't understand the connection - it would mean all actions that aren't migrated over to ContentAction
currently would send multiple emails.
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 can't guarantee non-migrated actions behave like the ContentAction
ones and don't do anything/don't log anything when not necessary. In fact I know this isn't the case. I did this to ensure those actions would have the exact same behavior as before out of caution.
Fixes mozilla/addons#15495
Context
While Cinder consolidates multiple reports into the same job, we can still have multiple jobs for a given add-on because of escalations. When that happens, reviewers can resolve them all at the same time, but we don't want to duplicate activities or emails.
Testing
Repeat with a different add-on, this time rejecting multiple versions instead of disabling the add-on.