Skip to content

CI failure: get-net-pwsh-versions.sh parsing .NET LTS metadata #5

@jmcombs

Description

@jmcombs

Symptoms:

  • CI run shows empty NET_RUNTIME_URL_* and multiple NET_RUNTIME_LTS_VERSION lines
  • PowerShell major version sometimes parsed incorrectly

Root cause:

  • .NET releases-index now has multiple active LTS channels (8.0 and 10.0). The script aggregated entries, producing multiple values and failing to resolve runtime files.
  • PowerShell major version extraction cut on 'v' after stripping it, and asset selection was too broad.

Fix:

  • Filter to active LTS channels and choose the highest channel-version via jq max_by(split(".") -> map(tonumber)) to select a single channel.
  • Use the selected channel’s releases.json to resolve the exact runtime.files URLs.
  • Compute PowerShell major via dot split and match assets by exact filename.

Impact:

  • Restores correct NET_RUNTIME_URL_{x64,arm64,arm}, NET_RUNTIME_LTS_VERSION, PWSH_LTS_* variables.
  • Tests (unit + integration) pass locally.

Validation:

  • Unit tests against mocks pass.
  • Integration tests with live endpoints pass, URLs are valid HTTPS and versions are semantic (x.y.z).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions