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

Add dev_server library #173

Merged
merged 12 commits into from
Oct 15, 2024
Merged

Add dev_server library #173

merged 12 commits into from
Oct 15, 2024

Conversation

amh4r
Copy link
Collaborator

@amh4r amh4r commented Oct 14, 2024

Add inngest.experimental.dev_server library, which is used to start and stop a Dev Server during integration testing. It's dogfooded in all of this repo's integration tests.

@amh4r amh4r changed the title Dev server lib Add dev_server library Oct 15, 2024
@amh4r amh4r marked this pull request as ready for review October 15, 2024 02:32
Copy link
Member

@jpwilliams jpwilliams left a comment

Choose a reason for hiding this comment

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

Is it worth including something to clean up the Dev Server process if the parent process is killed?

Experimental so no need now!

Comment on lines +42 to +58
self._process = subprocess.Popen(
[
"npx",
"--yes",
"inngest-cli@latest",
"dev",
"--no-discovery",
"--no-poll",
"--port",
f"{self.port}",
],
bufsize=1,
stderr=subprocess.STDOUT,
stdout=subprocess.PIPE,
text=True,
universal_newlines=True,
)
Copy link
Member

Choose a reason for hiding this comment

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

Might be good to move away from npx for the Python SDK when this comes out of experimental - npm could be an extra tool folks have to install.

Not sure what we've move to, though, outside of managing a /tmp/ version where we install the binary directly.

@amh4r amh4r merged commit 217ceed into main Oct 15, 2024
10 checks passed
@amh4r amh4r deleted the dev_server-lib branch October 15, 2024 21:02
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.

2 participants