Skip to content

Conversation

@donoghuc
Copy link
Member

@donoghuc donoghuc commented Aug 8, 2025

Release notes

[rn:skip]

What does this PR do?

Previously a weekly buildkite job would check if there is a newer JDK available than the one vendored in logstash. This job would fail until someone manually updated the JDK version in the versions.yml file in logstash. This commit reduces manual intervention by moving the responsibility to a GH action where there are patterns for creating PRs back to logstash. The action should run weekly and also be available in the actions UI. It is locked down with the same permissions as the version bump action. The gradle task has been replaced with the updatecli pattern established in #18035

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

No user impact, quality of life improvement for logstash devs.

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

How to test this PR locally

Downgrade java version in versions.yml and run ./gradlew updateJdkVersion to update it back to latest.

Related issues

@donoghuc donoghuc requested review from a team as code owners August 8, 2025 20:30
@donoghuc donoghuc added the backport-active-all Automated backport with mergify to all the active branches label Aug 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2025

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@elastic-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

Thank you for this work!

Have you tested this workflow?

Normally the process is to create a stub workflow (with permissions to trigger from a PR from an upstream branch) and in iterate in a follow up PR

git push origin $BRANCH

- name: Create Pull Request
if: steps.verify-changed-files.outputs.changed == 'true'
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you considered an updatecli workflow for this instead? See an example from beats in https://github.com/elastic/beats/tree/1df4889c66c43c71b7a795f7c735eeb79c48c569/.github/workflows/updatecli.d

Copy link
Member Author

Choose a reason for hiding this comment

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

I had not heard of that tool before. That looks very helpful! I pinged you in slack to clarify your suggestion for doing testing for worfklows. Once i have that down i can experiment a bit with using updatecli. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @dliappis again for the review and suggestions. I opened a PR to add a stub action to test against #17993 and started exploring the updatecli tool with #18035

If you have a chance to look at those that would be great. I was thinking we can get the stub action merged which will inform this and the other proposed action.

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM for the stub, thanks!

Copy link
Member

@v1v v1v left a comment

Choose a reason for hiding this comment

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

LGTM, just a quick comment whether using updatecli could help with creating the PR automatically and deal with the git commands (config, add, commit, push). updatecli is idempotence so it can help with removing the if steps, in addition it can help with the testing, since the GH workflows will just configure the environment (updatecli, secrets, jdk) and run the updatecli apply.

What do you think?

Previously a weekly buildkite job would check if there is a newer JDK available
than the one vendored in logstash. This job would fail until someone manually
updated the JDK version in the `versions.yml` file in logstash. This commit
reduces manual intervention by moving the responsibility to a GH action where
there are patterns for creating PRs back to logstash. The action should run
weekly and also be available in the actions UI. It is locked down with the same
permissions as the version bump action.
@donoghuc
Copy link
Member Author

@v1v I refactored this PR to use pure updatecli and remove the gradle task all together. Here is a run of the workflow https://github.com/elastic/logstash/actions/runs/17986277124/job/51165121366

@elastic-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@donoghuc donoghuc merged commit 2fab5f4 into elastic:main Sep 24, 2025
12 of 13 checks passed
@github-actions
Copy link
Contributor

@Mergifyio backport 8.18 8.19 9.0 9.1

@mergify
Copy link
Contributor

mergify bot commented Sep 24, 2025

backport 8.18 8.19 9.0 9.1

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Sep 24, 2025
* Replace buildkite jdk version check w/GH action

Previously a weekly buildkite job would check if there is a newer JDK available
than the one vendored in logstash. This job would fail until someone manually
updated the JDK version in the `versions.yml` file in logstash. This commit
reduces manual intervention by moving the responsibility to a GH action where
there are patterns for creating PRs back to logstash. The action should run
weekly and also be available in the actions UI. It is locked down with the same
permissions as the version bump action.

* Refactor to use updatecli

* Remove gradle task in favor of updatecli

* remove unused file

* Dynamically generate java version lookup

* make pipeline name unique'
'

(cherry picked from commit 2fab5f4)

# Conflicts:
#	build.gradle
#	catalog-info.yaml
mergify bot pushed a commit that referenced this pull request Sep 24, 2025
* Replace buildkite jdk version check w/GH action

Previously a weekly buildkite job would check if there is a newer JDK available
than the one vendored in logstash. This job would fail until someone manually
updated the JDK version in the `versions.yml` file in logstash. This commit
reduces manual intervention by moving the responsibility to a GH action where
there are patterns for creating PRs back to logstash. The action should run
weekly and also be available in the actions UI. It is locked down with the same
permissions as the version bump action.

* Refactor to use updatecli

* Remove gradle task in favor of updatecli

* remove unused file

* Dynamically generate java version lookup

* make pipeline name unique'
'

(cherry picked from commit 2fab5f4)

# Conflicts:
#	catalog-info.yaml
mergify bot pushed a commit that referenced this pull request Sep 24, 2025
* Replace buildkite jdk version check w/GH action

Previously a weekly buildkite job would check if there is a newer JDK available
than the one vendored in logstash. This job would fail until someone manually
updated the JDK version in the `versions.yml` file in logstash. This commit
reduces manual intervention by moving the responsibility to a GH action where
there are patterns for creating PRs back to logstash. The action should run
weekly and also be available in the actions UI. It is locked down with the same
permissions as the version bump action.

* Refactor to use updatecli

* Remove gradle task in favor of updatecli

* remove unused file

* Dynamically generate java version lookup

* make pipeline name unique'
'

(cherry picked from commit 2fab5f4)

# Conflicts:
#	catalog-info.yaml
@elasticmachine
Copy link

💚 Build Succeeded

History

mergify bot pushed a commit that referenced this pull request Sep 24, 2025
* Replace buildkite jdk version check w/GH action

Previously a weekly buildkite job would check if there is a newer JDK available
than the one vendored in logstash. This job would fail until someone manually
updated the JDK version in the `versions.yml` file in logstash. This commit
reduces manual intervention by moving the responsibility to a GH action where
there are patterns for creating PRs back to logstash. The action should run
weekly and also be available in the actions UI. It is locked down with the same
permissions as the version bump action.

* Refactor to use updatecli

* Remove gradle task in favor of updatecli

* remove unused file

* Dynamically generate java version lookup

* make pipeline name unique'
'

(cherry picked from commit 2fab5f4)
donoghuc added a commit that referenced this pull request Sep 24, 2025
* Replace buildkite jdk version check w/GH action

Previously a weekly buildkite job would check if there is a newer JDK available
than the one vendored in logstash. This job would fail until someone manually
updated the JDK version in the `versions.yml` file in logstash. This commit
reduces manual intervention by moving the responsibility to a GH action where
there are patterns for creating PRs back to logstash. The action should run
weekly and also be available in the actions UI. It is locked down with the same
permissions as the version bump action.

* Refactor to use updatecli

* Remove gradle task in favor of updatecli

* remove unused file

* Dynamically generate java version lookup

* make pipeline name unique'
'

(cherry picked from commit 2fab5f4)

Co-authored-by: Cas Donoghue <[email protected]>
donoghuc added a commit that referenced this pull request Sep 24, 2025
…ion (#18211)

* Replace buildkite jdk version check w/GH action (#17945)

* Replace buildkite jdk version check w/GH action

Previously a weekly buildkite job would check if there is a newer JDK available
than the one vendored in logstash. This job would fail until someone manually
updated the JDK version in the `versions.yml` file in logstash. This commit
reduces manual intervention by moving the responsibility to a GH action where
there are patterns for creating PRs back to logstash. The action should run
weekly and also be available in the actions UI. It is locked down with the same
permissions as the version bump action.

* Refactor to use updatecli

* Remove gradle task in favor of updatecli

* remove unused file

* Dynamically generate java version lookup

* make pipeline name unique'
'

(cherry picked from commit 2fab5f4)

# Conflicts:
#	build.gradle
#	catalog-info.yaml

* fix merge conflicts

---------

Co-authored-by: Cas Donoghue <[email protected]>
donoghuc added a commit that referenced this pull request Sep 24, 2025
…ion (#18212)

* Replace buildkite jdk version check w/GH action (#17945)

* Replace buildkite jdk version check w/GH action

Previously a weekly buildkite job would check if there is a newer JDK available
than the one vendored in logstash. This job would fail until someone manually
updated the JDK version in the `versions.yml` file in logstash. This commit
reduces manual intervention by moving the responsibility to a GH action where
there are patterns for creating PRs back to logstash. The action should run
weekly and also be available in the actions UI. It is locked down with the same
permissions as the version bump action.

* Refactor to use updatecli

* Remove gradle task in favor of updatecli

* remove unused file

* Dynamically generate java version lookup

* make pipeline name unique'
'

(cherry picked from commit 2fab5f4)

# Conflicts:
#	catalog-info.yaml

* fix merge conflicts

---------

Co-authored-by: Cas Donoghue <[email protected]>
donoghuc added a commit that referenced this pull request Sep 24, 2025
…on (#18213)

* Replace buildkite jdk version check w/GH action (#17945)

* Replace buildkite jdk version check w/GH action

Previously a weekly buildkite job would check if there is a newer JDK available
than the one vendored in logstash. This job would fail until someone manually
updated the JDK version in the `versions.yml` file in logstash. This commit
reduces manual intervention by moving the responsibility to a GH action where
there are patterns for creating PRs back to logstash. The action should run
weekly and also be available in the actions UI. It is locked down with the same
permissions as the version bump action.

* Refactor to use updatecli

* Remove gradle task in favor of updatecli

* remove unused file

* Dynamically generate java version lookup

* make pipeline name unique'
'

(cherry picked from commit 2fab5f4)

# Conflicts:
#	catalog-info.yaml

* fix merge concflicts

---------

Co-authored-by: Cas Donoghue <[email protected]>
v1v pushed a commit that referenced this pull request Oct 21, 2025
* Replace buildkite jdk version check w/GH action

Previously a weekly buildkite job would check if there is a newer JDK available
than the one vendored in logstash. This job would fail until someone manually
updated the JDK version in the `versions.yml` file in logstash. This commit
reduces manual intervention by moving the responsibility to a GH action where
there are patterns for creating PRs back to logstash. The action should run
weekly and also be available in the actions UI. It is locked down with the same
permissions as the version bump action.

* Refactor to use updatecli

* Remove gradle task in favor of updatecli

* remove unused file

* Dynamically generate java version lookup

* make pipeline name unique'
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants