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

V3 #294

Merged
merged 190 commits into from
Oct 4, 2023
Merged

V3 #294

merged 190 commits into from
Oct 4, 2023

Conversation

jpwilliams
Copy link
Member

@jpwilliams jpwilliams commented Aug 14, 2023

Summary

Checklist

  • Added a docs PR that references this PR
  • Added unit/integration tests
  • Added changesets if applicable

Related

@jpwilliams jpwilliams changed the title Refactor V3 Sep 29, 2023
jpwilliams and others added 15 commits October 2, 2023 13:36
## Summary
<!-- Succinctly describe your change, providing context, what you've
changed, and why. -->

Adds backwards compatibility for in-progress `v2.x.x` runs for `v3.x.x`
SDKs.

- [x] Adding `x-inngest-req-version` header appropriately from response
- [x] `v0.test.ts`
- [ ] ~~Lazily importing backwards compatibility~~ N/A Tiny foot-print;
can optionally add later

## Checklist
<!-- Tick these items off as you progress. -->
<!-- If an item isn't applicable, ideally please strikeout the item by
wrapping it in "~~"" and suffix it with "N/A My reason for skipping
this." -->
<!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" -->

- [ ] ~~Added a [docs PR](https://github.com/inngest/website) that
references this PR~~ N/A
- [x] Added unit/integration tests
- [ ] ~~Added changesets if applicable~~ N/A

## Related
<!-- A space for any related links, issues, or PRs. -->
<!-- Linear issues are autolinked. -->
<!-- e.g. - INN-123 -->
<!-- GitHub issues/PRs can be linked using shorthand. -->
<!-- e.g. "- inngest/inngest#123" -->
<!-- Feel free to remove this section if there are no applicable related
links.-->
- #294
@jpwilliams jpwilliams marked this pull request as ready for review October 4, 2023 17:41
Copy link
Contributor

@tonyhb tonyhb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work my friend.

@jpwilliams jpwilliams merged commit f2f4856 into main Oct 4, 2023
21 of 23 checks passed
@jpwilliams jpwilliams deleted the v3-refactor branch October 4, 2023 22:23
jpwilliams pushed a commit that referenced this pull request Oct 4, 2023
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## inngest@3.0.0

### Major Changes

- [#294](#294)
[`f2f4856`](f2f4856)
Thanks [@jpwilliams](https://github.com/jpwilliams)! - Clients and
functions now require IDs

When instantiating a client using `new Inngest()` or creating a function
via `inngest.createFunction()`, it's now required to pass an `id`
instead of a `name`.

Previously only `name` was required, but this implied that the value was
safe to change. Internally, we used this name to _produce_ an ID which
was used during deployments and executions.

See the [v3 migration
guide](https://www.inngest.com/docs/sdk/migration).

- [#294](#294)
[`f2f4856`](f2f4856)
Thanks [@jpwilliams](https://github.com/jpwilliams)! - Refactored
available environment variables and configuration

The arrangement of environment variables available has shifted a lot
over the course of v2, so in v3 we've streamlined what's available and
how they're used.

See the [v3 migration
guide](https://www.inngest.com/docs/sdk/migration).

- [#294](#294)
[`f2f4856`](f2f4856)
Thanks [@jpwilliams](https://github.com/jpwilliams)! - In v2, providing
a `fns` option when creating a function -- an object of functions --
would wrap those passed functions in `step.run()`, meaning you can run
code inside your function without the `step.run()` boilerplate.

This wasn't a very well advertised feature and had some drawbacks, so
we're instead replacing it with some optional middleware.

See the [v3 migration
guide](https://www.inngest.com/docs/sdk/migration).

- [#294](#294)
[`f2f4856`](f2f4856)
Thanks [@jpwilliams](https://github.com/jpwilliams)! - Serving functions
could become a bit unwieldy with the format we had, so we've slightly
altered how you serve your functions to ensure proper discoverability of
options and aid in readability when revisiting the code.

See the [v3 migration
guide](https://www.inngest.com/docs/sdk/migration).

- [#294](#294)
[`f2f4856`](f2f4856)
Thanks [@jpwilliams](https://github.com/jpwilliams)! - Shorthand
function creation removed

`inngest.createFunction()` can no longer take a string as the first or
second arguments; an object is now required to aid in the
discoverability of options and configuration.

See the [v3 migration
guide](https://www.inngest.com/docs/sdk/migration).

- [#294](#294)
[`f2f4856`](f2f4856)
Thanks [@jpwilliams](https://github.com/jpwilliams)! - All steps require
IDs

When using any step.\* tool, an ID is now required to ensure that
determinism across changes to a function is easier to reason about for
the user and the underlying engine.

The addition of these IDs allows you to deploy hotfixes and logic
changes to long-running functions without fear of errors, failures, or
panics. Beforehand, any changes to a function resulted in an
irrecoverable error if step definitions changed. With this, changes to a
function are smartly applied by default.

See the [v3 migration
guide](https://www.inngest.com/docs/sdk/migration).

### Patch Changes

- [#333](#333)
[`67bda66`](67bda66)
Thanks [@goodoldneon](https://github.com/goodoldneon)! - (Internal) Fix
missing name on `NonRetriableError`, ensuring it's correctly
(de)serialized

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prerelease/inngest Create snapshot releases for a PR for the "inngest" package.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants