-
Notifications
You must be signed in to change notification settings - Fork 3.5k
WIP: Make gradle the root of every dependency graph #18471
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
base: main
Are you sure you want to change the base?
Conversation
🤖 GitHub commentsJust comment with:
|
|
This pull request does not have a backport label. Could you fix it @donoghuc? 🙏
|
Do a fist pass at removing circular dependency on rake calling to gradle. Replace every "top level" task with a gradle task. This allows doing all dependency management with gradle, while still allowing us to use rake for leaf node tasks when appropriate.
6b91281 to
4fd6bbb
Compare
|
Note to self: make sure to re-evaluate https://github.com/elastic/logstash/pull/18340/files#r2488030095 |
|
run exhaustive tests |
|
Got through PR tests, moving on the exhaustive next (Still need to do DRA and ansillary). |
rubyUtils.gradle
Outdated
| } | ||
|
|
||
| // Spawn rake as external process (for CI compatibility) | ||
| def rakeExternal(File projectDir, File buildDir, String task) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like file descriptor inheretance is tripping up how fpm (https://github.com/jordansissel/fpm/blob/d9be49871fe040937b63d1223491fc352508ab78/lib/fpm/util.rb#L8) wants to shell out to tar. I found jruby/jruby#5249 which seems similar (but should have been resolved).
For now tasks that use fpm shell out to rake instead of using jruby via gradle.
example failure https://buildkite.com/elastic/logstash-exhaustive-tests-pipeline/builds/2998#019b0aa3-ff39-4b6b-9f37-cfd4cf1aa73b:
2025-12-10 15:45:17 PST | [artifact:deb] building deb package for x86_64
2025-12-10 15:45:17 PST | Rake task error: Errno::EBADF: Bad file descriptor - tar
2025-12-10 15:45:27 PST | Backtrace: org/jruby/RubyProcess.java:1779:in `spawn'
2025-12-10 15:45:17 PST | /opt/buildkite-agent/builds/bk-agent-prod-gcp-1765410090515934184/elastic/logstash-exhaustive-tests-pipeline/vendor/bundle/jruby/3.1.0/gems/fpm-1.17.0/lib/fpm/util.rb:145:in `execmd'
2025-12-10 15:45:17 PST | /opt/buildkite-agent/builds/bk-agent-prod-gcp-1765410090515934184/elastic/logstash-exhaustive-tests-pipeline/vendor/bundle/jruby/3.1.0/gems/fpm-1.17.0/lib/fpm/util.rb:186:in `safesystem'
2025-12-10 15:44:34 PST | /opt/buildkite-agent/builds/bk-agent-prod-gcp-1765410090515934184/elastic/logstash-exhaustive-tests-pipeline/vendor/bundle/jruby/3.1.0/gems/fpm-1.17.0/lib/fpm/package/deb.rb:1043:in `block in write_control_tarball'
2025-12-10 15:45:27 PST | <internal:uri:classloader:/jruby/kernel/kernel.rb>:19:in `tap'
2025-12-10 15:44:34 PST | /opt/buildkite-agent/builds/bk-agent-prod-gcp-1765410090515934184/elastic/logstash-exhaustive-tests-pipeline/vendor/bundle/jruby/3.1.0/gems/fpm-1.17.0/lib/fpm/package/deb.rb:1033:in `write_control_tarball'
2025-12-10 15:45:17 PST | /opt/buildkite-agent/builds/bk-agent-prod-gcp-1765410090515934184/elastic/logstash-exhaustive-tests-pipeline/vendor/bundle/jruby/3.1.0/gems/fpm-1.17.0/lib/fpm/package/deb.rb:677:in `output'
2025-12-10 15:45:27 PST | /opt/buildkite-agent/builds/bk-agent-prod-gcp-1765410090515934184/elastic/logstash-exhaustive-tests-pipeline/rakelib/artifacts.rake:853:in `package'
2025-12-10 15:45:27 PST | /opt/buildkite-agent/builds/bk-agent-prod-gcp-1765410090515934184/elastic/logstash-exhaustive-tests-pipeline/rakelib/artifacts.rake:672:in `package_with_jdk'
2025-12-10 15:45:27 PST | /opt/buildkite-agent/builds/bk-agent-prod-gcp-1765410090515934184/elastic/logstash-exhaustive-tests-pipeline/rakelib/artifacts.rake:313:in `block in <main>'
2025-12-10 15:45:27 PST | /opt/buildkite-agent/builds/bk-agent-prod-gcp-1765410090515934184/elastic/logstash-exhaustive-tests-pipeline/vendor/bundle/jruby/3.1.0/gems/rake-13.3.1/lib/rake/task.rb:281:in `block in execute'
2025-12-10 15:45:27 PST | org/jruby/RubyArray.java:2009:in `each'
2025-12-10 15:45:27 PST | /opt/buildkite-agent/builds/bk-agent-prod-gcp-1765410090515934184/elastic/logstash-exhaustive-tests-pipeline/vendor/bundle/jruby/3.1.0/gems/rake-13.3.1/lib/rake/task.rb:281:in `execute'
2025-12-10 15:45:27 PST | /opt/buildkite-agent/builds/bk-agent-prod-gcp-1765410090515934184/elastic/logstash-exhaustive-tests-pipeline/vendor/bundle/jruby/3.1.0/gems/rake-13.3.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
2025-12-10 15:45:27 PST | org/jruby/ext/monitor/Monitor.java:82:in `synchronize'
2025-12-10 15:45:27 PST | /opt/buildkite-agent/builds/bk-agent-prod-gcp-1765410090515934184/elastic/logstash-exhaustive-tests-pipeline/vendor/bundle/jruby/3.1.0/gems/rake-13.3.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
2025-12-10 15:45:27 PST | /opt/buildkite-agent/builds/bk-agent-prod-gcp-1765410090515934184/elastic/logstash-exhaustive-tests-pipeline/vendor/bundle/jruby/3.1.0/gems/rake-13.3.1/lib/rake/task.rb:188:in `invoke'
2025-12-10 15:45:27 PST | <script>:6:in `<main>'
|
run exhaustive tests |
|
Made more progress on acceptance tests... The Also, there will be some follow on work with invokingh bunlder directly for acceptance tests. For now, instead of invoking rake i'm invoking bundler, but i have not decided if that is actually a win or not. |
💚 Build Succeeded
History
|
|
Today i was able to figure out the fpm issues but the problem i'm playing whack-a-mole with is the management of dowloading jdk. The exhaustive test pipeline provides an example of an issue i'm facing. Currently as a prep step we run I need to figure out exactly which tasks need the copyJdk (and which explicitly need it deleted) in order to figure out how to best represent it in gradle. |
Do a fist pass at removing circular dependency on rake calling to gradle. Replace every "top level" task with a gradle task. This allows doing all dependency management with gradle, while still allowing us to use rake for leaf node tasks when appropriate.
Release notes
What does this PR do?
Why is it important/What is the impact to the user?
Checklist
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs