Skip to content

Conversation

@robbavey
Copy link
Member

Recent versions of bundler (> 2.2.3) have changed the resolution to resolve
for the specific running platform, using the specific platform triple, such
as universal-java-1.8, rather than java, as was previously the case, meaning
that the 'PLATFORMSsection of theGemfile.lock` will change from:

PLATFORMS
java

after:

PLATFORMS
universal-java-1.8

At runtime, unless bundler is run in frozen mode, this value is resolved again at
runtime, and depending on whether the platform being run in matches that being built
on, Gemfile.lock is resolved to match the running platform - which now causes a
runtime error when running Logstash as a service, as the running application no longer
has write permission on Gemfile.lock after #12782.

While this should fix #12818, we should look into a permanent solution to enable us to
keep up with bundler updates.

Release notes

What does this PR do?

Why is it important/What is the impact to the user?

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

Recent versions of bundler (> 2.2.3) have changed the resolution to resolve
for the specific running platform, using the specific platform triple, such
as `universal-java-1.8`, rather than `java`, as was previously the case, meaning
that the 'PLATFORMS` section of the `Gemfile.lock` will change from:

```
PLATFORMS
java
```

after:

```
PLATFORMS
universal-java-1.8
```

At runtime, unless bundler is run in frozen mode, this value is resolved again at
runtime, and depending on whether the platform being run in matches that being built
on, `Gemfile.lock` is resolved to match the running platform - which now causes a
runtime error when running Logstash as a service, as the running application no longer
has write permission on `Gemfile.lock` after elastic#12782.

While this should fix elastic#12818, we should look into a permanent solution to enable us to
keep up with bundler updates.
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.

LGTM📍(pending 💚)

build.gradle Outdated
dependsOn installBundler
doLast {
setupJruby(projectDir, buildDir)
setupJruby(projectDir, buildDir.1.4)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
setupJruby(projectDir, buildDir.1.4)
setupJruby(projectDir, buildDir)

@robbavey robbavey marked this pull request as ready for review May 14, 2021 18:00
@robbavey
Copy link
Member Author

@yauuie - ready for re-review

@robbavey
Copy link
Member Author

#13015 removes the need for this PR

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.

[8.x] Bundler being run on daemon start (and tries to update /usr/share/logstash/Gemfile.lock)

3 participants