fix(ci): harden TypeScript SDK native publish#102
Merged
Conversation
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.
Description
Hardens the TypeScript SDK native publish flow so release retries do not fail on already-published packages, native optional package failures do not block the main SDK package publish, and CI no longer depends on missing platform build tools for the native package matrix.
Changes
.github/workflows/release-typescript-sdk.yml: publish native packages through an idempotent script, keep native package matrix failures non-blocking for the main SDK publish, and avoid unused cross-build tooling in the platform-native matrix.sdks/typescript/scripts/build-native-host.mjs: infer the native package platform from the package directory, support explicit platform/arch/target overrides, honorCARGO_TARGET_DIR, copy Windows.exeoutputs correctly, and keep Linux-only kernel-bypass features Linux-only.sdks/typescript/scripts/publish-package.mjs: skip npm publish successfully when the exact package version already exists.sdks/typescript/scripts/validate-native-package.mjs: add a local dry-run harness for native package builds.vendor/laserstream-core-proto: patch Laserstream proto generation to use vendoredprotocinstead ofprotobuf-src, avoiding autotools/protoc availability failures in CI.vendor/yellowstone-grpc-client: patch Unix Domain Socket APIs behindcfg(unix)so Windows native builds do not compile Unix-only types.crates/sof-observer: clean non-Linux unused warning paths withcfgand semantic imports instead of newallowattributes.Motivation
Business motivation:
Ship the TypeScript SDK release without making users wait on optional native package recovery for platforms they do not use.
Technical motivation:
The publish flow failed when a native package was already published and when platform-specific Rust dependencies assumed unavailable tooling or Unix-only APIs.
Alternative approaches considered:
Prebuilding every platform from Linux via cross compilation was rejected for this fix because the release matrix already uses platform-native runners and cross-compilation added unnecessary OpenSSL/Zig/toolchain risk.
Scope and impact
Testing
Commands/results:
All listed commands passed. The first Docker attempt failed because the mounted
/tmp/sof-docker-targetdirectory was owned by a previous container user; after recreating it as writable, the clean Node 22 Debian container validation passed.Related issues and documentation
0.1.1release recovery.docs/architecture/README.mdReviewer checklist
docs/architecture/ard/0003-slice-dependency-contracts.md)Additional notes
This PR does not create, move, or retrigger release tags. Tags should still only be applied to commits on
mainafter merge.