Skip to content
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

Move retrieval of Stack version from Gradle's configuration to execution #13042

Conversation

andsel
Copy link
Contributor

@andsel andsel commented Jul 1, 2021

Release notes

[rn:skip]

What does this PR do?

This PR moves the downloading of Elasticsearch and Filebeat artifacts, used in integration tests, to happen at Gradle's execution phase instead of configuration time. This let the configuration step to work also it the requested integration artifacts aren't yet published.

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

It has to be possible to run Gradle tasks related to package creation and running unit test also if the stack version defined in versions.yml is not yet available. In this case integration tests is admitted to fail.

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

  • verify ruby and java unit tests works without downloading external dependencies
  • verify rake artifact:all build artifacts without downloading ES or Filebeat artifacts

How to test this PR locally

Modify versions.yml locally to a version not yet published, for example 7.15.0 and try to run the unit tests ./gradlew :logstash-core:unitTests and ./gradlew :logstash-core:rubyTests. Those should work without downloading any Elasticserach package, check build/ folder. Run integration tests ./gradlew runIntegrationTest and it should fail to find 7.15.0.

Related issues

Use cases

Screenshots

Logs

@andsel andsel force-pushed the fix/move_retrieve_of_stack_version_into_gradle_execution_phase branch from 4d7d4a2 to 03b0604 Compare July 7, 2021 11:46
@andsel andsel marked this pull request as ready for review July 7, 2021 16:00
@jsvd jsvd self-requested a review July 7, 2021 16:21
Copy link
Member

@jsvd jsvd left a comment

Choose a reason for hiding this comment

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

great work @andsel, I tried the scenarios listed for reviewers and it all works, LGTM

@andsel andsel merged commit cef339c into elastic:master Jul 12, 2021
@andsel andsel added the v8.0.0 label Jul 12, 2021
andsel added a commit to andsel/logstash that referenced this pull request Jul 12, 2021
…ion (elastic#13042)

The Gradle's configuration of task should be as fast as possible and don't break the build.
This commit moves retrieval of Elastic Stack version from the remote registry to the execution phase of the tasks.
Also the tasks that depends on this has received the same change (downloadEs and check EsSHA), moving from configuration to execution phase.

Close elastic#13030

(cherry picked from commit cef339c)
andsel added a commit that referenced this pull request Jul 13, 2021
…tion to execution (#13042) (#13066)

The Gradle's configuration of task should be as fast as possible and don't break the build.
This commit moves retrieval of Elastic Stack version from the remote registry to the execution phase of the tasks.
Also the tasks that depends on this has received the same change (downloadEs and check EsSHA), moving from configuration to execution phase.

Close #13030

(cherry picked from commit cef339c)
andsel added a commit to andsel/logstash that referenced this pull request Jul 13, 2021
…ion (elastic#13042)

The Gradle's configuration of task should be as fast as possible and don't break the build.
This commit moves retrieval of Elastic Stack version from the remote registry to the execution phase of the tasks.
Also the tasks that depends on this has received the same change (downloadEs and check EsSHA), moving from configuration to execution phase.

Close elastic#13030

(cherry picked from commit cef339c)
andsel added a commit to andsel/logstash that referenced this pull request Jul 13, 2021
…ion (elastic#13042)

The Gradle's configuration of task should be as fast as possible and don't break the build.
This commit moves retrieval of Elastic Stack version from the remote registry to the execution phase of the tasks.
Also the tasks that depends on this has received the same change (downloadEs and check EsSHA), moving from configuration to execution phase.

Close elastic#13030

(cherry picked from commit cef339c)
andsel added a commit that referenced this pull request Jul 21, 2021
…ion (#13042) (#13067)

The Gradle's configuration of task should be as fast as possible and don't break the build.
This commit moves retrieval of Elastic Stack version from the remote registry to the execution phase of the tasks.
Also the tasks that depends on this has received the same change (downloadEs and check EsSHA), moving from configuration to execution phase.

Close #13030

(cherry picked from commit cef339c)
kares added a commit to kares/logstash that referenced this pull request Aug 23, 2021
* master:
  Update releases list (elastic#13149)
  Bundler: freeze lockfile on run, and "normalize" platform on plugin changes (elastic#13015)
  Doc: Move shared region tags for breaking changes to 8.0.0 content (elastic#13131)
  Update Snakeyaml version to 1.29 (elastic#13129)
  Doc: Add breaking changes to breaking changes page (elastic#13130)
  Added faraday-* and ruby2_keywords notices to licences list (elastic#13126)
  Release notes draft for 8.0.0-alpha1 (elastic#13098)
  valid variable expansion for the batch files (elastic#12912)
  Doc: Enhance and expand DLQ docs (elastic#12959)
  Update releases list with 7.13.4 (elastic#13088)
  Doc:Fix typo and adjust keystore text (elastic#12779)
  doc: add pipeline.ecs_compatibility docs (elastic#12421)
  ecs_compatibility: revert breaking change; keep `disabled` as default for 8.0.0 (elastic#13080)
  Doc: Add kafka schema registry setting to troubleshooting (elastic#13073)
  [Test] Fix Unix acceptance tests (elastic#13071)
  Move retrieval of Stack version from Gradle's configuration to execution (elastic#13042)
  Update releases list with 6.8.17 and 7.13.3 (elastic#13041)
  Docs: keep elastic_app_search output meta-data (elastic#13048)
  Fix LS benchmarking tool to work with releases >= 7.10.0 (elastic#13052)
  Revert "Change Gradle's :logstash-integration-tests:integrationTests task to depends on copyES (elastic#12847)" (elastic#13045)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants