Has There Been a Change in the Replay of Action Steps Leading to Duplicate Records in Airtable?

This topic was automatically generated from Slack. You can find the original thread here.

Was there a regression in how action steps are replayed? Previously it would only replay the action steps AFTER the last successful step. Now I am seeing it replay the entire workflow I believe. I’m noticing this becuase I have Airtable create record workflows that are now frequently creating duplicate records within several minutes of each other. I believe this is due to them throwing errors and having to replay.

Replay has always replayed the entire worflow.

I’ve been waiting for the ability to replay since a specific/failed step since forever.

I don’t believe so based on a conversation I had with @UMT4G7E5P about a year ago –

Dylan Sather (Pipedream) [6:32 PM]
yes are you not implementing auto-retry already on those workflows? That is our recommended solution in this case

Mike Mauer [6:32 PM]
An auto-retry on the call, not the workflow.

Dylan Sather (Pipedream) [6:33 PM]
since the error occurs in your workflow, this isn’t something we can do programmatically since you’re the author of the workflow. If you turn on auto-retry, we’ll retry the failed step (the Airtable call in this case)

Dylan Sather (Pipedream) [6:33 PM]
if that continues to fail, we’ll retry again, up to 8 times over 10 hours. If it succeeds, we’ll move to the next step of the workflow

Mike Mauer [6:34 PM]
I udnerstand that, but the entire workflow replays and all of the action steps within it

Mike Mauer [6:34 PM]
Am I wrong?

Dylan Sather (Pipedream) [6:35 PM]
if you have a 5 step workflow, and steps 1 and 2 succeed, step 3 (Airtable) fails. Auto-retry starts at step 3, since we know steps 1 and 2 succeeded

Mike Mauer [6:36 PM]
can I DM you? Or happy to keep this public if you think it might help others but I don’t believe I’ve experienced that.

Mike Mauer [6:37 PM]
Maybe I’m wrong (I’d love to be in this case!) but when I tried, I believe if:
Step 1 was “Create Airtable records”
Step 2 was “Select other records”

If Step 2 failed, then on a auto-retry it woudl re-create the records in Step 1 again

Dylan Sather (Pipedream) [6:38 PM]
I’m running through a test just to make sure there’s not a bug, but this should be the implementation we envisioned

Mike Mauer [6:39 PM]
That would certainly be a good temporary solution. It’s possible I’m wrong. It’s rare, but has been known to happen :smile:

Dylan Sather (Pipedream) [6:43 PM]
yeah I just tested this and saw the behavior I outlined above. if you’d like to try a trivial test of your own, this is what I did:

  1. Create one workflow with an HTTP trigger and deploy that (no additional steps)
  2. Create another workflow.
  3. In step 1, make an HTTP request to endpoint #1. That should succeed.
  4. In step 2, add this code
export default defineComponent({
  async run({ steps, $ }) {
    throw new Error("foo")
  },
})
  1. Enable auto-retry and deploy workflow #2.
  2. Run workflow #2. You’ll see 1 HTTP request, and the execution will fail on step #2 (the Node.js code), auto-retrying.
  3. You can manually trigger the retry by expanding the $attempt object and copying the rerun_url. Triggering that will run the failed step again, but you’ll see that no HTTP request is made again to endpoint #1.

This is different behavior from the replay button in the event inspector in the workflow. Replaying an event will run all steps again — could that have been the issue here?

Dylan Sather (Pipedream) [6:44 PM]
But regardless, for the Airtable issue I think auto-retry will probably work for you. Very likely the first retry on that step will work if the first fails.

Ahhh maybe for auto-retry, yeah.

I’ve never used auto-retry, only this replay feature in the builder (or from the event history).

And in both cases (from the builder or from the event history) it replays the entire workflow.

image.png

• The auto-retry workflow setting should retry the workflow starting at the failed step
• The Replay button in the UI will replay the entire workflow using the selected event