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

fix bug triggering #117, leading to loosing components during "bom map" #119

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

gernot-h
Copy link
Collaborator

As described in #117, invalid SW360 version numbers (which can't be parsed by ComparableVersion) lead to an exception caught quite late, leading to "bom map" forgetting a component in the output BOM.

This PR makes the exception being caught in time, but in my eyes doesn't completely fix #117 as other exceptions in the long code base of map_bom_* can lead to the same problem, so we should still discuss error handling in #117.

@gernot-h
Copy link
Collaborator Author

This also contains an unrelated change to a TODO comment which was still referencing an old, internal code.siemens.com issue and is now updated to the new Github issue I created today.

In case of paring errors in the version number, an empty
ComparableVersion object was created, leading to an exception in release
sorting in map_bom_item_no_cache(). This was caught by the caller
map_bom_to_releases(), but lead to this component being missing
completely from the output BOM.

This fixes the obvious part of #117. However, I still think that the
catch-all exception handling in map_bom_to_releases() should be
re-considered.
The was a reference to our old, internal issue tracker, so I migrated
this issue to Github #118 and updated the reference.
@gernot-h gernot-h force-pushed the gernot/fix-trigger-of-117 branch from f450fd3 to ad73a3f Compare January 14, 2025 19:42
@tngraf tngraf merged commit bed4f1c into main Jan 24, 2025
7 checks passed
@gernot-h gernot-h deleted the gernot/fix-trigger-of-117 branch January 28, 2025 09:12
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.

"bom map" only prints an error, but doesn't exit with failure on internal mapping issue
2 participants