Check for default gemfile instead on bundler directory
What does this pull request do?
When the stacktrace helper attempts to find the path of installed gems, it uses a method to verify a default bundler install path that attempts to write to the filesystem. This behavior prevents the apm agent from running on a read-only filesystem. This PR attempts to keep the spirit of the functionality while getting around the need to write to the filesystem. Instead of checking if there is a default bundler path, it checks to see if there's a default gemfile.
Why is it important?
Without this bug fix, we cannot run the agent on apps in our secure k8s cluster.
Checklist
- [x] I have signed the Contributor License Agreement.
- [x] My code follows the style guidelines of this project (See
.rubocop.yml) - [x] I have rebased my changes on top of the latest main branch
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] I have made corresponding changes to the documentation
- [ ] I have updated CHANGELOG.asciidoc
- [ ] I have updated supported-technologies.asciidoc
- [ ] Added an API method or config option? Document in which version this will be introduced
Related issues
- Closes 1464
❌ Author of the following commits did not sign a Contributor Agreement: 8acfac10e8849d1a3beffbff58f50baab1d6d5ab,
Please, read and sign the above mentioned agreement if you want to contribute to this project
Hi @smedrick thanks for this PR. Did you find this as the result of an error? I just wanted to see if I could reproduce it. Also, if you could sign the CLA, that'd be great.
Hi @smedrick thanks for this PR. Did you find this as the result of an error? I just wanted to see if I could reproduce it. Also, if you could sign the CLA, that'd be great.
This addresses https://github.com/elastic/apm-agent-ruby/issues/1464
I did sign the CLA but I have no idea how it links back to the PR