Skip to content

INFRA-26918 - Clean often corrupted folder on Jenkins#18404

Merged
apupier merged 1 commit intoapache:mainfrom
apupier:26918-cleanPotentiallyCorrupted.m2
Jun 19, 2025
Merged

INFRA-26918 - Clean often corrupted folder on Jenkins#18404
apupier merged 1 commit intoapache:mainfrom
apupier:26918-cleanPotentiallyCorrupted.m2

Conversation

@apupier
Copy link
Contributor

@apupier apupier commented Jun 19, 2025

The Jenkins slave is often corrupted failing the build with this error message:

Caused by: org.eclipse.aether.RepositoryException: Could not parse
metadata /home/jenkins/.m2/repository/org/apache/camel/camel-buildtools/maven-metadata-local.xml:
in epilog non whitespace content is not allowed but got a (position:
END_TAG seen ...</metadata>\na... @34:2)

So when cleaning the workspace, deleting the parent folder. Not deleting the whole .m2 as this would slow down too much the build. Deleting the whole folder to avoid having data not in phase inside the folder.

Description

Target

  • I checked that the commit is targeting the correct branch (Camel 4 uses the main branch)

Tracking

  • If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.
  • I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

The Jenkins slave is often corrupted failing the build with this error
message:
```
Caused by: org.eclipse.aether.RepositoryException: Could not parse
metadata /home/jenkins/.m2/repository/org/apache/camel/camel-buildtools/maven-metadata-local.xml:
in epilog non whitespace content is not allowed but got a (position:
END_TAG seen ...</metadata>\na... @34:2)
```

So when cleaning the workspace, deleting the parent folder. Not deleting
the whole .m2 as this would slow down too much the build. Deleting the
whole folder to avoid having data not in phase inside the folder.

Signed-off-by: Aurélien Pupier <apupier@redhat.com>
@davsclaus
Copy link
Contributor

ah good idea thanks

@apupier
Copy link
Contributor Author

apupier commented Jun 19, 2025

https://issues.apache.org/jira/browse/INFRA-26918?focusedCommentId=17983459&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17983459

even if it won't fix the root issue. This is currently failing too often to be sustainable. i tried to provide a PR to remove the mentioned parent folder #18404 but I do not know how to test that without commiting on main branch and waiting for a new build.
Is it possible to try to modify the job on the CI itself?

@apupier
Copy link
Contributor Author

apupier commented Jun 19, 2025

so far I spotted that it was always on the same file so finger crossed that it is this specific file only.
And checked that the Clean workspace is called at the beginning so shoudl be able to try directly (I mean no need to first clean the workspace manually)

@apupier apupier marked this pull request as ready for review June 19, 2025 07:11
@apupier apupier merged commit 9be8181 into apache:main Jun 19, 2025
2 checks passed
@apupier apupier deleted the 26918-cleanPotentiallyCorrupted.m2 branch June 19, 2025 07:11
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.

2 participants