Conversation
🤖 GitHub commentsJust comment with:
|
|
This pull request does not have a backport label. Could you fix it @kaisecheng? 🙏
|
fede1e9 to
1db27b2
Compare
1db27b2 to
3dae1c4
Compare
copyEs and copyFilebeat had no inputs/outputs declared and depended on deleteLocalEs/deleteLocalFilebeat, which wiped the extracted directories unconditionally, forcing re-extraction of multi-gigabyte archives on every integration test run. Declare inputs.files and outputs.dir on both tasks so Gradle can skip extraction when the tar.gz is unchanged. Move the delete inside doLast so it only runs when the task actually executes. Add mustRunAfter unpackTarDistribution to satisfy Gradle implicit dependency validation for the shared build/ output directory. Use inputs.files(tasks.named(...)) instead of a closure reading project.ext to avoid configuration-phase property access errors.
…rationSpecs
Pass -PrubyIntegrationSpecs=<spec-path> to target a single spec file
instead of the entire qa/integration suite:
./gradlew :logstash-xpack:rubyIntegrationTests \
-PrubyIntegrationSpecs=qa/integration/management/multiple_pipelines_spec.rb
RSpecIntegrationTests reads org.logstash.xpack.integration.specs system
property with qa/integration as default. x-pack/build.gradle forwards
the Gradle property to the JVM system property when present.
Also adds outputs.upToDateWhen { false } so rubyIntegrationTests always
executes when invoked, regardless of Gradle UP-TO-DATE state.
a957d1e to
33c227e
Compare
e9b4c24 to
33c227e
Compare
I'm having trouble understanding or reproducing this. Using ruby to do process managment seems like something is going really wrong, i'de like to understand what the actual issue is to try to wrap my head around why we would need to do that. I tried: but I dont see any left over processes. |
|
@donoghuc Sorry for the confusion, I removed the point in summary but forgot to clean up in test plan. |
andsel
left a comment
There was a problem hiding this comment.
I have a couple of doubts:
-
what happens when there is already an unpacked ES distribution (in
build/elasticsearch) an the a new version (different remote SHA) has been published in the artifacts API? I think it unpacks on the existing, with the risk to keep stale files. I think in that case, when a new version is discovered, downloaded and unpacked it has to cleanup the target folder. -
the tasks
copyFilebeatdepends ondownloadFilebeatwhich depends onprepareFilebeatDownload.prepareFilebeatDownloadprepares the URL for download in the project extension properties but doesn't check any SHA difference between local and remote.
ThedownloadEstask isntead, depends on bothprepareEsDownloadandcheckEsSHA. ThecheckEsSHAis responsible to clean the local extracted copy of ES. I think that also thedownloadFilebeatshould to the same thing, else we risk that once downloaded a filebeat, we don't update with sequent versions (for the same version), if I'm not wrong.
Add checkFilebeatSHA task mirroring checkEsSHA. Without it, daily snapshot rebuilds of the same version go undetected because Gradle skips downloadFilebeat when versions.yml is unchanged.
…nd checkFilebeatSHA Both tasks share identical logic: fetch remote SHA, compare with local archive, delete local if different. Extract into a single method.
|
Use artifactProject as the log label instead.
💚 Build Succeeded
History
|
andsel
left a comment
There was a problem hiding this comment.
LGTM
Nice fix! And thanks to have improved also the filebeat case.
|
@Mergifyio backport 8.19 9.2 9.3 |
✅ Backports have been createdDetails
Cherry-pick of fcfcea0 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Cherry-pick of fcfcea0 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Cherry-pick of fcfcea0 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
- Make ES and Filebeat extraction incremental. copyEs and copyFilebeat now declare inputs / outputs so Gradle skips re-extraction when the tar.gz is unchanged. - Support running a single xpack spec via `-PrubyIntegrationSpecs` to align with core. Example: `./gradlew :logstash-xpack:rubyIntegrationTests -PrubyIntegrationSpecs=qa/integration/monitoring/monitoring_is_disabled_spec.rb` (cherry picked from commit fcfcea0) # Conflicts: # build.gradle # x-pack/AGENTS.md
- Make ES and Filebeat extraction incremental. copyEs and copyFilebeat now declare inputs / outputs so Gradle skips re-extraction when the tar.gz is unchanged. - Support running a single xpack spec via `-PrubyIntegrationSpecs` to align with core. Example: `./gradlew :logstash-xpack:rubyIntegrationTests -PrubyIntegrationSpecs=qa/integration/monitoring/monitoring_is_disabled_spec.rb` (cherry picked from commit fcfcea0) # Conflicts: # x-pack/AGENTS.md
- Make ES and Filebeat extraction incremental. copyEs and copyFilebeat now declare inputs / outputs so Gradle skips re-extraction when the tar.gz is unchanged. - Support running a single xpack spec via `-PrubyIntegrationSpecs` to align with core. Example: `./gradlew :logstash-xpack:rubyIntegrationTests -PrubyIntegrationSpecs=qa/integration/monitoring/monitoring_is_disabled_spec.rb` (cherry picked from commit fcfcea0) # Conflicts: # x-pack/AGENTS.md
Summary
Three improvements to the Gradle xpack integration test workflow:
copyEsandcopyFilebeatnow declareinputs/outputsso Gradle skips re-extraction when the tar.gz is unchanged.-PrubyIntegrationSpecs=instead of the fullqa/integrationsuite.How to test this PR locally
./gradlew :logstash-xpack:rubyIntegrationTests -PrubyIntegrationSpecs=qa/integration/monitoring/monitoring_is_disabled_spec.rb. Only that spec runs../gradlew :logstash-xpack:rubyIntegrationTests -PrubyIntegrationSpecs=qa/integration/monitoring/monitoring_is_disabled_spec.rb. ES is NOT re-downloaded on second run../gradlew :logstash-xpack:rubyIntegrationTests. All specs run. ES and Filebeat extracted correctly.