Skip to content

validate_and_wait: name the job and dataset when a validation job fails - #14

Merged
nikolaos-paximadakis-eea merged 1 commit into
mainfrom
fix/validation-job-error-context
Nov 21, 2026
Merged

nikolaos-paximadakis-eea merged 1 commit into
mainfrom
fix/validation-job-error-context

Conversation

@nikolaos-paximadakis-eea

Copy link
Copy Markdown
Collaborator

When a validation job ends FAILED or CANCELED_BY_ADMIN, easy.validate_and_wait now raises a JobError that names the job and the dataset, for example Validation job 123 for dataset 456 ended FAILED: <info>. The error used to say only Job FAILED. status and info are unchanged.

Live check (sandbox, Bearer). I started a validation and cancelled the running job through PUT /orchestrator/jobs/cancelJob/{jobId}:

  • With jobShouldFail=true the job ended FAILED. With a jobInfo value it ended CANCELED_BY_ADMIN and the info text came through. In both cases validate_and_wait raised at once with the right status and info.
  • A cancel while the job was still QUEUED (in the first ~4 s) did not stick: the job ended FINISHED.
  • The cancelled dataset was not left locked: a new validation started 5 s later was accepted.

From the backend source (MasterOneVersion): a refused start is stored as REFUSED and answered as 423 (LockedError), so it never becomes a job to poll. The docstring now says so.

Also included: a new mocked test for both endings, a section in docs/live_testing_notes.md, a CHANGELOG entry, and the regenerated docs/reference/easy.md. Not part of a release yet.

A validation job that ends FAILED or CANCELED_BY_ADMIN now raises a
JobError reading "Validation job <id> for dataset <id> ended <status>",
with status and info unchanged. Both endings were checked live on the
sandbox by cancelling a running job; the dataset was not left locked.
The docstring now explains that a refused start is answered as a 423
(LockedError) and never becomes a job to poll. Adds a live-testing note.
@nikolaos-paximadakis-eea
nikolaos-paximadakis-eea merged commit 73543a2 into main Nov 21, 2026
6 checks passed
@nikolaos-paximadakis-eea
nikolaos-paximadakis-eea deleted the fix/validation-job-error-context branch November 21, 2026 23:29
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.

1 participant