[Issue #8399 / #8605] Add email processor for workflow management#8990
Open
[Issue #8399 / #8605] Add email processor for workflow management#8990
Conversation
kkrug
reviewed
Mar 12, 2026
Comment on lines
+118
to
+120
|
|
||
| def on_enter(self, state_machine_event: StateMachineEvent, event_data: EventData) -> None: | ||
| print(event_data) |
Collaborator
There was a problem hiding this comment.
Was this supposed to do anything else or is it a stub for future use?
Comment on lines
+50
to
+51
| except Exception: | ||
| logger.exception("Failed to send email for workflow", extra=log_extra) |
Collaborator
There was a problem hiding this comment.
I know we're not fully up and running yet, but are we ok with this failing silently?
Comment on lines
+57
to
+59
| # If the state machine's state is changing as part of this | ||
| # then we don't want to do anything. We only want to send | ||
| # emails when first entering the state. |
Collaborator
There was a problem hiding this comment.
Suggested change
| # If the state machine's state is changing as part of this | |
| # then we don't want to do anything. We only want to send | |
| # emails when first entering the state. | |
| # If the state machine's state is NOT changing as part of this | |
| # then we don't want to do anything. We only want to send | |
| # emails when first entering the state. |
Comment on lines
+37
to
+38
| for approval_config in self.approval_mapping.values(): | ||
| self.state_approval_mapping[approval_config.approval_state] = approval_config |
Collaborator
There was a problem hiding this comment.
Can two different events map to the same approval_state (or will it be possible in the future)?
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.
Summary
Fixes #8399 + #8605
Changes proposed
Context for reviewers
We want to send approval emails only when first entering an approval state. We know this by checking:
The email logic is mostly a lot of error checks, logging and guard rails. The actual email contents aren't 100% finalized, but are good enough for a prototype and testing.
Validation steps
See tests - still not able to run service on its own. Soon though.