Skip to content

Conversation

@lamppu
Copy link
Contributor

@lamppu lamppu commented Jun 13, 2025

Add a new issues property to the ScannerRun class and collect issues from completely failing scans for path scanners in the issues map instead of creating and storing empty scan results.

Please see the individual commits for details.

@lamppu lamppu requested a review from a team as a code owner June 13, 2025 14:03
@lamppu lamppu force-pushed the 10054-fix-failed-scan-results-reused branch from 6b1b951 to 38b6494 Compare June 13, 2025 14:17
@codecov
Copy link

codecov bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.75%. Comparing base (23a177b) to head (fd11299).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #10475   +/-   ##
=========================================
  Coverage     56.75%   56.75%           
+ Complexity     1644     1642    -2     
=========================================
  Files           337      337           
  Lines         12480    12480           
  Branches       1177     1177           
=========================================
  Hits           7083     7083           
  Misses         4945     4945           
  Partials        452      452           
Flag Coverage Δ
funTest-docker 71.03% <ø> (ø)
funTest-non-docker 32.97% <ø> (-0.14%) ⬇️
test-ubuntu-24.04 41.04% <ø> (ø)
test-windows-2022 41.02% <ø> (ø)

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.

@lamppu lamppu force-pushed the 10054-fix-failed-scan-results-reused branch from 38b6494 to b2d6421 Compare June 13, 2025 15:19
@fviernau fviernau dismissed their stale review June 15, 2025 07:33

change request not acceptable, because we must stick to previous decision.

@lamppu lamppu force-pushed the 10054-fix-failed-scan-results-reused branch from b2d6421 to 2d40d5b Compare June 16, 2025 12:43
@sschuberth sschuberth requested a review from mnonnenmacher June 17, 2025 09:04
@sschuberth sschuberth dismissed their stale review June 17, 2025 09:04

Comments addressed.


/**
* A map of [Identifier]s associated with a list of [Issue]s that occurred during a scan besides the issues
* A map of [Identifier]s associated with a set of [Issue]s that occurred during a scan besides the issues
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if this should already close #10054 because ORT does still provide no way to delete broken scan results from the storage that were created before this change. @sschuberth What do 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.

You have a point there, but I guess the best we could do is to provide users with a tool / helper-cli command to remove those bogus stored scan results with issues that contain a certain kind of message. As we'd never know if and when users would run the tool, I'd also be fine with closing the issue now, as the root cause is fixed, and provide the mentioned tooling as a follow-up.

Copy link
Contributor Author

@lamppu lamppu Jun 18, 2025

Choose a reason for hiding this comment

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

The issue also has the following problem described, which this PR doesn't address actually, so I wasn't completely sure otherwise either if this should close the issue:

it should report the error message it gets from ScanCode instead of ignoring the error and throwing a generic FileNotFoundException when it does not find the report

Copy link
Member

Choose a reason for hiding this comment

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

I'll leave the decision to you two, I'm fine with either outcome.

Copy link
Member

Choose a reason for hiding this comment

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

I created #10495 to address that part.

lamppu added 3 commits June 18, 2025 10:58
Add a map for gathering issues that occurred during a scan but which aren't
a part of the scan summaries. This will be used to collect issues from
failing scans to prevent having to create and save empty scan results which
can then cause problems when reading and reusing existing scan results.

Signed-off-by: Johanna Lamppu <[email protected]>
As there is now a way to add scan issues that are not tied to scan results,
add these issues separately to the `EvaluatedModel` in the
`EvaluateModelMapper`.

Signed-off-by: Johanna Lamppu <[email protected]>
To resolve an issue where scan results from failed scans were reused even
if the problem was resolved in newer scans, change the behavior of the
path scanners so that they don't create empty scan results just to keep
track of issues, and instead collect these kinds of issues to the
`ScannerRun` issues map.

Resolves oss-review-toolkit#10054.

Signed-off-by: Johanna Lamppu <[email protected]>
@lamppu lamppu force-pushed the 10054-fix-failed-scan-results-reused branch from 2d40d5b to fd11299 Compare June 18, 2025 07:58
@lamppu lamppu requested a review from mnonnenmacher June 18, 2025 08:05
@sschuberth sschuberth merged commit d5401bd into oss-review-toolkit:main Jun 18, 2025
25 checks passed
@sschuberth sschuberth deleted the 10054-fix-failed-scan-results-reused branch June 18, 2025 16:34
MarcelBochtler added a commit to boschglobal/ort-server that referenced this pull request Jun 23, 2025
This is required to support the scanenr issues from an ORT `ScannerRun`
introduced in [1].

[1]: oss-review-toolkit/ort#10475

Signed-off-by: Marcel Bochtler <[email protected]>
MarcelBochtler added a commit to boschglobal/ort-server that referenced this pull request Jun 24, 2025
[1] added scanner issues to the `ScannerRun`.
Add support for this in the server by persisting the issues in the
respective database table.

[1]: oss-review-toolkit/ort#10475

Signed-off-by: Marcel Bochtler <[email protected]>
MarcelBochtler added a commit to boschglobal/ort-server that referenced this pull request Jun 24, 2025
[1] added scanner issues to the `ScannerRun`.
Add support for this in the server by persisting the issues in the
respective database table.

[1]: oss-review-toolkit/ort#10475

Signed-off-by: Marcel Bochtler <[email protected]>
MarcelBochtler added a commit to boschglobal/ort-server that referenced this pull request Jun 24, 2025
[1] added scanner issues to the `ScannerRun`.
Add support for this in the server by persisting the issues in the
respective database table.

[1]: oss-review-toolkit/ort#10475

Signed-off-by: Marcel Bochtler <[email protected]>
MarcelBochtler added a commit to boschglobal/ort-server that referenced this pull request Jun 24, 2025
[1] added scanner issues to the `ScannerRun`.
Add support for this in the server by persisting the issues in the
respective database table.

[1]: oss-review-toolkit/ort#10475

Signed-off-by: Marcel Bochtler <[email protected]>
MarcelBochtler added a commit to boschglobal/ort-server that referenced this pull request Jun 24, 2025
[1] added scanner issues to the `ScannerRun`.
Add support for this in the server by persisting the issues in the
respective database table.

[1]: oss-review-toolkit/ort#10475

Signed-off-by: Marcel Bochtler <[email protected]>
MarcelBochtler added a commit to boschglobal/ort-server that referenced this pull request Jun 25, 2025
[1] added scanner issues to the `ScannerRun`.
Add support for this in the server by persisting the issues in the
respective database table.

[1]: oss-review-toolkit/ort#10475

Signed-off-by: Marcel Bochtler <[email protected]>
MarcelBochtler added a commit to boschglobal/ort-server that referenced this pull request Jun 26, 2025
[1] added scanner issues to the `ScannerRun`.
Add support for this in the server by persisting the issues in the
respective database table.

[1]: oss-review-toolkit/ort#10475

Signed-off-by: Marcel Bochtler <[email protected]>
MarcelBochtler added a commit to boschglobal/ort-server that referenced this pull request Jun 26, 2025
Persist the issues from `ScannerRun` to the database. The logic for
populating these issues in `ScannerRun` was introduced in [1].

[1]: oss-review-toolkit/ort#10475

Signed-off-by: Marcel Bochtler <[email protected]>
MarcelBochtler added a commit to boschglobal/ort-server that referenced this pull request Jun 26, 2025
Persist the issues from `ScannerRun` to the database. The logic for
populating these issues in `ScannerRun` was introduced in [1].

[1]: oss-review-toolkit/ort#10475

Signed-off-by: Marcel Bochtler <[email protected]>
github-merge-queue bot pushed a commit to eclipse-apoapsis/ort-server that referenced this pull request Jun 26, 2025
Persist the issues from `ScannerRun` to the database. The logic for
populating these issues in `ScannerRun` was introduced in [1].

[1]: oss-review-toolkit/ort#10475

Signed-off-by: Marcel Bochtler <[email protected]>
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.

4 participants