Skip to content

fix: add docstring to defineConfig for maxComputeSeconds PR#6

Open
deepshekhardas wants to merge 9 commits into
mainfrom
fix/pr-3533-maxcompute
Open

fix: add docstring to defineConfig for maxComputeSeconds PR#6
deepshekhardas wants to merge 9 commits into
mainfrom
fix/pr-3533-maxcompute

Conversation

@deepshekhardas

@deepshekhardas deepshekhardas commented May 12, 2026

Copy link
Copy Markdown
Owner

Adds JSDoc documentation to the defineConfig function to improve docstring coverage to meet the 80% threshold required by CI.


Summary by cubic

Adds JSDoc to defineConfig and introduces maxComputeSeconds as a clearer replacement for maxDuration across config, tasks, and trigger options. Keeps backward compatible behavior and satisfies CI docstring coverage.

  • Migration

    • Use maxComputeSeconds in defineConfig, task definitions, and trigger options.
    • maxDuration is JSDoc-deprecated but still accepted; if both are set, maxComputeSeconds wins.
    • Init templates are updated to the new name. No runtime behavior change.
  • Bug Fixes

    • Dev workers now exit cleanly when the CLI disconnects, preventing 100% CPU spin.
    • Attempts fail fast on uncaughtException instead of drifting to max duration, respecting normal retry policy.

Written for commit f89e3de. Summary will update on new commits.

matt-aitken and others added 9 commits May 8, 2026 17:10
- defineConfig: resolves maxComputeSeconds ?? maxDuration into maxDuration
- new resolveMaxComputeSeconds helper for shared.ts
- task definitions, trigger and batchTrigger options funnel through helper

Internal references to maxDuration (run engine, queues, DB) are unchanged.
…sting

- trigger.config.ts: top-level maxComputeSeconds
- example.ts: per-task maxComputeSeconds on maxDurationTask
- example.ts: per-trigger override on triggerAndWait

Variable name maxDurationTask kept since it labels the legacy fixture concept;
the payload.maxDuration field is unrelated to the SDK property and untouched.
If a user exports a trigger.config plain object without going through
defineConfig() (TypeScript allows it), validation previously rejected
the new maxComputeSeconds field with an error mentioning maxDuration.

Mirror the SDK boundary's resolution at the CLI boundary so downstream
internals (which still read maxDuration) keep working.
Adds JSDoc to defineConfig function to improve docstring coverage.
id: release
uses: softprops/action-gh-release@v1
if: github.event_name == 'push'
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
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.

3 participants