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

Fix bundler handling of 'without' #13351

Merged
merged 8 commits into from
Oct 26, 2021
Merged

Conversation

robbavey
Copy link
Member

Prior to this change, the values set in set_local are ignored when invoking
bundler via the command line, as is used with invoke!. This commit sets those
values in ENV variables instead, fixing the functionality to not install
development gems.

@yaauie
Copy link
Member

yaauie commented Oct 21, 2021

While this still is flagged as a WIP, the changes up through 67911c8 LGTM and make sense with the bundler docs. I imagine that something about our subclass-of-bundler implementation is causing the set_local to not align with internal changes in bundler.

I would prefer a test, somewhere, that allows us to verify that certain gems are (or are not) included in the generated artifact.

robbavey and others added 7 commits October 26, 2021 15:33
Prior to this change, the values set in `set_local` are ignored when invoking
bundler via the command line, as is used with `invoke!`. This commit sets those
values in `ENV` variables instead, fixing the functionality to not install
development gems.
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
* logstash service needs to be installed
* gem_vendored? needs to use full path to vendor files
* use `stdout` from `cat` command to generate spec temporary file
@robbavey robbavey changed the title [wip] Fix bundler handling of 'without' Fix bundler handling of 'without' Oct 26, 2021
@robbavey
Copy link
Member Author

@yaauie Ready for another round - tests are now working

Copy link
Member

@yaauie yaauie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual changes LGTM.

It's not exactly clear to me why we need to both do a set_local and invoke with_env for "path", "gemfile", and "without", but the tests seem to speak for themselves.

Could be improved by backing off the complexity of the gem_vendored? helper I contributed, since we don't use the block-form anyway.

qa/rspec/commands/base.rb Outdated Show resolved Hide resolved
qa/rspec/commands.rb Outdated Show resolved Hide resolved
@robbavey robbavey merged commit a6e3914 into elastic:master Oct 26, 2021
robbavey added a commit to robbavey/logstash that referenced this pull request Oct 26, 2021
Backport PR elastic#13351 to 7.16 branch. Original message:

* Fix bundler handling of 'without'

Prior to this change, the values set in `set_local` are ignored when invoking
bundler via the command line, as is used with `invoke!`. This commit sets those
values in `ENV` variables instead, fixing the functionality to not install
development gems.
* Update bundler spec to check ENV variable
* Added test to ensure kramdown gem not vendored
* Re-add set_local setting to play nice with `expand_logstash_mixin_dependencies`
* logstash service needs to be installed
* gem_vendored? needs to use full path to vendor files
* use `stdout` from `cat` command to generate spec temporary file
* Removed unnecessary support for supplying a block from #gem_vendored?

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
robbavey added a commit to robbavey/logstash that referenced this pull request Oct 26, 2021
…lastic#13351)

Backport PR elastic#13351 to 7.16 branch. Original message:

* Fix bundler handling of 'without'

Prior to this change, the values set in `set_local` are ignored when invoking
bundler via the command line, as is used with `invoke!`. This commit sets those
values in `ENV` variables instead, fixing the functionality to not install
development gems.
* Update bundler spec to check ENV variable
* Added test to ensure kramdown gem not vendored
* Re-add set_local setting to play nice with `expand_logstash_mixin_dependencies`
* logstash service needs to be installed
* gem_vendored? needs to use full path to vendor files
* use `stdout` from `cat` command to generate spec temporary file
* Removed unnecessary support for supplying a block from #gem_vendored?

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
robbavey added a commit to robbavey/logstash that referenced this pull request Oct 26, 2021
Backport PR elastic#13351 to 7.15 branch. Original message:

* Fix bundler handling of 'without'

Prior to this change, the values set in `set_local` are ignored when invoking
bundler via the command line, as is used with `invoke!`. This commit sets those
values in `ENV` variables instead, fixing the functionality to not install
development gems.
* Update bundler spec to check ENV variable
* Added test to ensure kramdown gem not vendored
* Re-add set_local setting to play nice with `expand_logstash_mixin_dependencies`
* logstash service needs to be installed
* gem_vendored? needs to use full path to vendor files
* use `stdout` from `cat` command to generate spec temporary file
* Removed unnecessary support for supplying a block from #gem_vendored?

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
robbavey added a commit to robbavey/logstash that referenced this pull request Oct 26, 2021
Backport PR elastic#13351 to 7.16 branch. Original message:

* Fix bundler handling of 'without'

Prior to this change, the values set in `set_local` are ignored when invoking
bundler via the command line, as is used with `invoke!`. This commit sets those
values in `ENV` variables instead, fixing the functionality to not install
development gems.
* Update bundler spec to check ENV variable
* Added test to ensure kramdown gem not vendored
* Re-add set_local setting to play nice with `expand_logstash_mixin_dependencies`
* logstash service needs to be installed
* gem_vendored? needs to use full path to vendor files
* use `stdout` from `cat` command to generate spec temporary file
* Removed unnecessary support for supplying a block from #gem_vendored?

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
robbavey added a commit that referenced this pull request Oct 26, 2021
Backport PR #13351 to 7.15 branch. Original message:

* Fix bundler handling of 'without'

Prior to this change, the values set in `set_local` are ignored when invoking
bundler via the command line, as is used with `invoke!`. This commit sets those
values in `ENV` variables instead, fixing the functionality to not install
development gems.
* Update bundler spec to check ENV variable
* Added test to ensure kramdown gem not vendored
* Re-add set_local setting to play nice with `expand_logstash_mixin_dependencies`
* logstash service needs to be installed
* gem_vendored? needs to use full path to vendor files
* use `stdout` from `cat` command to generate spec temporary file
* Removed unnecessary support for supplying a block from #gem_vendored?

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
robbavey added a commit that referenced this pull request Oct 26, 2021
Backport PR #13351 to 7.16 branch. Original message:

* Fix bundler handling of 'without'

Prior to this change, the values set in `set_local` are ignored when invoking
bundler via the command line, as is used with `invoke!`. This commit sets those
values in `ENV` variables instead, fixing the functionality to not install
development gems.
* Update bundler spec to check ENV variable
* Added test to ensure kramdown gem not vendored
* Re-add set_local setting to play nice with `expand_logstash_mixin_dependencies`
* logstash service needs to be installed
* gem_vendored? needs to use full path to vendor files
* use `stdout` from `cat` command to generate spec temporary file
* Removed unnecessary support for supplying a block from #gem_vendored?

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants