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

Hashing and automatic indexing for V3 #320

Merged
merged 9 commits into from
Sep 25, 2023
Merged

Conversation

jpwilliams
Copy link
Member

Summary

Adds hashing of step IDs, meaning step IDs passed between the SDK and Inngest are never plain text and of consistent length.

Adds automatic indexing of steps to avoid common uses of step tooling within loops and parallelism. The following example would set the step IDs to A, A:1, and A:2.

const runA = () => step.run("A", () => "result");

await Promise.all([runA(), runA(), runA()]);

Adds a new error code, AUTOMATIC_PARALLEL_INDEXING, which warns if these indexes are added across parallel chains of work, which is harder for the SDK to reason about in V3.

Checklist

  • Added a docs PR that references this PR Part of a larger change
  • Added unit/integration tests
  • Added changesets if applicable N/A Part of a larger change

Related

@jpwilliams jpwilliams requested review from tonyhb and amh4r September 21, 2023 11:22
@jpwilliams jpwilliams self-assigned this Sep 21, 2023
@changeset-bot
Copy link

changeset-bot bot commented Sep 21, 2023

⚠️ No Changeset found

Latest commit: 783dc21

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@jpwilliams jpwilliams merged commit 50c35e5 into v3-refactor Sep 25, 2023
@jpwilliams jpwilliams deleted the v3-hashing-indexing branch September 25, 2023 12:50
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.

1 participant