-
Notifications
You must be signed in to change notification settings - Fork 143
Prevent FileNotFoundException when reading .lastUpdated tracking files #1691
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
Conversation
Reading tracking metadata could fail with a java.io.FileNotFoundException during concurrent repository access or cleanup, causing update checks and dependency collection to break. This patch adds a dedicated FileNotFoundException catch block in DefaultTrackingFileManager.read(), allowing the resolver to safely ignore missing or invalid tracking files and return null instead of failing.
358d5b4 to
ecedc12
Compare
|
Can you tell us more, the CI where you get substantial number of FNFEx:
|
|
Ubuntu 22.04.5 LTS |
|
Thanks! |
|
Related: #1003 |
|
No specific reason, I can upgrade the version to 3.9.11 if you say that. |
|
I am -1 on this PR, and here is why: My plan is this:
I am still open to add FNFEx to ignored exceptions though. |
|
Ignoring the FNF would resolve the issue for us. Should I remove the tests from this PR and keep only the fix, or should this change go into master/some other branch instead? |
|
Pls take a peek at #1692 IMO, this should fix your issue; I will backport this fix from master to 1.9.x as well, so both, Maven 4-rc-6 and Maven 3.9.12 should have it. |
In our CI pipelines we are encountering a substantial number of exceptions like:
These errors occur when a
.lastUpdatedtracking file is missing during concurrent repository access, leading the build to fail even though the file absence is harmless.This patch introduces a safe fallback by catching
FileNotFoundExceptioninDefaultTrackingFileManager.read(). Missing or concurrently removed tracking files are now treated as non-fatal, preventing unnecessary build failures.