Do not check for interactive session to shut down dev server #8845
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #8688
As discussed in #8868, Docker sessions shut down the dev server before it gets a chance to use it because Docker appears to be "interactive" and then closes
stdin
immediately. The workarounds were to setCI=true
(which worked in some cases but not others) or to configure the Docker container to maintain an open TTY.This shouldn't be necessary and is affecting both CI deployments and other environments.
The problem is a change in #7203, which intended to close the development server when
stdin
closed because otherwise it was left hanging open. That now is closing prematurely in cases where it's used in Docker.During development of #7203, the check for an interactive session was added to fix it crashing in CRA's CI. However that didn't resolve the issue for some uses of Phoenix development watcher, which was fixed by checking that the CI environment variable is not set. The latter check should resolve the issue for CRA CI by itself — most CI systems set that variable.
While I couldn't figure out how to test a branch as an installed module (because of the monorepo nature), I did test this by hacking my Circle CI configuration to apply the patch and verified that resolved the CI issue for me:
I'm opening this PR in the hopes that it runs the CRA CI and will verify if this does not introduce a CI crash.