Skip to content

Issue #12711: fix versions validation to use xmlstarlet with new XML format#19426

Merged
romani merged 1 commit into
checkstyle:masterfrom
ayushactiveat:issue-12711-fix-versions-validation
Mar 26, 2026
Merged

Issue #12711: fix versions validation to use xmlstarlet with new XML format#19426
romani merged 1 commit into
checkstyle:masterfrom
ayushactiveat:issue-12711-fix-versions-validation

Conversation

@ayushactiveat

Copy link
Copy Markdown
Contributor

fixes #12711
Updated .ci/validation.sh to use xmlstarlet to parse the xml reports. the script now correctly detects outdated dependencies
and plugins by checking for status != 'no new available'

@ayushactiveat ayushactiveat force-pushed the issue-12711-fix-versions-validation branch from 8cec9c6 to d46e05f Compare March 24, 2026 01:18
@ayushactiveat ayushactiveat force-pushed the issue-12711-fix-versions-validation branch from d46e05f to 3e3e05d Compare March 24, 2026 01:22
@ayushactiveat

ayushactiveat commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

@romani unrelated fail, please let me know if any other change needed

@romani

romani commented Mar 24, 2026

Copy link
Copy Markdown
Member

Hmm, we use dependabot now for this reason.

In what CI we run this job?

We can merge update as backup option. But better to run it in CI .

@ayushactiveat

ayushactiveat commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

@romani versions job is called from .ci/validation.sh , runs in checkstyl cicleci pipelie, as 'job versions' in this pr's check and passed. this script acts like a backup validation layer with dependabot, since bot handle bumps but this fails the build if outdated dependencies are defected in ci

Comment thread .ci/validation.sh
@@ -196,15 +196,23 @@ test-al)
versions)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

# versions to update
'versions':
image: 'ubuntu-24.04'
cmd: "./.ci/validation.sh versions"
onCronOnly: true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@romani thanks for finding that. yes it runs on cron only in azure. the fix ensures the script correctly parses the new xml format when it does run.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need some prove that it works.
Please do git checkout to some commit that is 2 months ago. Apply your commit and run. And share whole output of execution, I want to see how it can find new versions. We constantly update dependency, so it should catch what we updated recently

@ayushactiveat ayushactiveat Mar 25, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@romani proof-> checked out commit 5e7a67e (from -2 months ago), applied the fix, and ran ./.ci/validation.sh versions. output i got :

New dependency versions:
com.google.truth:truth 1.4.4 -> 1.4.5
nl.jqno.equalsverifier:equalsverifier 4.3 -> 4.4.1
org.apache.maven.doxia:doxia-core 1.12.0 -> 2.1.0
org.apache.maven.doxia:doxia-module-xdoc 1.12.0 -> 2.1.0
org.checkerframework:checker-qual 3.53.0 -> 3.54.0
org.eclipse.jgit:org.eclipse.jgit 7.5.0.202512021534-r -> 7.6.0.202603022253-r

New plugin versions:
edu.illinois:nondex-maven-plugin 2.2.1 -> 2.2.5
org.apache.maven.plugins:maven-compiler-plugin 3.14.1 -> 3.15.0
org.apache.maven.plugins:maven-failsafe-plugin 3.5.4 -> 3.5.5
org.apache.maven.plugins:maven-resources-plugin 3.4.0 -> 3.5.0
org.apache.maven.plugins:maven-surefire-plugin 3.5.4 -> 3.5.5
org.gaul:modernizer-maven-plugin 3.2.0 -> 3.3.0

Verification is failed.

i think this fix detects all outdated dependencies/plugins using the new xml format

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice !

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks a lot

@romani romani merged commit b4ef842 into checkstyle:master Mar 26, 2026
122 of 123 checks passed
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.

validation of versions is not working as expected anymore

2 participants