From 1faf58731316e8175bf80faa6a0260bdb1f2712b Mon Sep 17 00:00:00 2001 From: Makara Sok Date: Sat, 20 Apr 2024 10:05:12 -0400 Subject: [PATCH 1/2] =?UTF-8?q?Add=20step=20name=20or=20ID=20when=20there?= =?UTF-8?q?=E2=80=99s=20a=20NESTING=5FSTEPS=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Makara Sok --- packages/inngest/src/components/execution/v1.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/inngest/src/components/execution/v1.ts b/packages/inngest/src/components/execution/v1.ts index 3c4430691..aba4d28fe 100644 --- a/packages/inngest/src/components/execution/v1.ts +++ b/packages/inngest/src/components/execution/v1.ts @@ -749,6 +749,9 @@ class V1InngestExecution extends InngestExecution implements IInngestExecution { }): Promise => { await beforeExecHooksPromise; + const stepOptions = getStepOptions(args[0]); + const opId = matchOp(stepOptions, ...args.slice(1)); + if (this.state.executingStep) { /** * If a step is found after asynchronous actions during another step's @@ -765,7 +768,7 @@ class V1InngestExecution extends InngestExecution implements IInngestExecution { */ console.warn( prettyError({ - whatHappened: "We detected that you have nested `step.*` tooling.", + whatHappened: `We detected that you have nested \`step.*\` tooling in \`${opId.displayName ?? opId.id}\``, consequences: "Nesting `step.*` tooling is not supported.", type: "warn", reassurance: @@ -778,9 +781,6 @@ class V1InngestExecution extends InngestExecution implements IInngestExecution { ); } - const stepOptions = getStepOptions(args[0]); - const opId = matchOp(stepOptions, ...args.slice(1)); - if (this.state.steps[opId.id]) { const originalId = opId.id; maybeWarnOfParallelIndexing(originalId); From c984869fa63723969c4a02c72ee6ccbc16cd090f Mon Sep 17 00:00:00 2001 From: Jack Williams Date: Tue, 23 Apr 2024 13:04:40 +0100 Subject: [PATCH 2/2] Create three-shoes-shave.md --- .changeset/three-shoes-shave.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/three-shoes-shave.md diff --git a/.changeset/three-shoes-shave.md b/.changeset/three-shoes-shave.md new file mode 100644 index 000000000..dc79ccf49 --- /dev/null +++ b/.changeset/three-shoes-shave.md @@ -0,0 +1,5 @@ +--- +"inngest": patch +--- + +Add step name or ID when there’s a NESTING_STEPS error