Skip to content

[Bug] Job cost includes time before provisioning #4340

Description

@sachintandon

Summary

Job submission cost appears to include elapsed time from submitted_at, even when no instance has been assigned. This can make a queued job display a large cost that is unrelated to its actual compute interval; the value can also change on reads while a submission is active.

Expected behavior

  • No job cost accrues before the job is assigned/provisioned on billable compute.
  • Cost duration uses the authoritative job provisioning/assignment start and finish timestamps, not queue submission time.
  • Reused instances are handled using the job interval rather than charging the instance lifetime to every job.
  • Active cost reads are stable and do not retroactively price queue time.

Please add tests for never-provisioned, delayed-provisioning, finished, active, and reused-instance cases.

Activity

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