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

Add step name or ID when there’s a NESTING_STEPS error #549

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/three-shoes-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"inngest": patch
---

Add step name or ID when there’s a NESTING_STEPS error
8 changes: 4 additions & 4 deletions packages/inngest/src/components/execution/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,9 @@
}): Promise<unknown> => {
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
Expand All @@ -765,7 +768,7 @@
*/
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}\``,

Check warning on line 771 in packages/inngest/src/components/execution/v1.ts

View workflow job for this annotation

GitHub Actions / inngest: Lint

Replace `opId.displayName·??·opId.id}\``,·` with `⏎··············opId.displayName·??·opId.id⏎············}\``,`
consequences: "Nesting `step.*` tooling is not supported.",
type: "warn",
reassurance:
Expand All @@ -778,9 +781,6 @@
);
}

const stepOptions = getStepOptions(args[0]);
const opId = matchOp(stepOptions, ...args.slice(1));

if (this.state.steps[opId.id]) {
const originalId = opId.id;
maybeWarnOfParallelIndexing(originalId);
Expand Down
Loading