Skip to content

bug: [v4] rebuilding a trigger function and retriggering it does not start a new run (in development) #1956

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

Closed
cachho opened this issue Apr 20, 2025 · 3 comments

Comments

@cachho
Copy link

cachho commented Apr 20, 2025

Provide environment information

System:
OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
Memory: 6.32 GB / 15.59 GB
Container: Yes
Shell: 3.7.1 - /usr/bin/fish
Binaries:
Node: 18.20.8 - ~/.local/share/nvm/v18.20.8/bin/node
npm: 10.8.2 - ~/.local/share/nvm/v18.20.8/bin/npm
pnpm: 8.6.3 - ~/.local/share/pnpm/pnpm

Describe the bug

It looks like the idempotency key is keeping a function cached, even when it's content is updated / rebuilt.

Only tested in dev.

Reproduction repo

not available

To reproduce

  1. execute function (with idempotency key)
  2. log run id
  3. modify function
  4. execute again (with idempotency key)
  5. no new run (id remains the same)

Additional information

Console logs:

[next] 🚀 ~ POST ~ runId: cm9q7lz0r19dw1vom47kbopz7
[next]  POST /api/public/v2/metered/converter/convert-decrypt/task 200 in 1680ms
[trigger] ○ Apr 21, 24:19:14.580 ->  20250420.57 | serialize-and-decrypt-links | run_cm9q7lz0r19dw1vom47kbopz7.1
[trigger] ○ Rebuilding background worker...
[trigger] ○ Background worker ready [node] -> 20250420.58
[next] 🚀 ~ POST ~ runId: cm9q7lz0r19dw1vom47kbopz7
[next]  POST /api/public/v2/metered/converter/convert-decrypt/task 200 in 1458ms
@matt-aitken
Copy link
Member

@cachho can you provide more information on this?

It sounds like it might be operating as designed. If you use the same idempotencyKey, you will get the same run back. Until your idempotencyKeyTTL is hit (if you've set one)

@cachho
Copy link
Author

cachho commented Apr 29, 2025

@cachho can you provide more information on this?

It sounds like it might be operating as designed. If you use the same idempotencyKey, you will get the same run back. Until your idempotencyKeyTTL is hit (if you've set one)

If I make changes to my function in dev (locally) it should be possible to retrigger it. Otherwise, how do I test my changes?

@cachho cachho changed the title bug: [v4] rebuilding a trigger function and retriggering it does not start a new run bug: [v4] rebuilding a trigger function and retriggering it does not start a new run (in development) Apr 29, 2025
@cachho
Copy link
Author

cachho commented Apr 29, 2025

maybe include the version number (20250420.58) in the idempotency key in the background?

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

No branches or pull requests

2 participants