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

fix: Maven Toolchains grows unexpectedly #534

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Okeanos
Copy link
Contributor

@Okeanos Okeanos commented Sep 19, 2023

Description:
On self-hosted runners toolchains.xml may survive multiple runs and unexpectedly grow as a result of the toolchains setup simply appending the JDK definition even if one with the same type and provides.id already exists.

Restructuring the parsing step and filtering the potentially existing list of toolchain definitions prevents this and also fixes toolchain.xml files that already contain duplicates.

There is one open TODO concerning the recreation of the toolchains-root node in the xml if an existing toolchains.xml was parsed. That could and potentially should be handled better and I am open to suggestions.

Related issue:
#530

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@Okeanos Okeanos requested a review from a team as a code owner September 19, 2023 22:23
@IvanZosimov IvanZosimov linked an issue Sep 20, 2023 that may be closed by this pull request
5 tasks
@Okeanos Okeanos force-pushed the fix-maven-toolchains-duplication branch from 82fce8d to c30cb6d Compare November 29, 2023 18:55
On self-hosted runners toolchains.xml may survive multiple runs and unexpectedly
grow as a result of the toolchains setup simply appending the JDK definition
even if one with the same `type` and `provides.id` already exists.

Restructuring the parsing step and filtering the potentially existing list of
toolchain definitions prevents this and also fixes toolchain.xml files that
already contain duplicates.

Fixes actions#530
@Okeanos Okeanos force-pushed the fix-maven-toolchains-duplication branch from c30cb6d to b8162e8 Compare December 9, 2023 10:35
@fpiresca
Copy link

Hey guys, this is a potential fix for my case. I would appreciate if we can test this out or merged it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overgrowing of the toolchains.xml on the self-hosted runners
3 participants