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 an issue with CuratedPackage.toUncuratedPackage() #6413

Merged
merged 6 commits into from
Feb 1, 2023

Conversation

fviernau
Copy link
Member

@fviernau fviernau commented Jan 30, 2023

Get rid of the "not always correctly working" [1] toUncuratedPackage() by utilizing the original uncurated packages from the OrtResult. While at it, do a couple of clean-ups for related OrtResult getters and their callers.

[1] #5637.

BREAKING CHANGE: Only for programmatic use of ORT:

  1. uncurated packages should be obtained now from the OrtResult instead of from the removed toUncuratedPackage().
  2. Some API functions get renamed, so the name change must be reflected.

@fviernau
Copy link
Member Author

Could it be commit-lint is running into this bug? conventional-changelog/commitlint#896

@fviernau fviernau marked this pull request as ready for review January 31, 2023 08:13
@fviernau fviernau requested review from a team and oheger-bosch as code owners January 31, 2023 08:13
Simplify a following change.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
The implementation of `toUncuratedPackage()` does not work for `null`
values in all cases due to lack of data, see also #5637.

The representation of `OrtResult` has been changed recently to store the
original / uncurated packages instead of the curated ones. So, make use
of that new representation to always obtain the correct uncurated
package.

Fixes #5637.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Make the naming consistent with getPackageOrProject().

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
The function is very similar to getUncuratedPackageOrProject(), so it
should be located nearby for consistency.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Return a `CuratedPackage` instead of a `Package` to make it clearer that
the returned package is actually curated.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Make the implementation consistent with
`getUncuratedPackageOrProject()`.

Note: The implementation now also better aligns with the function name.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
@mnonnenmacher
Copy link
Member

mnonnenmacher commented Feb 1, 2023

Could it be commit-lint is running into this bug? conventional-changelog/commitlint#896

Looks like it, maybe the #5637 in the body triggers the line to be read as footer because the commitlint output shows an empty line before the second line of the body. Maybe you can find a workaround, FYI you can run commitlint locally like this npx commitlint --from HEAD~2.

@fviernau fviernau merged commit f7d9f54 into main Feb 1, 2023
@fviernau fviernau deleted the to-uncurated-package branch February 1, 2023 13:00
@fviernau
Copy link
Member Author

fviernau commented Feb 1, 2023

Merged despite unrelated test failures.

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.

2 participants