Skip to content

Maintenance: job download status test coverage #1318

Description

@crowecawcaw

Description

New job tracking feature could use additiona test coverage. Some ideas:

Cancellation

  • Ctrl+C mid-task-download → AssetSyncCancelledError propagates, checkpoint not advanced
  • Ctrl+C between tasks of a multi-task job → succeeded tasks' files remain on disk
  • Cancel with N jobs in flight → remaining futures cancelled, no partial job_download_results recorded as success
  • Cancel → status file not written (assert current behavior) or write partial status (if you change it)
  • sigint_handler.continue_operation false but _download_manifest_paths returns normally → still raises

Task ↔ job status consistency

  • Preserve branch: job failed→downloaded, existing failed task entry → task cleared to downloaded
  • Inactive flip with downloaded_files > 0 → job error_code/error_message/failed_files cleared
  • Inactive flip with downloaded_files == 0 → job skipped, tasks cleared
  • Invariant test: no entry where download_status == "downloaded" and any task has non-null error_code
  • Requeued job genuinely re-running → tasks not falsely reconciled to downloaded

Zero-output tasks

  • End-to-end: succeeded task whose session action has empty manifests → appears in tasks as downloaded, total_files: 0
  • Job with mixed output/no-output steps → numerator matches taskRunStatusCounts.SUCCEEDED
  • Verify _filter_session_actions_without_manifests_from_job_sessions doesn't strip the task before attribution
  • Cleanup pass at _incremental_download.py:1551 must not del legitimately-empty task entries

Attribution loop

  • Same path in 3+ manifests across 3 jobs, list order shuffled → newest timestamp wins
  • Same path across two tasks of the same job (requeue) → owned by exactly one task, downloaded once
  • Cross-job transfer then within-job overwrite of the same path (interleaved)
  • Loser job with all paths transferred → still reports filesystem-based status, entry not dropped
  • None-sentinel invariant: no None survives into any download batch
  • Task with mixed task-attributed + non-task-attributed paths → leftovers downloaded, counted once, not double-counted
  • Manifest key with no step-/task- segment → task_id is None, path falls to job-level bucket
  • Property/fuzz test over (timestamp, job, task, path) tuples asserting: every path downloaded exactly once, counts sum correctly

Error classification

  • context chain (implicit raise inside except) — currently UNKNOWN; decide + test
  • JobAttachmentsS3ClientError with status codes other than 403/404 → UNKNOWN, not misclassified
  • Cyclic cause chain terminates
  • Verbose "Not found. Please check your bucket name…" message with no structured signal → UNKNOWN (regression guard on the removed substring matching)

Status file lifecycle

  • Two processes writing concurrently (real threads/procs, not mocked) → no lost update, no corrupt JSON
  • Lock held past TTL by slow holder → second writer takes over, first doesn't unlink another's lock
  • Lock acquisition timeout → proceeds unlocked with warning
  • Corrupt/truncated existing status file → merge degrades gracefully, doesn't lose the run
  • Multiple storage-profile locations, one unmounted mid-run → other locations still written

Failed-jobs tracker (thin coverage today)

  • Retry cap boundary: attempt 5 → warning + suppressed from candidates on run 6
  • --force-bootstrap clears abandoned entries
  • Retried job deleted from service (ResourceNotFoundException) → removed from tracker
  • Retried job present in candidates but produces no result entry → cleared, not retried forever
  • Throttling/auth error during retry injection → stays in tracker
  • Tracker file unwritable → run still succeeds

Cross-cutting

  • Windows/macOS path normcase collision (C:\Out\A.exr vs c:\out\a.exr) → treated as one path
  • Cross-OS path mapping + per-task attribution together (submit Windows → sync macOS)
  • Full-run integration test asserting the producer writes the exact JSON shape DCM consumes (guards against builder-only tests passing while producers are absent)

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceChanges to builds, tests, processes, or code that does not directly affect functionalityneeds triageA new report that needs a first look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions