Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 47 additions & 49 deletions .github/workflows/branch-checks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Branch Checks

on:
pull_request:
merge_group:
types: [checks_requested]
push:
Expand Down Expand Up @@ -40,18 +41,13 @@ jobs:
name: mise Lockfile
needs: pr_metadata
if: needs.pr_metadata.outputs.should_run == 'true'
runs-on: linux-amd64-cpu8
runs-on: ubuntu-latest
timeout-minutes: 30
container:
image: ghcr.io/nvidia/openshell/ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Mark workspace as safe for git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Install mise
uses: ./.github/actions/setup-mise

- name: Verify mise.lock is in sync with mise.toml
run: |
Expand All @@ -65,18 +61,13 @@ jobs:
name: License Headers
needs: pr_metadata
if: needs.pr_metadata.outputs.should_run == 'true'
runs-on: linux-amd64-cpu8
runs-on: ubuntu-latest
timeout-minutes: 30
container:
image: ghcr.io/nvidia/openshell/ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Install tools
run: mise install --locked
uses: ./.github/actions/setup-mise

- name: Check license headers
run: mise run license:check
Expand All @@ -85,8 +76,8 @@ jobs:
name: Cargo Deny
needs: pr_metadata
if: needs.pr_metadata.outputs.should_run == 'true'
runs-on: linux-amd64-cpu8
timeout-minutes: 30
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
run:
shell: nix develop .#devShells.x86_64-linux.default -c bash -euo pipefail {0}
Expand All @@ -113,14 +104,14 @@ jobs:
fail-fast: false
matrix:
include:
- runner: linux-amd64-cpu8
- runner: ubuntu-latest
system: x86_64-linux
- runner: linux-arm64-cpu8
- runner: ubuntu-24.04-arm
system: aarch64-linux
- runner: macos-15-xlarge
- runner: macos-latest
system: aarch64-darwin
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
timeout-minutes: 60
defaults:
run:
shell: nix develop .#devShells.${{ matrix.system }}.default -c bash -euo pipefail {0}
Expand Down Expand Up @@ -204,19 +195,14 @@ jobs:
strategy:
fail-fast: false
matrix:
runner: [linux-amd64-cpu8, linux-arm64-cpu8]
runner: [ubuntu-latest, ubuntu-24.04-arm]
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
container:
image: ghcr.io/nvidia/openshell/ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Install tools
run: mise install --locked
uses: ./.github/actions/setup-mise

- name: Install dependencies
run: uv sync --frozen
Expand All @@ -237,18 +223,13 @@ jobs:
name: Go SDK
needs: pr_metadata
if: needs.pr_metadata.outputs.should_run == 'true'
runs-on: linux-amd64-cpu8
runs-on: ubuntu-latest
timeout-minutes: 30
container:
image: ghcr.io/nvidia/openshell/ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Install tools
run: mise install --locked
uses: ./.github/actions/setup-mise

- name: Lint, build, test, proto-check
run: mise run go:ci
Expand All @@ -257,18 +238,13 @@ jobs:
name: Markdown
needs: pr_metadata
if: needs.pr_metadata.outputs.should_run == 'true'
runs-on: linux-amd64-cpu8
runs-on: ubuntu-latest
timeout-minutes: 30
container:
image: ghcr.io/nvidia/openshell/ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Install tools
run: mise install --locked
uses: ./.github/actions/setup-mise

- name: Lint
run: mise run markdown:lint
Expand All @@ -277,18 +253,13 @@ jobs:
name: TypeScript SDK
needs: pr_metadata
if: needs.pr_metadata.outputs.should_run == 'true'
runs-on: linux-amd64-cpu8
runs-on: ubuntu-latest
timeout-minutes: 30
container:
image: ghcr.io/nvidia/openshell/ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Install tools
run: mise install --locked
uses: ./.github/actions/setup-mise

- name: Check TypeScript SDK
run: mise run sdk:ts:ci
Expand All @@ -302,3 +273,30 @@ jobs:
run: |
OPENSHELL_NPM_VERSION="$(uv run python tasks/scripts/release.py get-version --npm)" \
mise run sdk:ts:publish

# Single required status for branch protection and the merge queue. Runs even
# when upstream jobs fail so the required check reports a result instead of
# staying pending.
ci-result:
name: CI Result
needs:
- pr_metadata
- mise-lockfile
- license-headers
- cargo-deny
- rust
- python
- go
- markdown
- sdk-typescript
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: ./.github/actions/check-job-results
with:
results: ${{ toJSON(needs) }}
10 changes: 3 additions & 7 deletions .github/workflows/helm-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
name: Helm Lint

on:
pull_request:
merge_group:
types: [checks_requested]
push:
Expand Down Expand Up @@ -79,17 +80,12 @@ jobs:
name: Helm Lint
needs: [pr_metadata, helm_changes]
if: needs.pr_metadata.outputs.should_run == 'true' && needs.helm_changes.outputs.should_run == 'true'
runs-on: linux-amd64-cpu8
container:
image: ghcr.io/nvidia/openshell/ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Install tools
run: mise install --locked
uses: ./.github/actions/setup-mise

- name: Lint Helm chart
run: mise run helm:lint
Expand Down
6 changes: 6 additions & 0 deletions CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ The GitHub ruleset should require the `OpenShell / ...` statuses published by
`Required CI Gates` plus the direct `OpenShell / Trivy Changes` result, not the
push-triggered workflow jobs themselves.

## UsableMachines fork

The `UsableMachines/OpenShell` fork has no NVIDIA self-hosted runners and no copy-pr-bot, so it does not use the mirror flow above. `Branch Checks` and `Helm Lint` run on GitHub-hosted runners and trigger on `pull_request` and `merge_group`, so no `/ok to test` comment is needed. `Branch Checks` ends with a `CI Result` job that fails when any other job in the workflow did not succeed.

Branch protection or the merge-queue ruleset on `main` requires `CI Result` and `Helm Lint`. `Required CI Gates` and `Branch E2E Checks` still exist from upstream, but their `OpenShell / ...` statuses and the NVIDIA-runner E2E lanes are not required in the fork. Keep the `branch-checks.yml` and `helm-lint.yml` runner and trigger changes in mind when merging from upstream.

## Informational security reports

Security workflow compute runs directly on GitHub-hosted runners instead of
Expand Down
3 changes: 3 additions & 0 deletions crates/openshell-sandbox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2380,6 +2380,9 @@ where
let attempt = &attempt;
let f = &f;
async move {
// The top-level `Ordering` import is Linux-only, so the path stays qualified
// for other targets; Linux clippy would otherwise flag it.
#[allow(unused_qualifications)]
let n = attempt.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
let target = fleet_target(endpoint, sandbox_id, n).await?;

Expand Down
5 changes: 1 addition & 4 deletions crates/openshell-supervisor-network/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6416,10 +6416,7 @@ mod tests {
fn ca_only_config_preserves_explicit_baseline_ip_restriction() {
let ca = regorus::Value::from_json_str(r#"{"upstream_ca_pem":"reviewed-ca"}"#).unwrap();
let baseline = regorus::Value::from_json_str(r#"{"allowed_ips":["11.0.0.0/8"]}"#).unwrap();
for configs in [
vec![ca.clone(), baseline.clone()],
vec![baseline.clone(), ca.clone()],
] {
for configs in [vec![ca.clone(), baseline.clone()], vec![baseline, ca]] {
assert_eq!(
explicit_allowed_ips_from_configs(&configs),
vec!["11.0.0.0/8"]
Expand Down
Loading