Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TRI-1996] A failed run isn't resuming properly from the UI #912

Open
matt-aitken opened this issue Feb 26, 2024 · 0 comments
Open

[TRI-1996] A failed run isn't resuming properly from the UI #912

matt-aitken opened this issue Feb 26, 2024 · 0 comments

Comments

@matt-aitken
Copy link
Member

matt-aitken commented Feb 26, 2024

When you "Rerun" job from the UI you get given two options IF the run has failed.

CleanShot 2024-02-26 at 11 17 26@2x

"Run again" works as designed, it creates a new run with the same payload.

But "Retry Job run" should continue the run and retry failed tasks.

To reproduce

  1. Run this job, it will fail where the error is thrown.
client.defineJob({
  id: "test",
  name: "test error handling",
  version: "0.0.1",
  trigger: eventTrigger({
    name: "test.event",
  }),
  run: async (payload, io, ctx) => {
    const result = await io.runTask("todo", async (client) => {
      throw new Error("I'm broken");
      await io.logger.info("I fixed it");
    });

    await io.logger.info("Afterwards");
  },
});
  1. Modify the code by commenting out the thrown error.
  2. Press the "Retry Job run" button in the UI.
  3. Notice that the run fails again with the error cached.

What might be happening?

  • Check that errors are not being cached in runTask. Only successful results should be.
  • Check that the ContinueRunService is working correctly.

TRI-1996

@matt-aitken matt-aitken changed the title A failed run isn't resuming properly from the UI [TRI-1996] A failed run isn't resuming properly from the UI Feb 26, 2024
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

No branches or pull requests

1 participant