Skip to content

fix(ci): make vendor-libs tolerate kcl releases without windows-arm64 - #408

Merged
Peefy merged 1 commit into
mainfrom
fix/vendor-libs-optional-windows-arm64
Oct 13, 2026
Merged

Peefy merged 1 commit into
mainfrom
fix/vendor-libs-optional-windows-arm64

Conversation

@Peefy

@Peefy Peefy commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #407. Pushing release/v0.13.1 (the version KCL_VERSION currently points at) turns vendor-libs red and vendors nothing:

==> windows-arm64: downloading kcl-lib-v0.13.1-windows-arm64.zip
error: failed to download https://github.com/kcl-lang/kcl/releases/download/v0.13.1/kcl-lib-v0.13.1-windows-arm64.zip
       does kcl-lang/kcl publish a v0.13.1 release?

kcl-lang/kcl#2219 adds windows/arm64 to that repo's release matrix, but no tag cut before it carries the asset, so the 404 is expected — not a broken release. Because ios and vendor both needs: [prebuilt], one 404 takes down the whole run and the release branch ends up with zero runtimes on it, which is the exact failure mode #407 was meant to prevent.

This makes the omission a warning instead of a failure:

  • prebuilt fetches windows-arm64 in a second, best-effort invocation. Once the asset is published that stages it like any other platform and becomes a no-op; until then it warns.
  • the vendor sanity check drops it from the hard-fail list and reports it as a warning.
  • the force-add list is filtered through -s, because git add errors outright on a pathspec that matches nothing.

docs/lib-vendoring.md notes the behaviour. Everything else is unchanged: for the kcl version that first ships the asset, this branch's logic stages windows-arm64 exactly as it did before.

Test plan

  • python3 -c "yaml.safe_load(...)" parses the workflow; job/step graph unchanged.
  • The filtered git add -f -- "${present[@]}" snippet exercised in a scratch repo under set -euo pipefail with one present and one absent path: the failing [ -s ] does not abort the shell, the existing file is force-added past .gitignore, and the absent one is dropped rather than erroring.

🤖 Generated with Claude Code

kcl-lang/kcl#2219 adds windows/arm64 to that repo's release matrix, but no
kcl tag cut before it carries a kcl-lib-<version>-windows-arm64.zip.
vendor-libs.yaml requested the asset unconditionally, so pushing a release
branch whose KCL_VERSION predates that PR fails the `prebuilt` job on a 404
-- which takes `ios` and `vendor` down with it through `needs:`, so the run
vendors nothing at all and the branch is left without a single runtime.

Fetch windows-arm64 on a best-effort basis instead, drop it from the
hard-fail sanity list, and filter the force-add list through `-s` (git add
errors outright on a pathspec matching nothing). Once the asset is
published the second invocation stages it like any other platform and the
omission warning stops firing; until then it is a warning, not a failure.

Fixes the release/v0.13.1 cut, whose KCL_VERSION is v0.13.1.

Signed-off-by: Peefy <xpf6677@163.com>
@Peefy
Peefy merged commit 267bdad into main Oct 13, 2026
2 of 3 checks passed
@Peefy
Peefy deleted the fix/vendor-libs-optional-windows-arm64 branch October 13, 2026 14:55
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.

1 participant