Skip to content

docs(interfaces): clarify that attempts is 1-indexed during a run - #620

Merged
benjie merged 1 commit into
graphile:mainfrom
okko:doc-interface-attempts
Aug 6, 2026
Merged

docs(interfaces): clarify that attempts is 1-indexed during a run#620
benjie merged 1 commit into
graphile:mainfrom
okko:doc-interface-attempts

Conversation

@okko

@okko okko commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

attempts is incremented when a job is locked for execution, so a running handler sees attempts === 1 on the first run and attempts === max_attempts on the final run. The previous wording ("How many times it has been attempted") is easy to misread as "prior failures", which leads to off-by-one final-attempt checks. Spell out the semantics on attempts and refine the related last_error comment, which read as inaccurate for the first in-flight attempt.

Description

Performance impact

Security impact

Checklist

  • My code matches the project's code style and yarn lint:fix passes.
  • I've added tests for the new feature, and yarn test passes.
  • I have detailed the new feature in the relevant documentation.
  • I have added this feature to 'Pending' in the RELEASE_NOTES.md file (if one exists).
  • If this is a breaking change I've explained why.

`attempts` is incremented when a job is locked for execution, so a
running handler sees `attempts === 1` on the first run and
`attempts === max_attempts` on the final run. The previous wording
("How many times it has been attempted") is easy to misread as "prior
failures", which leads to off-by-one final-attempt checks. Spell out
the semantics on `attempts` and refine the related `last_error`
comment, which read as inaccurate for the first in-flight attempt.

@benjie benjie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@benjie
benjie merged commit cea9d60 into graphile:main Aug 6, 2026
9 checks passed
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