Skip to content

v3: correctly handle triggering tasks prior to deploy #1019

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

Merged
merged 10 commits into from
Apr 12, 2024

Conversation

nicktrn
Copy link
Collaborator

@nicktrn nicktrn commented Apr 10, 2024

Problem

It's possible to trigger a task before deploying it. This can happen because the deploy step hasn't completed yet, or because it wasn't started.

Solution

Triggering tasks prior to deploy will put the respective runs in a WAITING_FOR_DEPLOY state. This state prevents execution attempts. It's cleared as soon as the task has been deployed and is enqueued again for immediate execution while maintaining the correct order.

This also adds:

  • Sensible order for tasks filter items 🔤
  • Ability to enqueue with delays
  • Fix a race condition where the run wasn't created yet prior to dequeuing the execute message

Copy link

changeset-bot bot commented Apr 10, 2024

⚠️ No Changeset found

Latest commit: 60e178f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@matt-aitken matt-aitken requested a review from ericallam April 10, 2024 12:56
@ericallam ericallam merged commit efd970a into main Apr 12, 2024
@ericallam ericallam deleted the v3/waiting-for-deploy branch April 12, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants