Skip to content

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

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

davixcky wants to merge 5 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 paginated response envelope when the caller opts in. This PR:

  • sends signadot-api-opt-in: pagination through the generated SDK defaults
  • requests the maximum page size and follows every nextCursor
  • keeps the CLI table, JSON, and YAML output as the historical plain job array
  • preserves an empty result as [] rather than null
  • errors on an invalid hasMore response without nextCursor

Dependency

Blocked on signadot/go-sdk#92 merging and being released. The checked-in SDK version does not contain the pagination fields yet, so go.mod will be bumped after release. This PR remains a draft until then.

Test plan

  • helper and Jobs command compile against the pagination-capable SDK branch using a temporary local replace
  • gofmt and git diff --check
  • bump github.com/signadot/go-sdk to the released version

The sandbox-list follow-up is stacked as #367.

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>
davixcky and others added 2 commits August 19, 2026 10:21
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