ci(tst-03): fix codegen-check null bug, refresh rust proto, gradle direct install
Surfaced by the first real CI run on the self-hosted runner: - scripts/check-codegen.ps1: `git status --porcelain` returns $null on a clean tree, so `.Trim()` threw "cannot call a method on a null-valued expression" — i.e. Check 2 could never report success. Pipe through Out-String (null -> ''). - clients/rust/protos/mxaccess_worker.proto: genuinely stale — missing the canonical `max_frame_bytes` field. Refreshed from src/ZB.MOM.WW.MxGateway.Contracts/Protos (Check 3 drift guard, added in P1). - ci.yml java job: act cannot resolve the gradle/actions monorepo action (`unsupported object type` on the v4 tag); install Gradle 9.5.1 directly instead (matches the local build) since the repo has no gradle wrapper. Claude-Session: https://claude.ai/code/session_01DMXXvNuPekkkrTEyPNxEkW
This commit is contained in:
@@ -52,7 +52,9 @@ try {
|
||||
$failures.Add('Contracts project failed to build during codegen check.')
|
||||
}
|
||||
|
||||
$diff = (& git -C $repoRoot status --porcelain -- 'src/ZB.MOM.WW.MxGateway.Contracts/Generated').Trim()
|
||||
# Pipe through Out-String so a clean tree (git emits nothing -> $null) does not throw
|
||||
# "cannot call a method on a null-valued expression"; Out-String yields '' for no output.
|
||||
$diff = (& git -C $repoRoot status --porcelain -- 'src/ZB.MOM.WW.MxGateway.Contracts/Generated' | Out-String).Trim()
|
||||
if (-not [string]::IsNullOrEmpty($diff)) {
|
||||
Write-Host $diff
|
||||
$failures.Add('Contracts/Generated differs from a fresh regeneration. Run `dotnet build` on the contracts project and commit Generated/ (required for the net48 worker build).')
|
||||
|
||||
Reference in New Issue
Block a user