Skip to content

No lifecycle.cost_limit: TTL is the only ceiling on a job, so a hung job bills to the full TTL #100

Closed

Description

@scttfrdmn

The gap

No workflow adapter emits lifecycle.cost_limit. Audited all six 2026-10-04:

adapter ttl container cost_limit
nf-spawn yes yes (task.container) NO
miniwdl-spawn yes yes (docker_image) NO
cwl-spawn yes yes (docker_image) NO
snakemake-executor-plugin-spawn yes NO (being fixed, #12) NO (being fixed, #12)
airflow-spawn yes NO NO
pegasus-spawn n/a — the example builds the spec itself yes NO

So TTL is the only ceiling on a job in every integration. spawn has supported lifecycle.cost_limit since 0.103.0, and spored enforces TTL and cost independently — first limit to fire wins — so the second belt is simply never fastened.

Why it matters more for a workflow than a single launch

A human running spawn task run once can watch it. A fan-out of N jobs has a worst case of N x TTL x the instance rate, and the failure mode that actually costs money is a job that hangs rather than fails: it produces no error, so nothing retries or aborts, and it bills until the TTL expires. With no cost cap there is no second thing that stops it.

This is the project's existential concern — cost control — and it is the one spawn-side feature the adapters uniformly do not expose.

Shape

Mirror the ttl plumbing exactly: a setting/config knob, threaded into the spec builder's lifecycle dict, omitted when unset so spawn's own default still applies. In snakemake-executor-plugin-spawn that was ~10 lines:

lifecycle: dict = {"ttl": ttl, "on_complete": on_complete}
if cost_limit is not None and float(cost_limit) > 0:
    lifecycle["cost_limit"] = float(cost_limit)

Note --cost-limit became a total (compute + storage) in spawn 0.116.0 (spawn#616), so a cap now bounds EBS as well as instance-hours.

Found while fixing snakemake-executor-plugin-spawn#12, which reported it for that adapter. Filing per-repo so each tracks its own fix; the pattern is identical.

Activity

  1. added a commit that references this issue on Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions