Skip to content

Commit 0b73e60

Browse files
authored
Merge pull request #958 from nebius/dev
Soperator release 1.20.0
2 parents 0e64cb0 + dd2ba46 commit 0b73e60

File tree

309 files changed

+92314
-19552
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

309 files changed

+92314
-19552
lines changed

.dockerignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
/docker
55
/slurm-service/internal/docs
66
/helm*
7-
/images
87
/terraform*
98
/test
109
.*
1110
*.sh
1211
Makefile
13-
Dockerfile

.github/workflows/e2e_test.yml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
name: E2E test soperator
2+
3+
on:
4+
schedule:
5+
- cron: '0 */12 * * *'
6+
workflow_dispatch:
7+
inputs:
8+
terraform_repo:
9+
description: "terraform repository with slurm cluster deployment"
10+
required: true
11+
default: "nebius/nebius-solution-library"
12+
type: string
13+
terraform_repo_ref:
14+
description: "ref of terraform repo to apply"
15+
required: true
16+
default: "release/soperator"
17+
type: string
18+
path_to_installation:
19+
description: "path inside terraform repo to terraform module to apply"
20+
required: true
21+
default: "/soperator/installations/example"
22+
type: string
23+
24+
25+
permissions:
26+
contents: read
27+
28+
concurrency:
29+
group: global-lock
30+
cancel-in-progress: false
31+
32+
jobs:
33+
e2e-test:
34+
runs-on:
35+
- e2e-tests
36+
37+
environment: e2e
38+
39+
env:
40+
PATH_TO_INSTALLATION: "${{ github.workspace }}/terraform-repo/${{ github.event.inputs.path_to_installation || '/soperator/installations/example' }}"
41+
TERRAFORM_REPO: "${{ github.event.inputs.terraform_repo || 'nebius/nebius-solution-library' }}"
42+
TERRAFORM_REPO_REF: "${{ github.event.inputs.terraform_repo_ref || 'release/soperator' }}"
43+
NEBIUS_TENANT_ID: ${{ vars.E2E_TEST_NEBIUS_TENANT_ID }}
44+
NEBIUS_PROJECT_ID: ${{ vars.E2E_TEST_NEBIUS_PROJECT_ID }}
45+
NEBIUS_REGION: ${{ vars.E2E_TEST_NEBIUS_REGION }}
46+
INFINIBAND_FABRIC: ${{ vars.E2E_TEST_INFINIBAND_FABRIC }}
47+
SSH_KEYS: ${{ vars.E2E_TEST_SSH_KEYS }}
48+
O11Y_ACCESS_TOKEN: ${{ secrets.E2E_O11Y_ACCESS_TOKEN }}
49+
OUTPUT_LOG_FILE: "${{ github.workspace }}/output/output.log"
50+
OUTPUT_ERR_FILE: "${{ github.workspace }}/output/output.err"
51+
52+
steps:
53+
- name: Harden Runner
54+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
55+
with:
56+
egress-policy: audit
57+
58+
- name: Checkout repository
59+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
60+
61+
- name: Cache go modules
62+
id: cache
63+
uses: actions/cache@v4
64+
with:
65+
path: |
66+
~/go/pkg/mod
67+
~/.cache/go-build
68+
key: go-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('go.mod') }}
69+
restore-keys: |
70+
go-${{ runner.os }}-${{ runner.arch }}-
71+
72+
- name: Install GO
73+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
74+
with:
75+
go-version-file: 'go.mod'
76+
cache: false
77+
78+
- name: Find latest successful build run on current branch
79+
id: find_build
80+
env:
81+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
run: |
83+
echo "Looking for build run on branch: ${{ github.ref_name }}"
84+
run_id=$(gh api -X GET \
85+
"/repos/${{ github.repository }}/actions/workflows/one_job.yml/runs" \
86+
-F branch=${{ github.ref_name }} -F status=success \
87+
--jq '.workflow_runs[0].id')
88+
echo "run_id=$run_id" >> $GITHUB_OUTPUT
89+
90+
- name: Download artifact with version
91+
run: |
92+
gh run download ${{ steps.find_build.outputs.run_id }} -n version
93+
env:
94+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95+
96+
- name: Read version
97+
run: |
98+
SOPERATOR_VERSION=$(sed -n '1p' version.txt)
99+
SOPERATOR_UNSTABLE=$(sed -n '2p' version.txt)
100+
101+
echo "SOPERATOR_VERSION=$SOPERATOR_VERSION" >> $GITHUB_ENV
102+
echo "SOPERATOR_UNSTABLE=$SOPERATOR_UNSTABLE" >> $GITHUB_ENV
103+
104+
- name: Checkout Terraform repository
105+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
106+
with:
107+
repository: ${{ env.TERRAFORM_REPO }}
108+
ref: ${{ env.TERRAFORM_REPO_REF }}
109+
path: "${{ github.workspace }}/terraform-repo"
110+
111+
- name: Run Terratest
112+
run: |
113+
cd ${{ env.PATH_TO_INSTALLATION }}
114+
nebius iam session-management revoke --all-my-active
115+
source .envrc
116+
cd -
117+
118+
go test -v -timeout 2h --tags=e2e ./test/e2e/...
119+
120+
- name: Add errors output to job summary
121+
if: ${{ always() }}
122+
run: cat $OUTPUT_ERR_FILE >> $GITHUB_STEP_SUMMARY
123+
124+
- name: Upload terraform output
125+
if: ${{ always() }}
126+
uses: actions/upload-artifact@v4
127+
with:
128+
name: terraform-output
129+
path: "${{ github.workspace }}/output"
130+
131+
- name: Save Cache (only if needed)
132+
if: steps.cache.outputs.cache-hit != 'true'
133+
run: echo "cache miss – saved automatically by actions/cache"

.github/workflows/github_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363

6464
- name: Generate changelog
6565
id: changelog
66-
uses: mikepenz/release-changelog-builder-action@9a903f73f4cccdc8241077da63578b3faba06403 # v5
66+
uses: mikepenz/release-changelog-builder-action@e92187bd633e680ebfdd15961a7c30b2d097e7ad # v5
6767
with:
6868
mode: "PR"
6969
fromTag: ${{ needs.tag.outputs.previous-tag }}
@@ -117,7 +117,7 @@ jobs:
117117
token: ${{ secrets.GITHUB_TOKEN }}
118118

119119
- name: Create GitHub Release with changelog
120-
uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0
120+
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
121121
env:
122122
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123123
with:
Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build gpubench only
1+
name: Run gpubench tests
22

33
on:
44
push:
@@ -12,48 +12,34 @@ permissions:
1212
id-token: write
1313

1414
jobs:
15-
pre-build:
16-
runs-on: self-hosted
17-
18-
outputs:
19-
UNSTABLE: ${{ steps.set-env.outputs.unstable }}
20-
21-
steps:
22-
- name: Harden Runner
23-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
24-
with:
25-
egress-policy: audit
26-
27-
- name: Set environment to global output variables based on branch
28-
id: set-env
29-
run: |
30-
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
31-
echo "unstable=false" >> $GITHUB_OUTPUT
32-
else
33-
echo "unstable=true" >> $GITHUB_OUTPUT
34-
fi
35-
36-
- name: Print UNSTABLE from output
37-
run: |
38-
echo "Branch is - ${{ github.ref }}"
39-
echo "UNSTABLE - ${{ steps.set-env.outputs.unstable }}"
4015
gpubench_only:
4116
runs-on: self-hosted
42-
needs: pre-build
4317

4418
steps:
4519
- name: Harden Runner
46-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
20+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
4721
with:
4822
egress-policy: audit
4923

5024
- name: Checkout repository
5125
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5226

27+
- name: Cache go modules
28+
id: cache
29+
uses: actions/cache@v4
30+
with:
31+
path: |
32+
~/go/pkg/mod
33+
~/.cache/go-build
34+
key: go-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('go.mod') }}
35+
restore-keys: |
36+
go-${{ runner.os }}-${{ runner.arch }}-
37+
5338
- name: Install GO
54-
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
39+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
5540
with:
56-
go-version-file: 'go.mod'
41+
go-version-file: 'go.mod'
42+
cache: false
5743

5844
- name: Check if version synced
5945
run: make test-version-sync
@@ -63,3 +49,7 @@ jobs:
6349
echo "Running gpubench tests"
6450
cd ./images/worker/gpubench/
6551
go test
52+
53+
- name: Save Cache (only if needed)
54+
if: steps.cache.outputs.cache-hit != 'true'
55+
run: echo "cache miss – saved automatically by actions/cache"

0 commit comments

Comments
 (0)