Skip to content

Fix MXC-PR-Build pipeline failures and enable Rust caching#303

Merged
bbonaby merged 1 commit into
mainfrom
user/bbonaby/fix-1es-pipelines-after-recent-checkins
May 13, 2026
Merged

Fix MXC-PR-Build pipeline failures and enable Rust caching#303
bbonaby merged 1 commit into
mainfrom
user/bbonaby/fix-1es-pipelines-after-recent-checkins

Conversation

@bbonaby

@bbonaby bbonaby commented May 13, 2026

Copy link
Copy Markdown
Collaborator

📖 Description

Fix a couple issues that prevented the MXC azure pipeline from succeeded Ing. Note I have made it so that every PR in this repo now runs the azure pipeline templates that our official MXC build runs. This should prevent future PRs from adding changes that break it going forward. Once this is checked in I'll be disabling the GitHub build.yml workflow. Folks can still create and use github workflows for other tasks like the hyperlight and nanvix tests.

Fixes:

logger.rs: cfg-gate Windows-only diagnostics so Linux cargo clippy --all-features stops reporting unreachable_code / unused_variables.

hyperlight_runner.rs: fixed 4 policy_rejects_* tests that failed early on empty script_code, preventing validate_runner() policy checks from running.

SDK unit tests: skip containment-validation tests and state-aware spawn describes on unsupported hosts. 1ES pipelines runners unfortunately are still using win server 2022 and haven't been updated to 2025 yet.

Rust.Build.Job.yml: Remove use of 1ES.Rust tool install task. These install many tools that we don't use and take up ~10 minutes of pipeline time, when we only need clippy. This should speed up Official and PR builds. I have also enabled cacheing as the targets folder to help speed things up as well.

🔗 References

🔍 Validation

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Microsoft Reviewers: Open in CodeFlow

@bbonaby bbonaby force-pushed the user/bbonaby/fix-1es-pipelines-after-recent-checkins branch 4 times, most recently from 96b4b54 to 6879edc Compare May 13, 2026 07:57
… install

- src/wxc_common/src/logger.rs: cfg-gate the Windows-only diagnostic-pipe
  body so cargo clippy --target x86_64-unknown-linux-gnu --all-features
  no longer trips on unreachable_code / unused_variables.
- src/wxc_common/src/hyperlight_runner.rs: set a non-empty script_code in
  the four policy_rejects_* tests; ScriptRunner::run() calls
  validate_common() before validate_runner(), and the empty default was
  hitting 'Script content must not be empty' before the policy checks.
- src/wxc_common/src/lib.rs + src/lxc/src/main.rs + src/wxc/src/main.rs:
  the hyperlight feature pulls hyperlight-unikraft-host only on x86_64,
  so on aarch64 --all-features enables the feature without the dep.
  Gate the hyperlight_runner module declaration and all 10 consumer
  cfg sites on cfg(all(feature = hyperlight, target_arch = x86_64))
  so aarch64 builds configure them out cleanly.
- sdk/tests/unit/test-helpers.ts + sdk/tests/unit/state-aware.test.ts +
  sdk/tests/unit/sandbox.test.ts: hosted CI agents fail
  getPlatformSupport().isSupported (Windows-Latest lacks the WIP build
  the SDK checks for, and Linux agents have no lxc-ls). Export a
  platformSkip marker from test-helpers and pass it to the describes
  that go through the binary resolver. buildStateAwareEnvelope and the
  envelope-shape suites still run on any host.
- sdk/tests/integration/isolation-session-state-aware.test.ts: short-
  circuit on MXC_SKIP_OS_BUILD_DEPENDENT_TESTS (the integration test
  job already sets it on Windows) so the probeStateAwareRuntime call
  at module-load doesn't crash on hosts without IsolationSession
  runtime.
- .azure-pipelines/templates/Rust.Build.Job.yml: enable 1ES Rust
  toolchain + target-dir caching for both Official and PR runs. Fix
  the enableTests (plural) typo that left enableTest at its default
  true on every job, including arm64. Set useNextest: false and
  publishTestResults: false so Setup no longer cargo-installs
  cargo-nextest (~5 min/x64, ~10 min/arm64 savings); plain cargo test
  still gates via exit code.

co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bbonaby bbonaby force-pushed the user/bbonaby/fix-1es-pipelines-after-recent-checkins branch from 6879edc to e2f01b4 Compare May 13, 2026 07:58
@bbonaby bbonaby marked this pull request as ready for review May 13, 2026 12:36
@bbonaby bbonaby requested a review from a team May 13, 2026 13:40
@bbonaby bbonaby merged commit 16269fd into main May 13, 2026
20 checks passed
@bbonaby bbonaby deleted the user/bbonaby/fix-1es-pipelines-after-recent-checkins branch May 13, 2026 16:37
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.

2 participants