Skip to content

Remove cargo home chown steps - #1911

Merged
jprendes merged 1 commit into
hyperlight-dev:mainfrom
ludfjig:remove-cargo-chown
Oct 9, 2026
Merged

jprendes merged 1 commit into
hyperlight-dev:mainfrom
ludfjig:remove-cargo-chown

Conversation

@ludfjig

@ludfjig ludfjig commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Remove the sudo chown -R /opt/cargo step from all workflows to speed up ci.

The step worked around Linux runner images that did not let the runner user restore cached files in /opt/cargo. The images give the runner user ownership of /opt/cargo since https://github.com/azure-management-and-platforms/hyperlight-ci-dev-images/pull/13. The tart arm64 runners have no /opt/cargo, so the step already does nothing there.

The step still walks the whole directory, taking 10 to 40 seconds per Linux job. See run 37820817731.

This PR's CI checks that rust-cache still restores without the step.

The Linux runner images give the runner user ownership of /opt/cargo
since https://github.com/azure-management-and-platforms/hyperlight-ci-dev-images/pull/13.
The tart arm64 runners have no /opt/cargo. The step still walks the
whole directory, taking 10 to 40 seconds per job.

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 8, 2026 21:50
@ludfjig ludfjig added kind/refactor For PRs that restructure or remove code without adding new functionality. ready-for-review PR is ready for (re-)review labels Oct 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The obsolete steps are removed consistently, and relevant Rust cache steps succeed without them.

0 open findings

What changed in this PR

Removes obsolete /opt/cargo ownership fixes to reduce CI runtime.

Changes:

  • Removes recursive chown steps from 10 workflows.
  • Retains Rust cache behavior across Linux and ARM64 runners.
File Description
.github/​workflows/​RustNightly.yml Removes the nightly permission workaround.
.github/​workflows/​RegenSnapshotGoldens.yml Removes the snapshot job workaround.
.github/​workflows/​PrimeCaches.yml Removes the cache priming workaround.
.github/​workflows/​dep_update_guest_locks.yml Removes the lock update workaround.
.github/​workflows/​dep_run_examples.yml Removes the examples workaround.
.github/​workflows/​dep_code_checks.yml Removes the code checks workaround.
.github/​workflows/​dep_build_test.yml Removes the build and test workaround.
.github/​workflows/​dep_build_guests.yml Removes the guest build workaround.
.github/​workflows/​dep_benchmarks.yml Removes the benchmark workaround.
.github/​workflows/​Coverage.yml Removes the coverage workaround.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@hyperlight-gh-bot

Copy link
Copy Markdown

Benchmark Results

Measured commit: 830f5394498b
Baseline commit: 401c1493e901

kvm / amd (Linux) (➖ stable)

No benchmark improved or regressed.

Benchmark Results

function_call_codec

encode_control decode_vec_bytes_copy
byte_chunks 849.47 ns (➖ 1.13x slower)
vec_bytes 580.96 ns (➖ 1.01x faster)
373.23 µs (➖ 1.01x faster)

payload_allocation

slot_pool_segmented
262144 523.58 ns (➖ 1.58x faster)
65536 141.94 ns (➖ 1.00x faster)

sandboxes

create_initialized_and_drop
medium 81.22 ms (➖ 1.02x faster)

slot_pool

alloc_dealloc_1500 alloc_dealloc_4096 alloc_dealloc_128
7.72 ns (➖ 1.03x faster) 8.01 ns (➖ 1.03x slower) 7.73 ns (➖ 1.01x faster)

snapshot_files

load_snapshot_unverified
small 92.58 µs (➖ 1.00x slower)

virtq_readonly

slot_pool_segmented_fragmented slot_pool_segmented
262144 7.32 µs (➖ 1.01x slower) 7.16 µs (➖ 1.02x slower)
65536 2.06 µs (➖ 1.08x slower) 1.93 µs (➖ 1.10x faster)

virtq_readwrite

slot_pool_segmented_fragmented slot_pool_segmented
65536 6.24 µs (➖ 1.02x faster) 6.28 µs (➖ 1.01x faster)
8192 1.06 µs (➖ 1.04x faster) 1.05 µs (➖ 1.04x faster)
262144 27.80 µs (➖ 1.02x slower)
kvm / intel (Linux) (➖ stable)

No benchmark improved or regressed.

Benchmark Results

function_call_codec

encode_control decode_vec_bytes_copy
byte_chunks 721.89 ns (➖ 1.06x slower)
vec_bytes 507.58 ns (➖ 1.02x faster)
673.03 µs (➖ 1.00x faster)

payload_allocation

slot_pool_segmented
262144 502.78 ns (➖ 1.06x faster)
65536 137.36 ns (➖ 1.06x faster)

sandboxes

create_initialized_and_drop
medium 72.25 ms (➖ 1.10x faster)

slot_pool

alloc_dealloc_1500 alloc_dealloc_4096 alloc_dealloc_128
6.98 ns (➖ 1.16x faster) 6.97 ns (➖ 1.12x faster) 6.97 ns (➖ 1.05x faster)

snapshot_files

load_snapshot_unverified
small 45.46 µs (➖ 1.00x slower)

virtq_readonly

slot_pool_segmented_fragmented slot_pool_segmented
262144 7.61 µs (➖ 1.03x faster) 7.64 µs (➖ 1.03x faster)
65536 2.17 µs (➖ 1.03x faster) 2.18 µs (➖ 1.01x faster)

virtq_readwrite

slot_pool_segmented_fragmented slot_pool_segmented
65536 7.37 µs (➖ 1.01x slower) 7.67 µs (➖ 1.06x slower)
8192 803.94 ns (➖ 1.03x slower) 794.85 ns (➖ 1.02x faster)
262144 30.94 µs (➖ 1.01x faster)
mshv3 / amd (Linux) (➖ stable)

No benchmark improved or regressed.

Benchmark Results

function_call_codec

encode_control decode_vec_bytes_copy
byte_chunks 957.81 ns (➖ 1.01x slower)
vec_bytes 693.28 ns (➖ 1.01x faster)
320.72 µs (➖ 1.01x slower)

payload_allocation

slot_pool_segmented
262144 727.93 ns (➖ 1.06x faster)
65536 192.56 ns (➖ 1.01x faster)

sandboxes

create_initialized_and_drop
medium 61.00 ms (➖ 1.01x slower)

slot_pool

alloc_dealloc_1500 alloc_dealloc_4096 alloc_dealloc_128
9.73 ns (➖ 1.00x slower) 9.81 ns (➖ 1.00x faster) 9.73 ns (➖ 1.00x faster)

snapshot_files

load_snapshot_unverified
small 84.81 µs (➖ 1.02x slower)

virtq_readonly

slot_pool_segmented_fragmented slot_pool_segmented
262144 10.21 µs (➖ 1.03x faster) 9.80 µs (➖ 1.01x faster)
65536 2.41 µs (➖ 1.02x faster) 2.24 µs (➖ 1.00x slower)

virtq_readwrite

slot_pool_segmented_fragmented slot_pool_segmented
65536 8.02 µs (➖ 1.18x faster) 8.28 µs (➖ 1.16x faster)
8192 1.25 µs (➖ 1.04x faster) 1.27 µs (➖ 1.02x slower)
262144 35.50 µs (➖ 1.05x faster)
mshv3 / intel (Linux) (➖ stable)

No benchmark improved or regressed.

Benchmark Results

function_call_codec

encode_control decode_vec_bytes_copy
byte_chunks 941.23 ns (➖ 1.04x slower)
vec_bytes 663.14 ns (➖ 1.02x slower)
668.74 µs (➖ 1.08x faster)

payload_allocation

slot_pool_segmented
262144 709.07 ns (➖ 1.13x slower)
65536 163.21 ns (➖ 1.01x faster)

sandboxes

create_initialized_and_drop
medium 62.96 ms (➖ 1.06x faster)

slot_pool

alloc_dealloc_1500 alloc_dealloc_4096 alloc_dealloc_128
9.67 ns (➖ 1.01x slower) 8.80 ns (➖ 1.00x slower) 8.81 ns (➖ 1.00x slower)

snapshot_files

load_snapshot_unverified
small 44.01 µs (➖ 1.02x faster)

virtq_readonly

slot_pool_segmented_fragmented slot_pool_segmented
262144 7.93 µs (➖ 1.00x faster) 7.95 µs (➖ 1.00x faster)
65536 2.28 µs (➖ 1.01x faster) 2.28 µs (➖ 1.02x slower)

virtq_readwrite

slot_pool_segmented_fragmented slot_pool_segmented
65536 7.53 µs (➖ 1.01x faster) 7.62 µs (➖ 1.01x slower)
8192 916.64 ns (➖ 1.01x faster) 918.94 ns (➖ 1.02x slower)
262144 37.87 µs (➖ 1.01x faster)
hyperv-ws2025 / amd (Windows) (➖ stable)

No benchmark improved or regressed.

Benchmark Results

function_call_codec

encode_control decode_vec_bytes_copy
byte_chunks 1.14 µs (➖ 1.18x faster)
vec_bytes 762.34 ns (➖ 1.16x faster)
2.02 ms (➖ 1.01x slower)

payload_allocation

slot_pool_segmented
262144 786.57 ns (➖ 1.00x slower)
65536 234.11 ns (➖ 1.01x faster)

sandboxes

create_initialized_and_drop
medium 78.70 ms (➖ 1.30x faster)

slot_pool

alloc_dealloc_1500 alloc_dealloc_4096 alloc_dealloc_128
10.67 ns (➖ 1.01x slower) 10.64 ns (➖ 1.01x slower) 10.80 ns (➖ 1.02x slower)

snapshot_files

load_snapshot_unverified
small 512.29 µs (➖ 1.05x faster)

virtq_readonly

slot_pool_segmented_fragmented slot_pool_segmented
262144 8.73 µs (➖ 1.00x slower) 9.08 µs (➖ 1.05x slower)
65536 2.59 µs (➖ 1.00x slower) 2.57 µs (➖ 1.01x slower)

virtq_readwrite

slot_pool_segmented_fragmented slot_pool_segmented
65536 9.36 µs (➖ 1.05x slower) 8.81 µs (➖ 1.03x faster)
8192 1.39 µs (➖ 1.01x faster) 1.40 µs (➖ 1.00x faster)
262144 38.49 µs (➖ 1.00x faster)
hyperv-ws2025 / intel (Windows) (➖ stable)

No benchmark improved or regressed.

Benchmark Results

function_call_codec

encode_control decode_vec_bytes_copy
byte_chunks 1.23 µs (➖ 1.00x faster)
vec_bytes 823.76 ns (➖ 1.02x slower)
3.04 ms (➖ 1.03x slower)

payload_allocation

slot_pool_segmented
262144 742.33 ns (➖ 1.04x faster)
65536 220.90 ns (➖ 1.03x slower)

sandboxes

create_initialized_and_drop
medium 107.13 ms (➖ 1.07x faster)

slot_pool

alloc_dealloc_1500 alloc_dealloc_4096 alloc_dealloc_128
10.61 ns (➖ 1.08x faster) 10.16 ns (➖ 1.08x faster) 10.59 ns (➖ 1.35x faster)

snapshot_files

load_snapshot_unverified
small 594.75 µs (➖ 1.05x faster)

virtq_readonly

slot_pool_segmented_fragmented slot_pool_segmented
262144 7.87 µs (➖ 1.03x slower) 7.78 µs (➖ 1.00x slower)
65536 2.41 µs (➖ 1.04x slower) 2.34 µs (➖ 1.00x slower)

virtq_readwrite

slot_pool_segmented_fragmented slot_pool_segmented
65536 8.43 µs (➖ 1.02x faster) 8.55 µs (➖ 1.01x slower)
8192 1.14 µs (➖ 1.10x faster) 1.08 µs (➖ 1.01x faster)
262144 44.50 µs (➖ 1.05x slower)

Reported by cargo ci bench-report --candidate run:37849557173 --config-file bench_report.toml.

@jprendes
jprendes merged commit 558732b into hyperlight-dev:main Oct 9, 2026
106 of 125 checks passed
@github-actions github-actions Bot removed the ready-for-review PR is ready for (re-)review label Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactor For PRs that restructure or remove code without adding new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants