Skip to content

fix(spdxdocumentfile): Get VcsInfo from downloadLocation by default - #12253

Open
losmateusz1 wants to merge 1 commit into
oss-review-toolkit:mainfrom
losmateusz1:fix/spdx_vcs_detection
Open

fix(spdxdocumentfile): Get VcsInfo from downloadLocation by default#12253
losmateusz1 wants to merge 1 commit into
oss-review-toolkit:mainfrom
losmateusz1:fix/spdx_vcs_detection

Conversation

@losmateusz1

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 58.87%. Comparing base (ffc4ebd) to head (f7eab5d).
⚠️ Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
...ument-file/src/main/kotlin/utils/SpdxExtensions.kt 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #12253   +/-   ##
=========================================
  Coverage     58.87%   58.87%           
  Complexity     1841     1841           
=========================================
  Files           362      362           
  Lines         13657    13657           
  Branches       1414     1414           
=========================================
  Hits           8041     8041           
  Misses         5106     5106           
  Partials        510      510           
Flag Coverage Δ
funTest-external-tools 14.72% <0.00%> (+0.10%) ⬆️
test-ubuntu-26.04 43.27% <0.00%> (ø)
test-windows-2025 43.25% <0.00%> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

@losmateusz1
losmateusz1 force-pushed the fix/spdx_vcs_detection branch 2 times, most recently from fc29e74 to 9664353 Compare August 4, 2026 10:56
@losmateusz1
losmateusz1 marked this pull request as ready for review August 4, 2026 10:57
@losmateusz1
losmateusz1 requested a review from a team as a code owner August 4, 2026 10:57
@sschuberth

Copy link
Copy Markdown
Member

Please provide a rationale in the commit message why it should be done that way. I guess there was a reason for the current code to work that way, also see 5294db5, which you seem to be basically reverting.

Also note that there probably is no single "right way" to do it, as it might depend on the use-case. Again, also see #8788.

@losmateusz1
losmateusz1 force-pushed the fix/spdx_vcs_detection branch 2 times, most recently from 967d4c9 to 5ef79c8 Compare August 17, 2026 12:59
If downloadLocation is set to vcs sources, it should always be
in use first, as in many cases spdx files are being scanned
from dedicated repositories that don't contain sources of
declared components or project that is being scanned with
spdx manager.
Getting vcs source information from project dir will be
neccessary in specific cases, where some internally
developed dependencies are in use during scan.

Signed-off-by: Mateusz Los <extern.mateusz.los@cariad.technology>
@losmateusz1
losmateusz1 force-pushed the fix/spdx_vcs_detection branch from 5ef79c8 to f7eab5d Compare August 17, 2026 17:30
@sschuberth

Copy link
Copy Markdown
Member

as in many cases spdx files are being scanned from dedicated repositories that don't contain sources of declared components or project that is being scanned with spdx manager.

This is exactly the disputable part of the rationale, I believe, as originally the SPDX analyzer was designed to describe projects (incl. their sources) that do not use any of the known package managers.

So I believe we cannot merge this without breaking the experience for existing users. Esp. @MarcelBochtler may want to comment.

@losmateusz1

Copy link
Copy Markdown
Contributor Author

ok, I still think that it's a little confusing that by default, ORT will always ignore downloadLocation when project VCS info is detectable, in practice there won't be possibility to get this information from downloadLocation, because in most cases you scan a project that was cloned from some repository, so better idea seems to use downloadLocation if there is any, and if all sources needs to be downloaded from project dir, downloadLocation field could be set to project repo for all components.

@sschuberth

Copy link
Copy Markdown
Member

Esp. @MarcelBochtler may want to comment.

Also pinging @oheger-bosch, FYI.

@sschuberth sschuberth added the on hold Pull requests that cannot currently be merged label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on hold Pull requests that cannot currently be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants