Skip to content

Diagnostics for Python DASH license enrichment - #14

Closed
umaucher wants to merge 1 commit into
eclipse-score:mainfrom
umaucher:um_dash_requirements_lockfile
Closed

umaucher wants to merge 1 commit into
eclipse-score:mainfrom
umaucher:um_dash_requirements_lockfile

Conversation

@umaucher

@umaucher umaucher commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Adds diagnostics for Python DASH license enrichment and rejects empty summaries.

  • Log the lockfile paths at scan start and elapsed time, return code, summary path, size, row count, and usability at completion.
  • Extend the subprocess timeout from 10 to 30 minutes and report timeouts distinctly.
  • Treat an empty summary as unavailable so it is not mistaken for successful enrichment. Scan failures remain non-fatal to SBOM generation.
  • Add tests for timeout and empty-summary handling.

Validated with bazel test //tests:test_generate_python_metadata_cache --test_output=errors.

@umaucher
umaucher force-pushed the um_dash_requirements_lockfile branch 2 times, most recently from 22ea694 to 6432b97 Compare September 28, 2026 08:04
@umaucher umaucher changed the title Fix Python lockfile metadata scanning Diagnostics for Python DASH license enrichment Sep 28, 2026
@umaucher
umaucher force-pushed the um_dash_requirements_lockfile branch from 6432b97 to 403493c Compare September 28, 2026 08:06
@umaucher
umaucher force-pushed the um_dash_requirements_lockfile branch from 403493c to 2b64b7f Compare September 28, 2026 08:07
@umaucher
umaucher marked this pull request as ready for review September 28, 2026 08:09
@masc2023
masc2023 requested a lite review from Copilot September 28, 2026 08:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Use the parsed non-empty row count so whitespace-only summaries are treated as unavailable.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds diagnostics and failure handling for Python DASH license enrichment.

Changes:

  • Extends timeout handling to 30 minutes with distinct timeout diagnostics.
  • Logs scan and summary metrics.
  • Adds timeout and empty-summary tests.
File Summary
scripts/​generate_python_metadata_cache.py Adds diagnostics, timeout handling, and summary validation; whitespace-only summaries remain incorrectly usable.
tests/​test_generate_python_metadata_cache.py Adds timeout and empty-summary coverage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

if summary.is_file()
else 0
)
summary_usable = summary_bytes > 0
]
start_time = time.monotonic()
print(
f"INFO: Starting DASH Python license scan for {len(lockfiles)} lockfile(s): "

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

doesnt in already print that info on startup?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe pass -v parameter if you want more output?

@umaucher umaucher Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@umaucher

umaucher commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

replaced by #15

@umaucher umaucher closed this Oct 1, 2026
@umaucher
umaucher deleted the um_dash_requirements_lockfile branch October 1, 2026 09:04
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.

3 participants