Repository navigation
feat: default page_size to 256 as TES specifies - #158
Conversation
The listing section of docs/api.md kept the conflict markers of a merge of dev into the branch of #151. Keep the side that matches the merged behaviour: TESK API reports CANCELING and PREEMPTED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GET /tasks without page_size, or with an empty one, read all taskmaster jobs in one page. TES (1.0 and 1.1) says page_size defaults to 256, so the controller now passes 256 to Kubernetes when it is left out. Also list the remaining differences from TES 1.1 in the API docs. Refs #137 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewer's GuideAPIMake an omitted or empty
DocumentationExplain the new default and pagination behavior, resolve the listing-state conflict, document remaining TES 1.1 differences, and note the upgrade impact.
TestsUpdate Kubernetes list stubs to expect the default limit and verify that an omitted
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 #158 +/- ##
=======================================
Coverage 75.01% 75.02%
=======================================
Files 71 71
Lines 3266 3267 +1
Branches 384 385 +1
=======================================
+ Hits 2450 2451 +1
Misses 663 663
Partials 153 153 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Linked issuesChecked at commit ffd2957 #137 feat: support TES 1.1 · 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="docs/api.md" line_range="134-137" />
<code_context>
+TESK API implements TES 1.1 with these differences, which clients should
+know about:
+
+- `executors[].ignore_error: true` is refused with `400 Bad Request` (see
+ [TES 1.1 fields](#tes-11-fields);
+ [#159](https://github.com/elixir-cloud-aai/tesk-api/issues/159) is about
+ supporting it).
+- `resources.preemptible` and `resources.zones` are accepted and returned,
+ but have no effect on where the task runs, as TES allows.
</code_context>
<issue_to_address>
**Support ignore_error true**
TESK still refuses `executors[].ignore_error: true` with `400 Bad Request`; this change documents the limitation and refers to #159, but does not close it.
</issue_to_address>
### Comment 2
<location path="docs/api.md" line_range="147-150" />
<code_context>
+- In executor logs, `exit_code` is left out until the executor's container
+ has terminated, and `stdout` holds both output streams of the executor,
+ while `stderr` is left out (see [Executor logs](#executor-logs)).
+- `logs[].outputs` is always empty (see [Output file
+ logs](#output-file-logs);
+ [#160](https://github.com/elixir-cloud-aai/tesk-api/issues/160) is about
+ reporting them).
+- TESK API sends no CORS headers. To use it from web pages of other origins,
+ as TES asks of such implementations, configure CORS where you expose it,
</code_context>
<issue_to_address>
**Report output logs**
`logs[].outputs` remains empty; this change documents the limitation and refers to #160, but does not close it.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: docs/api.md:137, docs/api.md:150
Summary
Closes the last TES 1.1 gap that TESK API can close on its own, and documents the ones that remain:
GET /taskswithoutpage_size(or with an empty one) now returns at most 256 tasks per page, the default that TES gives. Before, it read all taskmaster jobs at once. Explicit values (1 to 2048) are unchanged.docs/upgrading.md: upgrade note for the new default.docs/api.md: removes merge conflict markers that were left in "Listing tasks" (they are ondevnow) and adds a "Differences from TES 1.1" section.Tests: a new unit test for the default (left out and empty), the integration-test stubs of the taskmaster list now expect
limit=256, andNoAuthIT.getListchecks thelimitquery parameter.Closes #137
Gap list (TES 1.1 OpenAPI at tag
v1.1vs.dev7c86a4a and #155)The remaining gaps are tracked in #159 and #160. With this PR, TESK API reports TES 1.1.0 and documents every difference, so #137 can close.
Verification
./mvnw -B spotless:check checkstyle:check clean verify(Temurin 8): BUILD SUCCESS, all unit tests and 99 integration tests pass, coverage checks met. Before the fix, the new unit test failed and 12 list integration tests got 500 (stubs withoutlimit), as expected.mkdocs build --strict: passes.Declined review findings
page_size=%20(whitespace only) gives 400, whilepage_size=gives the default. Declined: cosmetic. Whitespace is not a number, and the docs only promise the default for an empty value.index.md. Declined: the section is a summary that links to the detailed sections, andindex.mdhas no per-section index ofapi.md.page_sizeis passed through. Declined:listTasks_validPageSizealready checkseq(pageSize)for 1 and 2048.Open questions
None. The upgrade note for the page_size default is in
docs/upgrading.md("To the next release"); if #155 merges first, whoever merges second resolves the conflict there.🤖 Generated with Claude Code
Summary by Sourcery
Align task listing pagination with the TES 1.1 default while documenting compatibility differences and upgrade impact.
New Features:
GET /taskspagination to 256 tasks whenpage_sizeis omitted or empty, matching TES 1.1 behavior.Enhancements:
Documentation:
Tests: