Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !8845

Do not check for interactive session to shut down dev server

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/keylimetoolbox/stdin-tty into master Apr 16, 2020
  • Overview 8
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: jeremywadsack

Fixes #8688 (closed)

As discussed in #8868 (closed), 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 set CI=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:

sed -i '/process.env.CI/ s/isInteractive [|]*//' node_modules/react-scripts/scripts/start.js

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.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/keylimetoolbox/stdin-tty