-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Bundler Deprecation warnings #943
Comments
Thanks for opening the issue. I'm not sure the best way to move forward here. I'll list out my concerns and my options. Performance / Build TimeRunning these
4 bundle commands is about 800ish ms which is pretty dang close to an extra second of build time. People are constantly looking to shave their build times so adding an extra second to every deploy isn't ideal. Those commands aren't local
Some tests in the buildpack are run as unit tests including some bundler tests that were isolated by directory. This behavior makes those much more fragile, we'll have to clean up more or maybe decide to get rid of those unit tests. I'll also need to figure out where those values are stored globally and properly persist them across builds. Since they're not in the local Options
Consequences: Need to figure out how to switch around the files it generates/touches. Added 1 second to every ruby deploy.
Consequences: Env var management between runtime and build time can be confusing as it seems to happen "automatically". This might surprisingly be the most bulletproof option unless they also plan on deprecating or removing env var based config.
Possible options:
Consequences: Bundler team was probably looking forward to getting rid of that code path, now instead they've still got to maintain it indefinitely behind an env flag. If their change is motivated by the desire to "clean up" this wouldn't be accepted. If their change is motivated only by the desire to be less surprising to the end-user, then I think it's a pretty good option.
Consequences: This doesn't help our time issue from above at all, and since older bundler versions don't have such a local config set command Heroku would have to maintain two bundler codepaths for the rest of time and remember that whenever one is updated, the other would have to be updated as well. It's doable, but not ideal. I don't like this option.
Consequences: Unknown
Consequences: Customers apps break eventually, not really an option but listing it for completeness. Moving forwardPending additional information or work on Bundler core, the best path forward is probably going to be to set the env vars configs so they're sticky at runtime and build time. |
If you haven't seen @schneems, the deprecation of these and other flags are being discussed in rubygems/bundler#7531 |
I think we can do option 2 without too many downsides. We can display output to the user with an extra print line above |
There been any updates here? Will Heroku users need to set those bundle env vars as per the option 2 above, or will this be handled in an update to the Heroku ruby buildpack? I ask mainly because I see that Thanks! |
I'll handle this in the buildpack. I've been sidelined by a series of nasty bugs.
Thanks! I'll take a look at that reference soon. |
@schneems Thanks for the response, much appreciated! Hope you feel better! |
Starting with Bundler 2.x deprecation warnings started appearing noting that flags will no longer persist config when running `bundle install`: ``` Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment [DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set deployment 'true'`, and stop using this flag [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path 'vendor/bundle'`, and stop using this flag [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development:test'`, and stop using this flag [DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs` ``` This is generally a confusing part of running bundler locally where someone on a team might try running `--bundle_without` once and then be confused at future behavior. To support persisting values, we can use the bundler env vars that start with `BUNDLE_`. These will be set at: - Build time - exported for other buildpacks - Runtime In addition, they're being shown in the `bundle install` output so if a developer gets a failure on Heroku they can copy and paste the command to test locally.
Starting with Bundler 2.x deprecation warnings started appearing noting that flags will no longer persist config when running `bundle install`: ``` Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment [DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set deployment 'true'`, and stop using this flag [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path 'vendor/bundle'`, and stop using this flag [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development:test'`, and stop using this flag [DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs` ``` This is generally a confusing part of running bundler locally where someone on a team might try running `--bundle_without` once and then be confused at future behavior. To support persisting values, we can use the bundler env vars that start with `BUNDLE_`. These will be set at: - Build time - exported for other buildpacks - Runtime In addition, they're being shown in the `bundle install` output so if a developer gets a failure on Heroku they can copy and paste the command to test locally.
Starting with Bundler 2.x deprecation warnings started appearing noting that flags will no longer persist config when running `bundle install`: ``` Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment [DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set deployment 'true'`, and stop using this flag [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path 'vendor/bundle'`, and stop using this flag [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development:test'`, and stop using this flag [DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs` ``` This is generally a confusing part of running bundler locally where someone on a team might try running `--bundle_without` once and then be confused at future behavior. To support persisting values, we can use the bundler env vars that start with `BUNDLE_`. These will be set at: - Build time - exported for other buildpacks - Runtime In addition, they're being shown in the `bundle install` output so if a developer gets a failure on Heroku they can copy and paste the command to test locally.
Starting with Bundler 2.x deprecation warnings started appearing noting that flags will no longer persist config when running `bundle install`: ``` Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment [DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set deployment 'true'`, and stop using this flag [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path 'vendor/bundle'`, and stop using this flag [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development:test'`, and stop using this flag [DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs` ``` This is generally a confusing part of running bundler locally where someone on a team might try running `--bundle_without` once and then be confused at future behavior. To support persisting values, we can use the bundler env vars that start with `BUNDLE_`. These will be set at: - Build time - exported for other buildpacks - Runtime In addition, they're being shown in the `bundle install` output so if a developer gets a failure on Heroku they can copy and paste the command to test locally.
Re-opening due to #1046 (comment) Merging this behavior in caused slug size to double. It looks like using environment variables is not a drop-in replacement for the arguments. |
EDIT AGAIN: is there a timeline on releasing this updated buildpack?
|
I'm looking to release tomorrow |
@schneems sounds great, thanks for the update |
I am getting deprecation warnings when deploying this buildpack:
Using Ruby 2.7.0, BUNDLED WITH 2.1.2, Rails 6.0.2
It's not really a blocker, as the build passes, I just thought to bring it up here
The text was updated successfully, but these errors were encountered: