Skip to content

feat: added isRetry in context.run#177

Merged
ericallam merged 2 commits intotriggerdotdev:mainfrom
akhill10:feat/isRetry-on-context-run
Jul 17, 2023
Merged

feat: added isRetry in context.run#177
ericallam merged 2 commits intotriggerdotdev:mainfrom
akhill10:feat/isRetry-on-context-run

Conversation

@akhill10
Copy link
Copy Markdown
Contributor

fixes #154

  • Added isRetry in context.run object
  • Added migration for isRetry column for EventRecord and JobRun tables
  • Setting isRetry as true when it is reRunService.call() is executed

/claim #154

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jul 15, 2023

🦋 Changeset detected

Latest commit: 0066971

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@trigger.dev/sdk Patch
nextjs-12 Patch
@examples/nextjs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Member

@ericallam ericallam left a comment

Choose a reason for hiding this comment

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

I probably needed to be more clear in this issue as this isRetry boolean should only be set when the "Retry job run" button is pressed which runs the ContinueRunService service, not the "Run again" button which calls the ReRunService. I actually think this means that isRetry shouldn't be on the JobRun or EventRecord tables, but instead on the JobRunExecution table is isRetry set to true here:

retryLimit: EXECUTE_JOB_RETRY_LIMIT,

And then using the isRetry from the JobRunExecution record here to set context of the run:

@akhill10 akhill10 force-pushed the feat/isRetry-on-context-run branch from 5c46714 to c417a7f Compare July 16, 2023 07:19
@ericallam
Copy link
Copy Markdown
Member

Can you add a changeset for a "patch" update to the @trigger.dev/sdk package and include it in this PR? Everything else looks good to go!

@ericallam ericallam merged commit f5c819a into triggerdotdev:main Jul 17, 2023
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.

[TRI-644] On a Run retry add info to context.run

2 participants