Skip to content

Conversation

sasa-boros-cp
Copy link

Fix the reported issue that the reporter doesn't include the license files found in the subdirectories, which happens as a given when using the ARTIFACT source code origin.

@sasa-boros-cp sasa-boros-cp requested a review from a team as a code owner August 26, 2025 08:27
Copy link

codecov bot commented Aug 27, 2025

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 57.41%. Comparing base (c4a0391) to head (a1383c3).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...rc/main/kotlin/config/FileArchiverConfiguration.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #10772      +/-   ##
============================================
+ Coverage     57.38%   57.41%   +0.02%     
- Complexity     1671     1674       +3     
============================================
  Files           346      346              
  Lines         12759    12764       +5     
  Branches       1209     1208       -1     
============================================
+ Hits           7322     7328       +6     
  Misses         4972     4972              
+ Partials        465      464       -1     
Flag Coverage Δ
funTest-docker 71.15% <ø> (ø)
test-ubuntu-24.04 41.93% <92.30%> (+0.03%) ⬆️
test-windows-2025 41.91% <92.30%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@@ -89,7 +89,7 @@ fun FileArchiverConfiguration?.createFileArchiver(): FileArchiver? {
)
}

val patterns = LicenseFilePatterns.getInstance().allLicenseFilenames
val patterns = LicenseFilePatterns.getInstance().allLicenseFilenames.map { "/**/$it" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I'm unsure whether this goes against the original purpose of the license file archiver. It could be that we intentionally only wanted to archive license files in the root. I guess we need to discuss this with @oss-review-toolkit/tsc.

Copy link
Author

@sasa-boros-cp sasa-boros-cp Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My two cents here. The LICENSE and NOTICE files are hardly ever located in the root of the source artifacts, but in the META-INF folder, and can be at different depths inside. When the source code origin is VCS, then the root is the most common place, yes. So one idea might be to handle these two cases differently.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sschuberth, is there any progress regarding the review and is there any way I can contribute further? Might be the least affecting option to look at root for VCS, and META-INF for ARTIFACT source code origin. Let me know what you think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and META-INF for ARTIFACT source code origin.

However, that would only work for Maven artifacts, so it's not really a generic solution.

Unfortunately, none of @oss-review-toolkit/tsc have chimed in so far to this discussion. I can put it onto the agenda for today's meeting, but the agenda already is quite full. So no promises about any progress, sorry 😞

Copy link
Member

@sschuberth sschuberth Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we chould have a (hard-coded or configurable) list of allowed parent directories. For RepositoryProvenance this would always include the VCS path, but also a list of other directories like META-INF, and possible more for non-Maven source artifacts.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sschuberth thanks for answering. That is also an interesting choice that involves a bit more changes, but overall doesn't break the structure. I will take a look, but I am also looking forward to tsc joining the discussion. :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussing this during our meeting, we decided to go for a more "minimally-invasive" approach that does not change the number of files getting archives. Please see #10828 for an alternative approach.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking into it, thanks!

@sschuberth sschuberth requested a review from a team September 9, 2025 08:28
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