Skip to content

Split SBRP license scanning into separate sub-scans - #6051

Merged
mthalman merged 6 commits into
dotnet:release/10.0.1xxfrom
mthalman:port/pr-6009-to-port-license-scan-timeout-fix
Apr 16, 2026
Merged

mthalman merged 6 commits into
dotnet:release/10.0.1xxfrom
mthalman:port/pr-6009-to-port-license-scan-timeout-fix

Conversation

@mthalman

Copy link
Copy Markdown
Member

Backport of #6009

mthalman and others added 5 commits April 15, 2026 12:51
Split the source-build-reference-packages license scan into separate
pipeline jobs - one per subdirectory under src/source-build-reference-packages/src/
plus a root scan with --ignore src for non-src content. This avoids
the scancode timeout caused by processing too many files in a single run
(dotnet/source-build#5470).

Co-authored-by: Copilot <[email protected]>
- Derive repoName from _relativeScanPath instead of the absolute path
  to avoid matching an earlier src/ segment in the filesystem hierarchy.
- Build scancode ignore patterns dynamically from subdirectory names
  instead of ignoring 'src' wholesale, so files directly under src/
  (e.g. SourceBuildAssemblyMetdata.cs) are still scanned by the root job.

Co-authored-by: Copilot <[email protected]>
The semicolons in the SourceBuildTestsLicenseScanIgnorePatterns value
were interpreted by bash as command separators since the script block
uses YAML folded scalar (single line). Switch to comma as the
delimiter in both the pipeline and C# code.

Co-authored-by: Copilot <[email protected]>
MSBuild interprets commas in /p: values as property separators.
Quote the entire argument so the comma-delimited list is treated
as a single property value.

Co-authored-by: Copilot <[email protected]>
Commas are special to MSBuild even when quoted on the command line.
Switch to space-delimited patterns which are safe for bash, MSBuild,
and JSON. The quoted argument ensures bash treats the space-separated
list as a single value.

Co-authored-by: Copilot <[email protected]>
@mthalman
mthalman requested review from a team as code owners April 15, 2026 17:55

@NikolaMilosavljevic NikolaMilosavljevic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Once this PR is merged I'll rebase my pending PR for sbrp rename and make additional changes to account for that rename.

@mthalman
mthalman enabled auto-merge (squash) April 15, 2026 18:01
…or call

The ExclusionsHelper constructor takes 3 parameters (exclusionsFileName,
baselineSubDir, exclusionRegexString) but the call was passing 4 arguments
including Config.LogsDirectory which is not needed since
GenerateNewBaselineFile already references Config.LogsDirectory directly.

Co-authored-by: Copilot <[email protected]>
@mthalman
mthalman merged commit e18162d into dotnet:release/10.0.1xx Apr 16, 2026
11 checks passed
@mthalman
mthalman deleted the port/pr-6009-to-port-license-scan-timeout-fix branch April 16, 2026 14:29
@mthalman

Copy link
Copy Markdown
Member Author

/backport to release/10.0.2xx

@mthalman

Copy link
Copy Markdown
Member Author

/backport to release/10.0.3xx

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/10.0.2xx (link to workflow run)

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/10.0.3xx (link to workflow run)

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