From 563ce73b664963122fe9ddd81f8ed1f1435d6c69 Mon Sep 17 00:00:00 2001 From: Darwin D Wu Date: Fri, 24 May 2024 01:42:10 -0700 Subject: [PATCH 1/2] chore: replace nix shell with flake --- .envrc | 2 +- flake.lock | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 31 +++++++++++++++++++++++++++ shell.nix | 19 ----------------- 4 files changed, 93 insertions(+), 20 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix delete mode 100644 shell.nix diff --git a/.envrc b/.envrc index 1d953f4..3550a30 100644 --- a/.envrc +++ b/.envrc @@ -1 +1 @@ -use nix +use flake diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..9ee7609 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1716330097, + "narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..846e075 --- /dev/null +++ b/flake.nix @@ -0,0 +1,31 @@ +{ + description = "Elixir SDK for Inngest"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + let pkgs = import nixpkgs { inherit system; }; + in { + devShells.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + elixir + erlang_27 + + # LSPs + elixir-ls + lexical + erlang-ls + + # Tools + yamllint + shfmt + shellcheck + git-cliff + ]; + }; + }); +} diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 1cb71a5..0000000 --- a/shell.nix +++ /dev/null @@ -1,19 +0,0 @@ -let pkgs = import { }; - -in pkgs.mkShell { - nativeBuildInputs = [ - # Elixir - pkgs.elixir - pkgs.erlang - - # LSPs - pkgs.elixir-ls - pkgs.erlang-ls - - # Tools - pkgs.yamllint - pkgs.shfmt - pkgs.shellcheck - pkgs.git-cliff - ]; -} From 1a040aee3aee30243a977dcc035a735e80c58a87 Mon Sep 17 00:00:00 2001 From: Darwin D Wu Date: Fri, 24 May 2024 01:42:32 -0700 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ecdd42..9482c7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,52 +2,144 @@ All notable changes to this project will be documented in this file. +## [unreleased] + +### Miscellaneous Tasks + +- Chore: replace nix shell with flake + ## [0.2.1] - 2024-05-15 ### Bug Fixes - Fix: Remove test app from `mod` (#78) +- Resolves #77 +- The `Test.Application` is causing apps that included this library to +- Crash on boot, because it's not compiled as part of the release. +- Remove it so it no longer attempts to boot with +- `Inngest.Test.Application`. +- `v0.2.0` is essentially useless at this point, so it should be yanked +- Once this fix is out. +- Update with some minor changes to make it comply to the latest spec. +- --------- +- Co-authored-by: Darwin D Wu ### Miscellaneous Tasks - Chore: update license to Apache2 (#76) +- Consistency with other SDKs. +- --------- +- Co-authored-by: Darwin D Wu ## [0.2.0] - 2023-12-04 ### Bug Fixes - Fix: add additional restrictions when using batching (#72) +- Cancellation and rate limit can't be used with event batching, so make +- Sure to add those validation as well. +- --------- +- Co-authored-by: Darwin D Wu ### Documentation - Docs: Update docs to prepare for 0.2 release (#62) +- * Update docs preparing for 0.2 release. +- * Add conventional commit checks for PRs. +- --------- +- Co-authored-by: Darwin D Wu ### Features - Feat: add event batching to function configuration +- * simplify client config +- * add event batching +- * add config template as comments +- * update docs +- * update docs and references +- --------- +- Co-authored-by: Darwin D Wu - Feat: Change approach for SDK (#59) +- Resolves #58 +- Change the execution model to match the other SDKs. +- The current attempt is not flexible at all. +- Also update it to follow TS SDK v3 convention. +- - execute function +- - step run +- - step sleep +- - step sleep_until +- - step wait_for_event +- - step send_event - Feat: Add general retry handling and non retriable error (#63) +- Adds +- * NonRetriableError +- * RetryAfterError +- For better control of retries on failures +- Also refactor invoke to make it easier to reason with. +- --------- +- Co-authored-by: Darwin D Wu - Feat: Add failure handler (#64) +- Clean up some useless code and provide a way to call user provided +- Failure handler +- --------- +- Co-authored-by: Darwin D Wu - Feat: debounce support (#65) +- Co-authored-by: Darwin D Wu - Feat: support batching (#66) +- Can't add tests now since batching is a cloud only feature at the +- Moment. +- Will need to come back and add it once extracted out into OSS +- --------- +- Co-authored-by: Darwin D Wu - Feat: rate limit support (#67) +- Co-authored-by: Darwin D Wu - Feat: concurrency support (#68) +- Resolves #22 +- --------- +- Co-authored-by: Darwin D Wu - Feat: idempotency support (#69) +- Co-authored-by: Darwin D Wu - Feat: cancel on support (#70) +- Co-authored-by: Darwin D Wu - Feat: priority support (#71) +- Co-authored-by: Darwin D Wu ### Miscellaneous Tasks - Chore: update ci.yml - Chore: Clean up (#60) +- * remove enum file and previous handler +- * remove unused code and comment +- * update comments +- * move test cases into test directory +- * Move dev plug router under supervision tree +- * load inngest dev server as supervised genserver +- --------- +- Co-authored-by: Darwin D Wu - Chore: Integration tests (#61) +- - [x] no step function +- - [x] step run function +- - [x] step sleep function +- - [x] step sleep_until function +- - [x] step wait_for_event function +- - [x] fulfill +- - [x] timeout +- - [x] step send_event function +- --------- +- Co-authored-by: Darwin D Wu - Chore: update hashing method for steps (#75) +- Co-authored-by: Darwin D Wu ## [0.1.9] - 2023-08-01 ### Bug Fixes - Fix: make sure to read existing queries (#55) +- * fix: make sure parsing works correctly for cache body reader +- * update changelog +- * update version +- --------- +- Co-authored-by: Darwin D Wu ## [0.1.8] - 2023-07-31 @@ -83,12 +175,19 @@ All notable changes to this project will be documented in this file. ### Miscellaneous Tasks - Chore: Fix release workflow with proper escapes (#49) +- Co-authored-by: Darwin D Wu ## [0.1.3] - 2023-07-27 ### Bug Fixes - Fix compile errors due to parallel compilation conflicts (#45) +- When attempting to compile files from the given path, the lib will fail +- To compile due to compilation race conditions. +- Change module loading to loading into AST, and extracting from there +- Instead. +- --------- +- Co-authored-by: Darwin D Wu ## [0.1.2] - 2023-07-27