ci(pr): make InspectCode robust — full SDK set + nullglob solution discovery - #439
Open
Chris-Wolfgang wants to merge 2 commits into
Open
ci(pr): make InspectCode robust — full SDK set + nullglob solution discovery#439Chris-Wolfgang wants to merge 2 commits into
Chris-Wolfgang wants to merge 2 commits into
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feeds back two InspectCode robustness fixes from Chris-Wolfgang/ETL-Abstractions to the canonical template. Both were latent in the canonical
inspectcodejob 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, butRestore + 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 lone10.0.xSDK, so the build can fail even when the test stages (which install3.1.x–10.0.x) pass. Install the same SDK set.2. Robust solution discovery (from ETL-Abstractions#274)
The "Run InspectCode" step parsed
ls *.slnxto select a solution. Under GitHub'sshell: bash(-e -o pipefail), a no-matchlsexits 2,pipefailpropagates it, anderrexitaborts the step before the.slnfallback runs — so any repo that has only a.slnfails InspectCode. Replaced withnullglob+ array expansion (a non-matching glob expands to nothing, correct under errexit by construction;.slnxstays preferred). Also puts~/.dotnet/toolsonPATHsojbresolves.Verified in a local
bash -e -o pipefailharness: only-.sln✓, only-.slnx✓, both (.slnxwins) ✓, neither (exit 1) ✓.Out of scope (tracked separately)
The canonical InspectCode job runs on
ubuntu-latestand builds the whole solution, which will also fail for downstream repos that havenet4xprojects (no Framework reference assemblies on Linux). ETL-Abstractions worked around this by moving towindows-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.