Skip to content

Always reinitialize activities when retrying Workers processes

Erwan Rouchet requested to merge retry-process-require-activities into release-1.6.5

Closes #1855 (closed)

This changes the logic that calls the initialize_activity task so that the APIs don't have to deal with it. This will make it easier to later generalize activities to other modes.

On the first run (start), the task only runs if the activities are not yet ready, and on subsequent runs (retries), it always runs, because we want to update them again even if they were already done.

This breaks a lot of tests that are trying to start or retry processes, since the task is triggered much more often than before. I'll also have to update some EE tests.

Unexpected RQ tasks are quite annoying to get in unit tests because we don't see them until the tests run in CI. If we have the backend stack running locally, there is a Redis instance so the tests don't mind and will happily schedule the task, but in CI there is no Redis. So I updated the settings to automatically put an invalid hostname on the Redis config during tests, so that the tests always break just like in CI.

Merge request reports

Loading