Check for default gemfile instead on bundler directory #1477
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
.rubocop.yml
)Related issues