fix(orion): improve vm build stability#2130
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d7353fffe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| [target.'cfg(target_os = "linux")'.dependencies] | ||
| scorpiofs = { git = "https://github.com/web3infra-foundation/scorpiofs.git" } | ||
| # scorpiofs = { git = "https://github.com/web3infra-foundation/scorpiofs.git" } | ||
| scorpiofs = { path = "../../scorpiofs" } |
There was a problem hiding this comment.
Restore a resolvable scorpiofs dependency
On Linux checkouts that don't also have a sibling ../../scorpiofs repository, this path dependency is not resolvable; cargo metadata fails while loading the default workspace member orion with failed to read /workspace/scorpiofs/Cargo.toml. Because orion is in the workspace's default members, this breaks normal clean-clone builds/tests rather than only selecting a local development override.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c20283f4ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fallocate -l {size_g}G '{swap_file}' 2>/dev/null \ | ||
| || dd if=/dev/zero of='{swap_file}' bs=1M count=$(( {size_g} * 1024 )) status=none |
There was a problem hiding this comment.
Avoid unconditionally filling small VM disks
When callers use the supported image_disk_gb override with a small value (or omit it where the default image has less than ~8 GiB free), this command still allocates an 8 GiB swapfile on /; set -e then aborts on ENOSPC before systemctl start orion-runner, so otherwise valid small VMs can no longer deploy. Size the swap from available space or reject/raise too-small disks before starting the VM.
Useful? React with 👍 / 👎.
| git clone --depth 1 --branch codex/antares-fuse-local-libfuse https://github.com/web3infra-foundation/scorpiofs.git ../scorpiofs | ||
| git clone --depth 1 --branch codex/stabilize-libfuse-buck2-races https://github.com/rk8s-dev/rk8s.git ../rk8s |
There was a problem hiding this comment.
Make self-hosted dependency clones idempotent
In this workflow, the test job runs on the persistent self-hosted runner for web3infra-foundation/mega PRs, but these clones target ../scorpiofs and ../rk8s, which are outside the checkout directory that actions/checkout cleans. After one run leaves either sibling repo behind, a later run on the same runner hits git clone's destination path ... already exists and is not an empty directory error before tests start; remove/reuse the directories or clone under $RUNNER_TEMP.
Useful? React with 👍 / 👎.
Summary
Validation