Skip to content

cli: use "in 1 day" in deployment create --expiration help examples - #205

Open
CloudCorpRecords wants to merge 1 commit into
convex:mainfrom
CloudCorpRecords:fix/deployment-create-expiration-help-196
Open

CloudCorpRecords wants to merge 1 commit into
convex:mainfrom
CloudCorpRecords:fix/deployment-create-expiration-help-196

Conversation

@CloudCorpRecords

Copy link
Copy Markdown

What the limit is

The Cloud create-deployment API rejects expirations more than 5 days in the future (HTTP 400 InvalidExpiresAt: expiresAt cannot be more than 5 days in the future), as documented in #196.

What changed

The --expiration help example for convex deployment create (and the expiration parse-error message) used "in 7 days" as the relative example, which the API rejects. This PR changes both examples to "in 1 day", comfortably inside the observed five-day maximum, as proposed in the issue.

Files:

  • src/cli/deploymentCreate.ts — --expiration <value> option help text
  • src/cli/lib/expiration.ts — PARSE_ERROR_MESSAGE relative-format example

Help text only; parseExpiration / validateExpiration behavior is unchanged. No client-side validation rule was added, since limits may differ by deployment type or account (per the issue's proposal).

Evidence

  • Reproduced the exact strings in upstream/main: deploymentCreate.ts:81 and expiration.ts:13 both said "in 7 days" before this change.
  • Verified the new branch head's tree SHA matches the locally built tree, and git diff on the two files shows only the example swap.
  • No existing tests assert on these strings (only src/cli/network_test.ts exists under src/cli/, unrelated), so nothing to update.

Honest limits

  • I did not replay the API call or create a Cloud target to re-verify the 5-day ceiling; the limit is taken from the issue's recorded evidence.
  • I could not run the full npm test suite in this environment (integration/e2e coverage lives outside this repo anyway per CONTRIBUTING.md), but this change touches only help strings and cannot affect runtime behavior.

Fixes #196.

The help text for `convex deployment create --expiration` and the
expiration parse-error message both used "in 7 days" as the relative
example, but the Cloud create-deployment API rejects expirations more than
5 days in the future (InvalidExpiresAt, per convex#196).

Use "in 1 day" in both examples so the documented example is directly
usable for the dev-deployment creation flow.

Signed-off-by: Rene Turcios <95189389+CloudCorpRecords@users.noreply.github.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.

deployment create --expiration help example exceeds observed API limit

1 participant