-
Notifications
You must be signed in to change notification settings - Fork 318
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
Allow project-local package-configurations #4386
Allow project-local package-configurations #4386
Conversation
configurations: | ||
package_configurations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not completely happy with the naming here, but wanted to reuse package_configurations
as they are a known term within ORT.
Any suggestions for a better naming?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd personally either go for package_configurations
as single top level entry, or
configurations:
packages:
Tendency to the former.
What's the reason for nesting it in Configurations
? Consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for nesting it in
Configurations
? Consistency?
Yes. That is the only reason. I'll change it to package_configurations
as a single top level entry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get @oss-review-toolkit/core-devs input on that first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already changed it, as I didn't see your answer. However: I'd be fine with changing it back after some input from the other @oss-review-toolkit/core-devs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also prefer a single top level entry package_configurations
. Similarly curation
could be added as another top level entry later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly
curation
could be added as another top level entry later.
@mnonnenmacher I didn't get this bit. Do you mean refactoring as follows ?
curations:
license_findings:
packages:
to
package_curations:
license_finding_curations:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also prefer a single top level entry package_configurations. Similarly curation could be added as another top level entry later.
Curations were already added in this PR: #4381
in this form:
curations:
packages:
- id: "Maven:id..."
curations:
....
Is this how it should work? For package curations it is different: ORT merges the curations from a single source and all curations are applied. |
configurations: | ||
package_configurations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd personally either go for package_configurations
as single top level entry, or
configurations:
packages:
Tendency to the former.
What's the reason for nesting it in Configurations
? Consistency?
Unique per ID and provenance: yes, that's how it's intended.s It may make sense to enforce uniqueness within global and local configuration separately, and at the same time |
Signed-off-by: Marcel Bochtler <[email protected]>
Package-configurations must be unique per ID and provenance even if one configuration is placed in the `.ort.yml` and the other one is placed in an ORT-wide package-configurations directory. Signed-off-by: Marcel Bochtler <[email protected]>
Signed-off-by: Marcel Bochtler <[email protected]>
2aa2759
to
c736fcd
Compare
What would be the reasoning to disallow merging of package-configurations from one source? @fviernau Do you think that the decision / implementation of merging package-configurations is blocking this PR? |
Codecov Report
@@ Coverage Diff @@
## master #4386 +/- ##
=========================================
Coverage 68.82% 68.82%
Complexity 519 519
=========================================
Files 176 176
Lines 6873 6873
Branches 893 893
=========================================
Hits 4730 4730
Misses 1715 1715
Partials 428 428 Continue to review full report at Codecov.
|
I think that's clearly bad practice as I cannot see any advantage of setting up multiple package configs for a single
Possible yes. As written above I believe it should not be implemented. I'm find with the PR as-is: without the merging implemented. |
Package-configurations must be unique per ID and provenance even
if one configuration is placed in the
.ort.yml
and the other oneis placed in an ORT-wide package-configurations directory.
See:
ort/model/src/main/kotlin/utils/SimplePackageConfigurationProvider.kt
Lines 89 to 100 in f4c56d1