You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ci] License checks leave directory streams open on traversal failure - #10449
CI license checks can leave directory resources open when traversal or filtering fails in JarFileChecker.getBuildJars() or NoticeFileChecker.findNoticeFiles(). Wrap both Files.walk() streams in try-with-resources to ensure cleanup on success and failure.
Tests
mvn -o -pl tools/ci/paimon-ci-tools -DwildcardSuites=none -Dtest=JarFileCheckerTest,NoticeFileCheckerTest test passed: 27 tests, including Checkstyle and Spotless checks.
git diff --check passed.
No new tests were added for this resource-lifetime change.
Closing under the requested production/end-to-end contribution triage.
I traced both walkers to LicenseChecker.main and the current artifact-licensing workflow. The checker runs once in an isolated mvn exec:java ... -N step; a traversal/filtering exception aborts that step. The proposed try-with-resources change does not change a licensing result, recover the failed check, or address a demonstrated long-lived/repeated caller. Successful exhaustive Files.walk traversal already closes its directory iterators. The linked #10138 concerns Files.list during sink configuration loading, where resources can remain open after successful loading; that is a different lifecycle.
The implementation is straightforward and the 27 JarFileCheckerTest / NoticeFileCheckerTest tests passed on JDK 8 with standard Maven validation. For this standalone CI failure path, the current evidence supports resource-cleanup hygiene but does not establish an end-to-end production or CI reliability outcome that warrants a separate contribution. A real repeated invocation, recovery path, or failing licensing workload caused by retained directory resources would justify reopening with targeted evidence.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Fixes #10445.
CI license checks can leave directory resources open when traversal or filtering fails in
JarFileChecker.getBuildJars()orNoticeFileChecker.findNoticeFiles(). Wrap bothFiles.walk()streams in try-with-resources to ensure cleanup on success and failure.Tests
mvn -o -pl tools/ci/paimon-ci-tools -DwildcardSuites=none -Dtest=JarFileCheckerTest,NoticeFileCheckerTest testpassed: 27 tests, including Checkstyle and Spotless checks.git diff --checkpassed.