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

[BUG] Inngest SDK causes Docker container to exit unexpectedly when registering with Inngest dev server #259

Open
MarkMurphy opened this issue Jul 12, 2023 · 0 comments
Labels
Bug Something isn't working 📦 inngest Affects the `inngest` package

Comments

@MarkMurphy
Copy link

MarkMurphy commented Jul 12, 2023

This is a strange one which I think boils down to the default fetch implementation used by the SDK and possibly the native node implementation as it somehow relates to Docker 🤷‍♂️? (pure speculation here)

I encountered an issue where the Inngest SDK seemed to cause my Docker container to unexpectedly exit without any additional output. This occurred while attempting to register with the Inngest CLI development server, which is running separately on my host machine.

This problem specifically arises in Docker Desktop for Mac versions 4.19.0 and above. Interestingly, it does not occur in version 4.18.0.

When running the server directly from the host machine, outside of a Docker container, there is no problem.

Upon conducting some initial debugging, it appears that the issue is related to the default fetch implementation used by the SDK. However, when I supplied the fetch implementation from the node-fetch package, the problem was resolved. Curiously, during my debugging process, the behavior was not consistently reproducible. While stepping through the SDK's code, the unexpected container exit did not always occur, and the API would sometimes receive a successful response from the register endpoint.

I've created a sample repo which reproduces the issue. The README has everything you should need.

I have kept the line in the src/server.ts file that passes a different fetch implementation. You are welcome to uncomment it to observe the differences described above.

  • Inngest SDK: v2.1.0
  • Node: v18.16.1
  • MacOS: v12.6.8
  • Docker Desktop for Mac (with intel chip): v4.19.0+
  • Docker Engine: v23.0.5
  • Docker Settings (Resources)
    • CPUs: 4
    • Memory: 8 GB
    • Swap: 1 GB
    • Virtual disk limit: 64 GB

EDIT

I'm not sure this is actually an Inngest SDK issue but it may be of concern if it affects enough developers looking to use Inngest who also may run into this. My thought it is that it might be worth confirming and potentially mitigating either though documentation or by changing the default fetch implementation (or both).

@MarkMurphy MarkMurphy added the Bug Something isn't working label Jul 12, 2023
@MarkMurphy MarkMurphy changed the title [BUG] Inngest SDK causes Docker container to exit unexpectedly when registering with Inngest CLI dev server [BUG] Inngest SDK causes Docker container to exit unexpectedly when registering with Inngest dev server Jul 12, 2023
@jpwilliams jpwilliams added the 📦 inngest Affects the `inngest` package label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working 📦 inngest Affects the `inngest` package
Projects
None yet
Development

No branches or pull requests

2 participants