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

graceful shutdown #60059

Merged
merged 35 commits into from Jan 16, 2024
Merged

graceful shutdown #60059

merged 35 commits into from Jan 16, 2024

Commits on Dec 30, 2023

  1. fix: gracefully shutdown server

    This reverts commit 771705f, which
    reverted 2c48b87 because it was
    breaking some test cases.
    
    Coming back to this as a starting point to try to fix the tests and add
    new tests for the graceful shutdown feature.
    redbmk committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    5b004f2 View commit details
    Browse the repository at this point in the history
  2. fix: better support for graceful shutdown

    - remove immediate process.exit from `next start`
    - have handleSessionStop wait for the child to exit
    - add a test that verifies long-running api routes are not killed
    - send proper signal (e.g. SIGTERM or SIGINT) to child process from dev
      server
    - wait for app to shut down in tests, with a short default timeout
    redbmk committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    57f880a View commit details
    Browse the repository at this point in the history
  3. fix: shutdown next dev immediately

    - when a SIGINT or SIGTERM is sent to next dev, shutdown the server immediately
    - create new test app for graceful-shutdown features
    - add some more tests
    redbmk committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    e3b0427 View commit details
    Browse the repository at this point in the history
  4. tests: add another test for graceful shutdown

    - shouldn't accept requests while server is shutting down and there's
      no activity
    - refactor some tests to use process.kill since it's faster and we
      aren't looking to kill the whole tree. makes killApp simpler too
    redbmk committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    7d94719 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7c8ff12 View commit details
    Browse the repository at this point in the history
  6. fix: standalone server graceful-shudown

    - moved some js files to ts and fixed types
    - fixed standalone server graceful-shutdown
    - added new tests for production standalone mode
    redbmk committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    c739e11 View commit details
    Browse the repository at this point in the history
  7. refactor: combine graceful-shutdown tests

    rather than having an integration test with dev and production modes,
    and then a separate test for standalone-mode that copies all the same
    tests, we can just follow the same pattern we had in integration but
    include the standalone-mode tests in the same file.
    redbmk committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    4f74aee View commit details
    Browse the repository at this point in the history
  8. refactor: move graceful-shutdown test-app to src folder

    the tsconfig.json file was causing typescript issues when looking for e2e-utils and next-test-utils
    redbmk committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    90af3bb View commit details
    Browse the repository at this point in the history

Commits on Jan 1, 2024

  1. Configuration menu
    Copy the full SHA
    f3c875d View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2024

  1. Configuration menu
    Copy the full SHA
    8de8407 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2024

  1. fix: remove check for !this.isStopping

    keeping code refactor to use "once", but adding that extra check broke a lot of tests
    redbmk committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    b173496 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    df3a4e5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c40330a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    778b5dc View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2024

  1. Configuration menu
    Copy the full SHA
    49af857 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2140702 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5622b51 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e2a7700 View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2024

  1. Configuration menu
    Copy the full SHA
    44fe46a View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2024

  1. Configuration menu
    Copy the full SHA
    8111659 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8e273b8 View commit details
    Browse the repository at this point in the history
  3. fix: linting

    redbmk committed Jan 13, 2024
    Configuration menu
    Copy the full SHA
    e340c41 View commit details
    Browse the repository at this point in the history
  4. fix: also check for signalCode

    redbmk committed Jan 13, 2024
    Configuration menu
    Copy the full SHA
    3f65ded View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e49fb6d View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2024

  1. Configuration menu
    Copy the full SHA
    c43fc86 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c0c73e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    712643c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    77bed79 View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2024

  1. Configuration menu
    Copy the full SHA
    aacc91c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c4af87d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f7faf58 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e88a95b View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2024

  1. Configuration menu
    Copy the full SHA
    fd84659 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b14eab2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ec24f76 View commit details
    Browse the repository at this point in the history