Move email notification from the listener to the agents - #6708
Open
evgenyrp wants to merge 5 commits into
Open
Conversation
Comment on lines
+58
to
+62
| model-facing tool, since who receives mail is the agent code's decision. Its recipient | ||
| policy is apply-side — `NOTIFICATION_TEAM_EMAIL` is copied on every email and used as | ||
| `Reply-To`, and `NOTIFICATION_OVERRIDE_EMAIL` redirects everything to one address so a | ||
| development deployment cannot mail real developers. Sending needs `SENDGRID_API_KEY` and | ||
| `NOTIFICATION_SENDER` on hackbot-api. |
Member
There was a problem hiding this comment.
This is agent-specific details, not helpful here.
Member
There was a problem hiding this comment.
I do not find these changes necessary
Comment on lines
+106
to
+110
| try: | ||
| response = sendgrid.SendGridAPIClient(api_key=api_key).send(message=message) | ||
| except Exception as exc: | ||
| log.exception("Failed to email run %s to %s", ctx.run_id, recipients) | ||
| return ActionResult.failed(str(exc)) |
Member
There was a problem hiding this comment.
This will be coughed up by applier anyway:
bugbug/services/hackbot-api/app/actions_applier.py
Lines 165 to 171 in 0b6916f
| diff before the run ends (a notification quoting it). ``add --intent-to-add`` | ||
| only touches the index, so the working tree and any later collect are unaffected. | ||
| """ | ||
| _git(repo, "add", "--all", "--intent-to-add") |
Comment on lines
+157
to
+160
| def source_base(self) -> str | None: | ||
| """The commit the agent started editing from, or None if not recorded.""" | ||
| return self._source_base | ||
|
|
Member
There was a problem hiding this comment.
Instead of exposing this, we could use pending_patch() from within the HackbotContext.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #6664
fixes #6269