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

Preserve BUNDLE_GEMFILE and add a test for it #1893

Merged
merged 29 commits into from Feb 18, 2020
Merged

Preserve BUNDLE_GEMFILE and add a test for it #1893

merged 29 commits into from Feb 18, 2020

Commits on Aug 8, 2019

  1. Preserve BUNDLE_GEMFILE and add a test for it

    Starting your server with BUNDLE_GEMFILE=Gemfile.rails6 would delete this
    environment variable on app restart when using `--prune-bundler`, when
    all you really want is to restore the variable to what it was before
    Bundler was activated.
    
    I mimicked the existing code that preserves GEM_HOME.
    
    Co-authored-by: James Miller <bensie@gmail.com>
    seven1m and bensie committed Aug 8, 2019
    Copy the full SHA
    56bbc2d View commit details
    Browse the repository at this point in the history
  2. Go back to using Bundler.with_original_env

    Test that the environment is not lost when doing a restart by using the
    PATH env var as a canary. While we actually care about the
    BUNDLER_GEMFILE env var, that one is harder to set up in testing since
    it requires a full copy of Puma's Gemfile.
    
    This change also has the benefit of not only protecting the
    BUNDLE_GEMFILE var, but also the other variables that Bundler knows
    about.
    seven1m committed Aug 8, 2019
    Copy the full SHA
    a3ed997 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    4b27762 View commit details
    Browse the repository at this point in the history
  4. Rename test

    seven1m committed Aug 8, 2019
    Copy the full SHA
    dad3e58 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2019

  1. Skip this test on Windows

    seven1m committed Aug 19, 2019
    Copy the full SHA
    9c2dd28 View commit details
    Browse the repository at this point in the history
  2. No need to fork

    seven1m committed Aug 19, 2019
    Copy the full SHA
    5e7a6fd View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2020

  1. Copy the full SHA
    7d6780d View commit details
    Browse the repository at this point in the history
  2. Preserve BUNDLE_GEMFILE and other Bundler env vars

    Starting your server with BUNDLE_GEMFILE=Gemfile.rails6 would delete this
    environment variable on app restart when using --prune-bundler, when all
    you really want is to restore the variable to what it was before Bundler
    was activated.
    
    Writing a test for this proved to be difficult because the bug only seems
    to manifest itself when running the server under the following conditions:
    
    - Using `bundle exec` to run the puma command
    - Using a non-zero number of workers, e.g. `-w 2`
    - Setting `BUNDLE_GEMFILE` to something other than "Gemfile"
    seven1m committed Feb 12, 2020
    Copy the full SHA
    4cfd3b8 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    242c140 View commit details
    Browse the repository at this point in the history
  4. Update changelog

    seven1m committed Feb 12, 2020
    Copy the full SHA
    f15121f View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2020

  1. Run test command without bash

    On my machine, the USR2 signal was being sent to Bash, but not to to
    puma itself. I don't understand why this only affected Ruby 2.2 though!
    seven1m committed Feb 13, 2020
    Copy the full SHA
    3020316 View commit details
    Browse the repository at this point in the history
  2. Remove skip for USR2

    seven1m committed Feb 13, 2020
    Copy the full SHA
    d89af85 View commit details
    Browse the repository at this point in the history
  3. Move test into separate file

    This test was failing on Travis when run in parallel with other tests in
    the TestIntegrationCluster test. Removing the line "parallelize_me!"
    from the top of the file worked, but I chose to move the test into its own
    file to keep the existing tests running in parallel.
    seven1m committed Feb 13, 2020
    Copy the full SHA
    c83401c View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    cbf32d5 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    95bcd05 View commit details
    Browse the repository at this point in the history
  6. Yes! It is, but why?

    seven1m committed Feb 13, 2020
    Copy the full SHA
    3be5f32 View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    9dcd2e3 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    2ed158e View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    359cb69 View commit details
    Browse the repository at this point in the history
  10. Reenable logging in the test

    seven1m committed Feb 13, 2020
    Copy the full SHA
    08dc10f View commit details
    Browse the repository at this point in the history
  11. Copy the full SHA
    0d020df View commit details
    Browse the repository at this point in the history
  12. Copy the full SHA
    d804495 View commit details
    Browse the repository at this point in the history
  13. Let's see them args!

    seven1m committed Feb 13, 2020
    Copy the full SHA
    10d4183 View commit details
    Browse the repository at this point in the history
  14. Now let's see the ENV!

    seven1m committed Feb 13, 2020
    Copy the full SHA
    d84e0ae View commit details
    Browse the repository at this point in the history
  15. Bundler wins. Just set BUNDLE_GEMFILE manually

    ...and go back to using Bundler.with_clean_env.
    seven1m committed Feb 13, 2020
    Copy the full SHA
    3d1c5e0 View commit details
    Browse the repository at this point in the history
  16. Remove diagnostic logging

    seven1m committed Feb 13, 2020
    Copy the full SHA
    f73cd57 View commit details
    Browse the repository at this point in the history
  17. Update changelog

    seven1m committed Feb 13, 2020
    Copy the full SHA
    bc4217b View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2020

  1. Copy the full SHA
    62f075f View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2020

  1. Clarify changelog entry

    seven1m committed Feb 18, 2020
    Copy the full SHA
    1846ef3 View commit details
    Browse the repository at this point in the history