Skip to content

ci(pr): make InspectCode robust — full SDK set + nullglob solution discovery - #439

Open
Chris-Wolfgang wants to merge 2 commits into
mainfrom
ci/inspectcode-full-sdk-set
Open

ci(pr): make InspectCode robust — full SDK set + nullglob solution discovery#439
Chris-Wolfgang wants to merge 2 commits into
mainfrom
ci/inspectcode-full-sdk-set

Conversation

@Chris-Wolfgang

@Chris-Wolfgang Chris-Wolfgang commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Feeds back two InspectCode robustness fixes from Chris-Wolfgang/ETL-Abstractions to the canonical template. Both were latent in the canonical inspectcode job and never actually surfaced there because the job is guarded off on repo-template itself (if: github.repository != 'Chris-Wolfgang/repo-template').

1. Install the full SDK set (from ETL-Abstractions#267)

The job installed only 10.0.x, but Restore + Build (Release) builds the whole solution. Downstream solutions that multi-target out-of-support TFMs (netcoreapp3.1, net5.0, net6.0, net7.0) aren't guaranteed to restore their targeting packs under a lone 10.0.x SDK, so the build can fail even when the test stages (which install 3.1.x10.0.x) pass. Install the same SDK set.

2. Robust solution discovery (from ETL-Abstractions#274)

The "Run InspectCode" step parsed ls *.slnx to select a solution. Under GitHub's shell: bash (-e -o pipefail), a no-match ls exits 2, pipefail propagates it, and errexit aborts the step before the .sln fallback runs — so any repo that has only a .sln fails InspectCode. Replaced with nullglob + array expansion (a non-matching glob expands to nothing, correct under errexit by construction; .slnx stays preferred). Also puts ~/.dotnet/tools on PATH so jb resolves.

Verified in a local bash -e -o pipefail harness: only-.sln ✓, only-.slnx ✓, both (.slnx wins) ✓, neither (exit 1) ✓.

Out of scope (tracked separately)

The canonical InspectCode job runs on ubuntu-latest and builds the whole solution, which will also fail for downstream repos that have net4x projects (no Framework reference assemblies on Linux). ETL-Abstractions worked around this by moving to windows-latest. That broader decision is #440.

Merge note

Touches .github/workflows/pr.yaml (protected), so the protected-file guard will fail by design — needs an admin-bypass merge.

The InspectCode job installed only the 10.0.x SDK but builds the whole
solution. Downstream solutions that multi-target out-of-support TFMs
(netcoreapp3.1, net5.0, net6.0, net7.0) are not guaranteed to restore
their targeting packs under a lone 10.0.x SDK, so the solution build can
fail even when the test stages (which install 3.1.x-10.0.x) pass. Mirror
those stages so InspectCode compiles the same TFM set.

Fed back from Chris-Wolfgang/ETL-Abstractions#267.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 18, 2026 12:19

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Same fix as Chris-Wolfgang/ETL-Abstractions#274. The Run InspectCode step
parsed `ls *.slnx` to pick a solution; under GitHub's `shell: bash`
(-e -o pipefail) a no-match `ls` exits 2, pipefail propagates it, and errexit
aborts the step before the .sln fallback runs — so any repo that has only a
.sln fails InspectCode. Replace ls-parsing with nullglob + array expansion
(a non-matching glob expands to nothing, correct under errexit by
construction) and put ~/.dotnet/tools on PATH so `jb` resolves.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Chris-Wolfgang Chris-Wolfgang changed the title ci(pr): install full SDK set for InspectCode build ci(pr): make InspectCode robust — full SDK set + nullglob solution discovery Jul 18, 2026
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