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

FileNotFoundException when searching for poms for {artifactName}-deps-bom and {artifactName}-parent #6560

Open
mpeddada1 opened this issue Apr 30, 2024 · 3 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@mpeddada1
Copy link
Contributor

Initial investigation of FileNotFoundException:

We recently added logging for exceptions the code was previously silencing them. But I think it is surfacing two issues: 1) It seems to be creating an incorrect pomURL for google-cloud-storage-controland google-cloud-bigtable-stats (e.g. https://repo1.maven.org/maven2/com/google/cloud/google-cloud-storage-control/2.37.0-alpha/ is available on Maven central) 2) It is looking for google-cloud-bigtable-stats-deps-bom:2.39.0 when the latest version I could find on maven central is https://repo1.maven.org/maven2/com/google/cloud/google-cloud-bigtable-stats/2.37.0/. The module was removed from the bom in this PR.

For #1, it looks like this is where the pom is generated:

private static String generatePomFileUrl(Artifact artifact) {
String groupPath = artifact.getGroupId().replace('.', '/');
return DashboardMain.basePath
+ "/"
+ groupPath
+ "/"
+ artifact.getArtifactId()
+ "/"
+ artifact.getVersion()
+ "/"
+ artifact.getArtifactId()
+ "-"
+ artifact.getVersion()
+ ".pom";
}

Originally posted by @mpeddada1 in #6533 (comment)

@mpeddada1
Copy link
Contributor Author

mpeddada1 commented Apr 30, 2024

The logic to determine the shared dependencies version looks at the parentPath, the pomURL, releasePath and depsBomPath in that order. However, the presence of the parent pom is not always guaranteed and it works fine if the version is found in the parentPath but results in the FileNotFoundException if the parent pom is not found (as seen in the case of google-cloud-storage-control).

@JoeWang1127 JoeWang1127 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels May 2, 2024
@suztomo
Copy link
Member

suztomo commented May 17, 2024

@mpeddada1 Didn't you fix this?

@mpeddada1
Copy link
Contributor Author

@suztomo I have a proposed fix to verify the validity of the url before reading from it: #6564. This should address the issue of the FileNotFoundException being thrown.

However, need to do a bit more investigation to improve the logic further to avoid hardcoding certain suffixes for the pom urls (reference)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants