Repository navigation
fix(ci): make vendor-libs tolerate kcl releases without windows-arm64 - #408
Merged
Merged
Conversation
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>
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.
Follow-up to #407. Pushing
release/v0.13.1(the versionKCL_VERSIONcurrently points at) turnsvendor-libsred and vendors nothing:kcl-lang/kcl#2219 adds
windows/arm64to that repo's release matrix, but no tag cut before it carries the asset, so the 404 is expected — not a broken release. Becauseiosandvendorbothneeds: [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:
prebuiltfetcheswindows-arm64in 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.vendorsanity check drops it from the hard-fail list and reports it as a warning.-s, becausegit adderrors outright on a pathspec that matches nothing.docs/lib-vendoring.mdnotes the behaviour. Everything else is unchanged: for the kcl version that first ships the asset, this branch's logic stageswindows-arm64exactly as it did before.Test plan
python3 -c "yaml.safe_load(...)"parses the workflow; job/step graph unchanged.git add -f -- "${present[@]}"snippet exercised in a scratch repo underset -euo pipefailwith 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