Skip to content

Commit 9c036c2

Browse files
authored
Merge branch 'master' into e2e-reuse
2 parents c15dcd5 + eb6f96d commit 9c036c2

File tree

248 files changed

+8304
-7095
lines changed

Some content is hidden

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

248 files changed

+8304
-7095
lines changed

.github/actionlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ self-hosted-runner:
22
labels:
33
- custom-arm64-jammy
44
- custom-arm64-noble
5+
- avalanche-avalanchego-runner # Github Action Runner Controller

.github/actions/run-monitored-tmpnet-cmd/action.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ inputs:
4040
default: ${{ github.run_attempt }}
4141
job:
4242
default: ${{ github.job }}
43+
grafana_dashboard_id:
44+
description: 'The identifier of the Grafana dashboard to use, in the format <UID>/<dashboard-name>.'
45+
default: 'kBQpRdWnk/avalanche-main-dashboard'
4346

4447
runs:
4548
using: composite
@@ -51,14 +54,14 @@ runs:
5154
- uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f #v31
5255
with:
5356
github_access_token: ${{ inputs.github_token }}
54-
- run: ${{ github.action_path }}/nix-develop.sh --command echo "dependencies installed"
57+
- run: $GITHUB_ACTION_PATH/nix-develop.sh --command echo "dependencies installed"
5558
shell: bash
5659
- name: Notify of metrics availability
5760
if: (inputs.prometheus_username != '')
5861
shell: bash
59-
run: ${{ github.action_path }}/notify-metrics-availability.sh
62+
run: $GITHUB_ACTION_PATH/notify-metrics-availability.sh
6063
env:
61-
GRAFANA_URL: https://grafana-poc.avax-dev.network/d/kBQpRdWnk/avalanche-main-dashboard?orgId=1&refresh=10s&var-filter=is_ephemeral_node%7C%3D%7Cfalse&var-filter=gh_repo%7C%3D%7C${{ inputs.repository_owner }}%2F${{ inputs.repository_name }}&var-filter=gh_run_id%7C%3D%7C${{ inputs.run_id }}&var-filter=gh_run_attempt%7C%3D%7C${{ inputs.run_attempt }}
64+
GRAFANA_URL: https://grafana-poc.avax-dev.network/d/${{ inputs.grafana_dashboard_id }}?orgId=1&refresh=10s&var-filter=is_ephemeral_node%7C%3D%7Cfalse&var-filter=gh_repo%7C%3D%7C${{ inputs.repository_owner }}%2F${{ inputs.repository_name }}&var-filter=gh_run_id%7C%3D%7C${{ inputs.run_id }}&var-filter=gh_run_attempt%7C%3D%7C${{ inputs.run_attempt }}
6265
GH_JOB_ID: ${{ inputs.job }}
6366
FILTER_BY_OWNER: ${{ inputs.filter_by_owner }}
6467
- name: Warn that collection of metrics and logs will not be performed
@@ -68,7 +71,7 @@ runs:
6871
- name: Run command
6972
shell: bash
7073
# --impure ensures the env vars are accessible to the command
71-
run: ${{ inputs.run_env }} ${{ github.action_path }}/nix-develop.sh --impure --command bash -x ${{ inputs.run }}
74+
run: ${{ inputs.run_env }} $GITHUB_ACTION_PATH/nix-develop.sh --impure --command bash -x ${{ inputs.run }}
7275
env:
7376
# Always collect metrics locally even when nodes are running in kube to enable collection from the test workload
7477
TMPNET_START_METRICS_COLLECTOR: ${{ inputs.prometheus_username != '' }}

.github/workflows/ci.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ jobs:
140140
# responsible for pushes.
141141
push: false
142142
# This version should match the version installed in the nix dev shell
143-
version: 1.47.2
143+
version: 1.52.1
144144
links-lint:
145145
name: Markdown Links Lint
146146
runs-on: ubuntu-latest
147147
steps:
148148
- uses: actions/checkout@v4
149-
- uses: umbrelladocs/action-linkspector@a0567ce1c7c13de4a2358587492ed43cab5d0102 #v1.3.4
149+
- uses: umbrelladocs/action-linkspector@de84085e0f51452a470558693d7d308fbb2fa261 #v1.2.5
150150
with:
151151
fail_level: any
152152
check_generated_protobuf:
@@ -233,7 +233,7 @@ jobs:
233233
shell: bash
234234
run: nix develop --command ./scripts/run_task.sh test-bootstrap-monitor-e2e
235235
load:
236-
name: Run load test
236+
name: Run process-based load test
237237
runs-on: ubuntu-latest
238238
steps:
239239
- uses: actions/checkout@v4
@@ -246,17 +246,31 @@ jobs:
246246
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
247247
loki_username: ${{ secrets.LOKI_ID || '' }}
248248
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
249-
load_kube:
250-
name: Run load test on kube
249+
load_kube_kind:
250+
name: Run load test on kind cluster
251251
runs-on: ubuntu-latest
252252
steps:
253253
- uses: actions/checkout@v4
254254
- uses: ./.github/actions/setup-go-for-project
255255
- uses: ./.github/actions/run-monitored-tmpnet-cmd
256256
with:
257-
run: ./scripts/run_task.sh test-load-kube
257+
run: ./scripts/run_task.sh test-load-kube-kind
258258
artifact_prefix: load-kube
259259
prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }}
260260
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
261261
loki_username: ${{ secrets.LOKI_ID || '' }}
262262
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
263+
load2:
264+
name: Run load2 test
265+
runs-on: ubuntu-latest
266+
steps:
267+
- uses: actions/checkout@v4
268+
- uses: ./.github/actions/setup-go-for-project
269+
- uses: ./.github/actions/run-monitored-tmpnet-cmd
270+
with:
271+
run: ./scripts/run_task.sh test-load2 -- --load-timeout=30s
272+
artifact_prefix: load2
273+
prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }}
274+
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
275+
loki_username: ${{ secrets.LOKI_ID || '' }}
276+
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Load test on self-hosted runners
2+
3+
# This workflow runs load tests against our Kubernetes cluster
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
avalanchego_image:
8+
description: 'AvalancheGo image to test'
9+
required: false
10+
default: 'avaplatform/avalanchego:latest'
11+
type: string
12+
exclusive_scheduling:
13+
description: 'Enable exclusive scheduling'
14+
required: false
15+
default: false
16+
type: boolean
17+
duration:
18+
description: "Load test duration: e.g. 5m, 10m, 1h..."
19+
required: false
20+
21+
jobs:
22+
load_test:
23+
name: Run load test on self-hosted runners
24+
runs-on: avalanche-avalanchego-runner
25+
container:
26+
image: ghcr.io/actions/actions-runner:2.325.0
27+
steps:
28+
- name: Install dependencies
29+
shell: bash
30+
# The xz-utils might be present on some containers
31+
run: |
32+
if ! command -v xz &> /dev/null; then
33+
sudo apt-get update
34+
sudo apt-get install -y xz-utils
35+
fi
36+
- uses: actions/checkout@v4
37+
- uses: ./.github/actions/setup-go-for-project
38+
- name: Run load test
39+
uses: ./.github/actions/run-monitored-tmpnet-cmd
40+
with:
41+
run: >-
42+
./scripts/run_task.sh test-load-kube --
43+
--kube-image ${{ inputs.avalanchego_image }}
44+
${{ inputs.exclusive_scheduling == 'true' && '--kube-use-exclusive-scheduling' || '' }}
45+
${{ inputs.duration && format('--duration {0}', inputs.duration) || '' }}
46+
artifact_prefix: self-hosted-load-test${{ inputs.exclusive_scheduling == 'true' && '-exclusive' || '' }}
47+
prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }}
48+
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
49+
loki_username: ${{ secrets.LOKI_ID || '' }}
50+
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}

0 commit comments

Comments
 (0)