Skip to content
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

Reload commit_deployments association before appending statuses #988

merged 1 commit into from Jan 13, 2020


Copy link

DazWorrall commented Jan 13, 2020

Fixes a race which prevents deployments from receiving status updates when a task completes. The issue exists because CommitDeployments are sometimes created after the task starts, something like:

  • Task created (pending state), PerformTaskJob and CreateDeploymentsForTaskJob enqueued
  • PerformTaskJob starts, transitions the job to running, which loads the commit_deployments association (in the append_status callback) but it is empty
  • CreateDeploymentsForTaskJob completes while the task in in progress
  • The task completes and append_status is called again, but with the stale association

I have tested this fix on our production instance and it looks good. NB that the additional test here does not reproduce the issue, but I spotted the missing coverage while investigating this issue and plugged the gap while I was here.

@DazWorrall DazWorrall requested review from JackTLi and casperisfine Jan 13, 2020
Copy link

casperisfine left a comment


@DazWorrall DazWorrall merged commit 82fbb32 into master Jan 13, 2020
3 checks passed
3 checks passed
CLA Contributor License Agreement (CLA) status
continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
@DazWorrall DazWorrall deleted the reload-commit-deployments branch Jan 13, 2020
@shopify-shipit shopify-shipit bot deployed to rubygems Jan 13, 2020 Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.