Repository navigation
feat: support executors[].ignore_error - #174
Conversation
Accept `ignore_error: true` instead of refusing it. Such executors' jobs get the annotation `ignore-error: "true"`, with which the taskmaster (elixir-cloud-aai/tesk-core#142) goes on after they fail. The task state ignores their failed jobs, unless the taskmaster ended the job itself (`activeDeadlineSeconds`, reason `DeadlineExceeded`), as its executor may never have run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A taskmaster can stop at an ignored failure without uploading the outputs: one without support for the annotation (as the default image still is), or one whose failed pods didn't end in time. After an ignored failure, a task with outputs (or unknown ones, read from the stored task) is now COMPLETE only if its outputs filer completed; otherwise SYSTEM_ERROR. Also from the review: a constant for the annotation value, an `isDone` helper, clearer tests and docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewer's GuideData structuresDefine the executor-job annotation key and value used to communicate
APIAllow
ImplementationSet the taskmaster contract annotation for executors that ignore errors, and supply stored-task output information when resolving task state.
Resolve ignored executor failures as done without failing the task, except when the taskmaster ended the job; require a completed outputs filer after an ignored failure when outputs may exist.
DocumentationDocument
Update task-state rules to account for ignored executor failures and the outputs filer requirement.
Explain the compatibility and taskmaster upgrade requirements for
TestsTest task-state resolution for ignored failures, deadline-ended jobs, missing or unfinished executors, and outputs-filer requirements.
Test that conversion sets the ignore-error annotation and that stored-task outputs affect state resolution after an ignored failure.
Move the
Other changesFiles not grouped.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #174 +/- ##
==========================================
+ Coverage 75.07% 75.33% +0.26%
==========================================
Files 71 71
Lines 3274 3309 +35
Branches 386 393 +7
==========================================
+ Hits 2458 2493 +35
Misses 663 663
Partials 153 153 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Covers the stored task's outputs in extractStateFromK8sJobs and an ignoring executor that hasn't ended, for Codecov's patch check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Linked issuesChecked at commit da12d96 #159 feat: support executors[].ignore_error · 2 of 3 met
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/main/java/uk/ac/ebi/tsc/tesk/k8s/convert/TaskStateResolver.java" line_range="214" />
<code_context>
+ if (allCompleted
+ && ignoredFailure
+ && !Boolean.FALSE.equals(hasOutputs.get())
+ && !outputFiler.map(filer -> hasSucceeded(filer.getJob())).orElse(false)) {
+ return TesState.SYSTEM_ERROR;
+ }
</code_context>
<issue_to_address>
**Running filer reports system error**
When the taskmaster completes after an ignored executor failure while the outputs filer is still running or has not yet appeared in the API read, the new guard treats an outputs filer that is still running or not yet visible as a task failure, so a supported task that reaches taskmaster completion before its filer finishes is reported as `SYSTEM_ERROR` instead of remaining nonterminal; callers can see a failed task while valid outputs are still being produced.
Keep the task nonterminal while the outputs filer is pending or absent, and report `SYSTEM_ERROR` only when the filer has actually failed or cannot complete.
</issue_to_address>
### Comment 2
<location path="src/test/java/uk/ac/ebi/tsc/tesk/k8s/convert/TesKubernetesConverterTest.java" line_range="942" />
<code_context>
+ 0,
+ null,
+ User.builder("test-user-id").build());
+ String annotation = job.getMetadata().getAnnotations().get(ANN_IGNORE_ERROR_KEY);
+ assertEquals(
+ "ignore_error: " + ignoreError,
</code_context>
<issue_to_address>
**Wrong annotation key goes unnoticed**
When `ANN_IGNORE_ERROR_KEY` has an incorrect value, when `ANN_IGNORE_ERROR_KEY` is changed from the taskmaster contract key `ignore-error`, `fromTesExecutorToK8sJob_ignoreError` reads back the same incorrect constant at line 942 and passes; `ignoreError` also writes that constant at line 783, so the resolver tests pass with the same wrong key while the taskmaster ignores the annotation.
Assert the literal key `ignore-error` in the converter test, and make the resolver test fixture use that literal contract key.
Also at `src/test/java/uk/ac/ebi/tsc/tesk/k8s/convert/TaskStateResolverTest.java:782`.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 2 findings to address first, and if the annotation or failure-state checks are wrong, a task may continue after an executor failure and the outputs filer may publish incomplete or incorrect outputs while the task is reported complete. Reverting prevents new tasks from using this behavior, but already-published outputs remain; they are bounded and can generally be identified and regenerated.
Blocking findings: src/main/java/uk/ac/ebi/tsc/tesk/k8s/convert/TaskStateResolver.java:214, src/test/java/uk/ac/ebi/tsc/tesk/k8s/convert/TesKubernetesConverterTest.java:942
The tests now write and check the annotation key of the contract with the taskmaster literally, so that a changed constant fails them (Sourcery). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #161, #174, #175, #176, #178, #181, #183 and #184. The conflict in docs/upgrading.md is resolved by merging both lists under "To 1.3.0": the upgrade order for filer labels and Java 21 come first, and the TES 1.1 fields item no longer says that ignore_error: true is refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lists the changes merged into dev since the notes were written: Java 21 (#161), ignore_error (#174), the resource server (#175), output file logs (#176), the Kubernetes client (#178), Dependabot labels (#181), the executor job selector (#183) and full test coverage (#184). Adds a Breaking changes section, as in the 1.2.0 notes, and sets date-released to the planned tag date, 2026-11-16. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
The TESK API accepts TES 1.1
executors[].ignore_errorand reports thetask's state accordingly. It needs a taskmaster with
elixir-cloud-aai/tesk-core#143 (merged, not yet released).
ignore_error: trueis no longer rejected. The converter sets theannotation
ignore-error: "true"on the executor's job, the contractwith the taskmaster.
TaskStateResolver: a failed executor job with that annotation doesn'tmake the task
EXECUTOR_ERROR/PREEMPTED, unless the taskmaster endedthe job itself (
activeDeadlineSeconds, or the reasonDeadlineExceeded); then the container may never have run.can't be read) is
COMPLETEonly if its outputs filer's job completed,otherwise
SYSTEM_ERROR. This catches taskmasters that stop at thefailure: the current default image (0.11.0), which doesn't know the
annotation, and a new one whose failed pods didn't end in time.
4 in the index, upgrading notes.
Closes #159
Verification
./mvnw -B checkstyle:check spotless:check clean verify(Java 8,offline): BUILD SUCCESS, all unit tests and 99 integration tests pass,
0 checkstyle violations, coverage checks pass.
mkdocs build --strict: clean.TaskStateResolverTest(ignored failures, other annotationvalues, a later executor error, jobs ended by deadline, outputs filer
required after ignored failures, missing later executors),
TesKubernetesConverterTest(annotation,extractHasOutputs),TasksApiControllerTest.createTask_valid_ignoreErrorTrue,Tes11FieldsTest.adversarial-reviewerandquality-reviewer, two rounds. Round1 found that a taskmaster stopping at an ignored failure of the last
executor would report
COMPLETEwithout uploaded outputs (high) orafter a timeout (medium); fixed by the outputs filer rule above. Round 2
found only a docs gap in rule 4, fixed.
codecov/patchmissed twobranches (an ignoring executor that hasn't ended, and the stored task's
outputs read through
extractStateFromK8sJobs); tests for both wereadded.
(fixed). The other is declined; see below.
Declined review findings
Sourcery said an outputs filer still running when the taskmaster's job
completes would give
SYSTEM_ERROR. The taskmaster waits for theoutputs filer to complete before it exits, and both jobs come from one
consistent list request, so that can't happen; answered in the thread.
Bumping the default taskmaster image to a version with
feat(taskmaster): go on after ignored errors tesk-core#143 needs a tesk-core release; that belongs
to the release prep (build: prepare the 1.3.0 release #155), not this PR. Until then, an ignored failure
of a task's last executor with outputs ends
SYSTEM_ERROR, and of anearlier executor ends
SYSTEM_ERRORbecause later executors aremissing; the upgrading notes say so.
The quality review suggested parameterizing a converter test; the class
is JUnit 4, so it got an assertion message instead.
Open questions
None. Note for deployment:
ignore_erroronly works once a tesk-corerelease with #143 is deployed (
TESK_API_TASKMASTER_IMAGE_VERSION) or thedefault image is bumped.
🤖 Generated with Claude Code
Summary by Sourcery
Support TES 1.1 executor error ignoring while preserving correct task states when failures prevent execution or output delivery.
New Features:
executors[].ignore_error: trueand propagate it to executor jobs.Bug Fixes:
ignore_erroris set.Enhancements:
Documentation:
ignore_errorbehavior, state-resolution rules, TES 1.1 differences, and taskmaster upgrade requirements.Tests:
ignore_errorrequests, job annotations, state transitions, deadline failures, missing executors, and outputs-filer requirements.