Fix acceptance test when run artifact:all#12975
Merged
andsel merged 2 commits intoelastic:masterfrom Jun 10, 2021
Merged
Conversation
This commit avoid to check fo rexistence of jar file sto decide if run or not gradle assemble, basically because the output of assemble task is not only jars but also others, for example plugin-aliases.yml. In this way the decision to execute or not is left the Gradle logic.
Contributor
Author
|
Jenkins test this please |
kares
approved these changes
Jun 10, 2021
rakelib/compile.rake
Outdated
| safe_system("./gradlew", "assemble") | ||
| end | ||
| puts("Building logstash-core using gradle") | ||
| safe_system("./gradlew", "assemble") |
Contributor
There was a problem hiding this comment.
fyi: there's a rake helper sh which does raise on non-0 exit + will print the command run as well as output
Suggested change
| safe_system("./gradlew", "assemble") | |
| sh('./gradlew assemble') |
safe_system is simply reinventing the wheel here
Contributor
Author
|
Jenkins test this please |
andsel
added a commit
to andsel/logstash
that referenced
this pull request
Jun 17, 2021
This commit avoid to check for existence of jar files to decide if run or not Gradle assemble, basically because the outputs of assemble task are not only jars but also others files, for example plugin-aliases.yml. In this way the decision to execute or not is left the Gradle logic. (cherry picked from commit 3eaff36)
andsel
added a commit
that referenced
this pull request
Jun 17, 2021
This commit avoid to check for existence of jar files to decide if run or not Gradle assemble, basically because the outputs of assemble task are not only jars but also others files, for example plugin-aliases.yml. In this way the decision to execute or not is left the Gradle logic. (cherry picked from commit 3eaff36)
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Release notes
[rn:skip]
What does this PR do?
This PR avoid to check for existence of jar files in
logstash-core/lib/jarsto decide is run the processgradlew assembleas a task of therake artifact:all. The motivation is due to the fact that assemble produces directly or indirectly more files than just those jars, for example it also transitively create theplugin_aliases.ymldefinitions.The responsibility of the choice to run or not
assembleshould stay in Gradle's side, becuase it has more clear vision of the dependencies.Why is it important/What is the impact to the user?
Doesn't impact directly the user
Checklist
My code follows the style guidelines of this projectI have commented my code, particularly in hard-to-understand areasI have made corresponding changes to the documentationI have made corresponding change to the default configuration files (and/or docker env variables)Author's Checklist
How to test this PR locally
I wasn't able to reproduce this locally, but only on the remote CI using the branch https://github.com/elastic/logstash/tree/investigation_acceptance_fail
Related issues
Use cases
Screenshots
Logs