Skip to content

job list: opt into the paginated ListJobs response - #360

Draft
davixcky wants to merge 4 commits into
mainfrom
eng-1161-jobs-pagination
Draft

job list: opt into the paginated ListJobs response#360
davixcky wants to merge 4 commits into
mainfrom
eng-1161-jobs-pagination

Conversation

@davixcky

@davixcky davixcky commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

ListJobs now returns a {items, nextCursor, hasMore, totalCount, totalPages} envelope when the caller opts in (signadot/signadot#7328). This sends signadot-api-opt-in: pagination and reads resp.Payload.Items instead of resp.Payload.

Final header design (settled after a couple of iterations): a single value, signadot-api-opt-in: pagination — not a list, not a dated version. WithSignadotAPIOptIn(*string).

The CLI's own -o json/-o yaml output is unchanged — still a plain job array — only the wire format between the CLI and the server changed.

Blocked on signadot/go-sdk#92 (regenerated client) merging and getting tagged, since ListJobsParams.SignadotAPIOptIn and ListJobsOK.Payload (now *models.ListJobsResponse) don't exist in the currently-pinned v0.3.8. go.mod isn't bumped in this PR — that's a one-line follow-up once go-sdk ships a new tag. Marked as a draft for that reason.

Test plan

  • Verified locally against the regenerated go-sdk branch (temporary replace directive, not committed) + a live host-run apiserver + seeded MySQL: job list table view, job list --all, job list -o json, job list -o yaml all work and match pre-change output shape
  • Confirmed via generated WriteToRequest that signadot-api-opt-in is sent as a header (not a query param)
  • Bump github.com/signadot/go-sdk to the tagged version once Regenerate client for Jobs pagination + accumulated changes go-sdk#92 merges, un-draft

🤖 Generated with Claude Code

davixcky and others added 3 commits August 13, 2026 13:29
Sends signadot-api-opt-in: jobs-pagination and reads resp.Payload.Items
instead of resp.Payload, matching ListJobs' new envelope response
(signadot/signadot#7328). The CLI's own -o json/-o yaml output is
unchanged (still a plain job array) — only the wire format from the
server changed.

Blocked on signadot/go-sdk#92 merging + a new tag; go.mod isn't bumped
here since that PR isn't released yet. Verified locally against the
regenerated go-sdk branch and a live apiserver: table view, --all,
-o json, and -o yaml all confirmed working, and the request carries
the signadot-api-opt-in header (not resp.Payload.Items unmarshal
guesswork).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
signadot-api-opt-in is now declared as an array header (go-sdk#92),
so WithSignadotAPIOptIn takes []string instead of *string.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Mirrors signadot/signadot#7328's pivot from a flag-list header to a
single dated version (Stripe/GitHub style). Pins to 2026-08-18, the
version at which ListJobs pagination became available.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Slack thread landed on keeping the original header name, single value
only (no version, no list) — see signadot/signadot#7328.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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