-
Notifications
You must be signed in to change notification settings - Fork 70
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
VACMS-19060: Ensure job token export does not throw an error #20200
Conversation
…for proper tokenization of the DTO.
Checking composer.lock changes... |
Checking composer.lock changes... |
Cypress Accessibility Violations
|
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.
Ran cron and confirmed no ECA errors.
Checking composer.lock changes... |
Description
The CreateAdvancedQueueJob is a custom ECA Action plugin that we wrote for providing a way to send any email notification via a queue. We followed practices in ECA's own Actions that allow the primary object, in this case a Drupal\advancedqueue\Job object, to be exported as a token and therefore usable by downstream Events, Conditions, or Actions. However, as of today, the job token is not being used anywhere, and thus we weren't seeing any problems with mail delivery.
The errors we were seeing were resulting from Job object not being in an expected format (a Drupal entity, Typed Data object, or scalar value). This PR solves that by creating the token as an associative array.
Relates to #19060
Testing done
Tested by setting all ECA Models to run on every cron run (otherwise we could only test once a day, as per the configuration of the existing Models), and running cron, or running the ECA Cron service directly (
ddev drush eval "\Drupal::service('eca_base.hook_handler')->cron();"
) which short circuits the very long running Drupal cron process.QA steps
PRE QA steps (once per day; may already have been done today by me). We do this because the current ECA Workflows are set to trigger only once per cron at midnight and we need to be able to test them more frequently than that.
Visit the ECA Workflow dashboard.
Edit each ECA Model
* * * * *
Repeat for each ECA Workflow
Delete all existing log messages (makes reviewing easier)
As a site admin
Definition of Done
Select Team for PR review
CMS Team
Public websites
Facilities
User support
Accelerated Publishing