Skip to content

feat: adds the preemptible task hint#728

Open
claymcleod wants to merge 14 commits intowdl-1.3from
preemptible-hint
Open

feat: adds the preemptible task hint#728
claymcleod wants to merge 14 commits intowdl-1.3from
preemptible-hint

Conversation

@claymcleod
Copy link
Collaborator

@claymcleod claymcleod commented Oct 15, 2025

This PR proposes the formalization of the preemptible hint, which is already supported in both Sprocket and Cromwell (albiet as a runtime key).

Briefly, preemptible aims to indicate the number of times a preemptible instance may be tried before using a non-preemptible instance. Failures other than preemption are proposed to count against the max_retries requirement instead.

Before submitting this PR, please make sure:

  • You have added a few sentences describing the PR here.
  • You have added yourself or the appropriate individual as the assignee.
  • You have updated the README.md or other documentation to account for these
    changes (when appropriate).
  • You have updated the CHANGELOG.md describing the change and linking back to your pull request.
  • You have read and agree to the CONTRIBUTING.md document.
  • You have added or updated relevant example WDL tests to the specification.
    • See the guide for more details.

@claymcleod claymcleod changed the base branch from wdl-1.2 to wdl-1.3 October 15, 2025 01:25
@claymcleod claymcleod self-assigned this Oct 15, 2025
@claymcleod claymcleod added S06-voting-active (State) Changes for which voting is active. K-feature (Kind) A new feature request (for issues) or implementation (for PRs).. Z-specification-change (Metadata) An issue or PR related to a specification change. labels Oct 15, 2025
@claymcleod claymcleod requested a review from a team October 15, 2025 01:52
@claymcleod
Copy link
Collaborator Author

claymcleod commented Oct 20, 2025

Note that this was already informally implemented in Sprocket, as I believe we just copied how Cromwell handles this key. Thus, there is no associated PR—you can just grab the latest published version of Sprocket and try it out. It should work for any TES server that implements pre-emptible instances at a minimum.

@claymcleod claymcleod added this to the 1.3 milestone Oct 26, 2025
@claymcleod claymcleod requested a review from patmagee November 23, 2025 20:27
@claymcleod claymcleod added S05-in-progress (State) A task that is in progress. and removed S06-voting-active (State) Changes for which voting is active. labels Jan 6, 2026
@claymcleod
Copy link
Collaborator Author

There is considerable debate about exactly how this should be implemented. Given this, I think it's best to exclude from the WDL 1.3 release. At this point, I'm not even positive I feel this feature should be stabilized in this exact form—the problem begs for a more formal specification IMO.

@claymcleod claymcleod removed this from the 1.3 milestone Jan 6, 2026
@vsmalladi
Copy link
Contributor

I agree @claymcleod This should be moved to a 1.4 maybe

@claymcleod
Copy link
Collaborator Author

I've been thinking about this more, and I agree with Geoff's general direction. I also agree with Venkat that we want more flexibility in the future, but it's not a regression to introduce this approach first before a more complex solution—we need time to figure out what that should look like.

Given that, and the fact that we can formalize what both Sprocket and Cromwell do today, I think it's okay to move forward. A future execution_plan hint (or similar) could explicitly override these defaults when we're ready for that.

@claymcleod
Copy link
Collaborator Author

And, to be clear, I'm still in favor of just bumping this to 1.4.

@claymcleod claymcleod added this to the 1.4 milestone Jan 12, 2026
@claymcleod
Copy link
Collaborator Author

If this isn't also clear from the answer above, I do think there is a world where we don't need a more complex way to outline an execution plan. We'll have to find that out as we go through the design process.

Comment on lines +6159 to +6160

A hint to the execution engine that a task _may_ be tried using a preemptible instance up to the specified number of times. If all preemptible attempts fail due to preemption, the engine must fall back to executing on a non-preemptible instance (up to the limit imposed by `max_retries`). Engines that are not configured to use or do not support preemptible instances may ignore this hint entirely.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we should be clear here what a "preemptible" instance is.. at one point it went without saying since the clouds defined that behaviour for us, but now I think it would be worthwhile specifying it.

##### ✨ `preemptible`

* Accepted types: `Int`
* Default value: `0`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we say something about the absence of preemptible indicates is the same as the default value preemptible: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

K-feature (Kind) A new feature request (for issues) or implementation (for PRs).. S05-in-progress (State) A task that is in progress. Z-specification-change (Metadata) An issue or PR related to a specification change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants