job list: opt into the paginated ListJobs response - #360
Draft
davixcky wants to merge 4 commits into
Draft
Conversation
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>
2 tasks
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ListJobsnow returns a{items, nextCursor, hasMore, totalCount, totalPages}envelope when the caller opts in (signadot/signadot#7328). This sendssignadot-api-opt-in: paginationand readsresp.Payload.Itemsinstead ofresp.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 yamloutput 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.SignadotAPIOptInandListJobsOK.Payload(now*models.ListJobsResponse) don't exist in the currently-pinnedv0.3.8.go.modisn'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
replacedirective, not committed) + a live host-run apiserver + seeded MySQL:job listtable view,job list --all,job list -o json,job list -o yamlall work and match pre-change output shapeWriteToRequestthatsignadot-api-opt-inis sent as a header (not a query param)github.com/signadot/go-sdkto the tagged version once Regenerate client for Jobs pagination + accumulated changes go-sdk#92 merges, un-draft🤖 Generated with Claude Code