Skip to content

PLAT-1314/feat: expose per-request retry limits in twoctl - #6

Merged
brtkwr merged 1 commit into
mainfrom
bkunwar/plat-1314-max-retries
Oct 30, 2026
Merged

brtkwr merged 1 commit into
mainfrom
bkunwar/plat-1314-max-retries

Conversation

@brtkwr

@brtkwr brtkwr commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Context

twoctl always retries transient API failures three times. Scripts cannot opt out or choose a smaller retry count, despite the retry controls in PLAT-1314.

Changes

  • Add --max-retries N to API operations, including each request made by --all.
  • Make --max-retries 0 send one attempt, preserve three retries by default, and reject negative counts before sending a request.
  • Document the behavior and add HTTP-level regressions for ordinary calls, pagination, defaults, and invalid input.

Scope / Non-goals

This implements the retry-count control from the incremental PLAT-1314 checklist. The retry budget flag and other checklist items remain separate work. Existing request timeout, backoff, and idempotency semantics are preserved.

Validation

On head e15f8cec57c503807c8907b67bceb2c5f11f5715, CI run 40853289965 passed both jobs:

  • build: go build ./... and make test-cover passed, including all unit tests; total coverage 80.4% exceeds the 80% gate.
  • lint: ./scripts/lint.sh passed (formatting, vet, ineffassign, misspell, complexity, golint).
  • No tests run locally, as requested. Local formatting and git diff --check passed.

Ticket

Refs PLAT-1314.

✨ via Codex session

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T09:55:55.316568Z e15f8ce PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Puvendhan Puvendhan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. --max-retries is applied to ordinary and paginated requests through one client builder. Negative values return a usage error. DisableRetries makes 0 mean a single attempt instead of falling back to the default. #8 also touches root.go and operations.go, so the second one to merge will need a rebase.

@brtkwr
brtkwr merged commit 8a3ba6e into main Oct 30, 2026
2 checks passed
@brtkwr
brtkwr deleted the bkunwar/plat-1314-max-retries branch October 30, 2026 12:12
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.

2 participants