Skip to content

Commit ea7cae4

Browse files
authored
Merge branch 'master' into simplex-tracker
Signed-off-by: Sam Liokumovich <[email protected]>
2 parents 0b8baab + eb6f96d commit ea7cae4

Some content is hidden

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

64 files changed

+3460
-3666
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: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ 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
@@ -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,15 +246,15 @@ 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 || '' }}
@@ -274,4 +274,3 @@ jobs:
274274
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
275275
loki_username: ${{ secrets.LOKI_ID || '' }}
276276
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
277-
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 || '' }}

Taskfile.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,12 @@ tasks:
199199
- cmd: bash -x ./scripts/tests.e2e.kube.sh {{.CLI_ARGS}}
200200

201201
test-e2e-kube-ci:
202-
desc: Runs e2e tests against a network deployed to kube [serially]
202+
# Free github action runners do not have sufficient resources to reliably run a full e2e run against a kube-hosted network
203+
desc: Runs the xsvm e2e tests in serial against a network deployed to kube
203204
env:
204205
E2E_SERIAL: 1
205206
cmds:
206-
- task: test-e2e-kube
207+
- cmd: bash -x ./scripts/tests.e2e.kube.sh --ginkgo.focus-file=xsvm.go {{.CLI_ARGS}}
207208

208209
# To use a different fuzz time, run `task test-fuzz FUZZTIME=[value in seconds]`.
209210
# A value of `-1` will run until it encounters a failing output.
@@ -233,15 +234,9 @@ tasks:
233234
- task: build
234235
- cmd: go run ./tests/load/c/main --avalanchego-path=./build/avalanchego {{.CLI_ARGS}}
235236

236-
test-load-kube:
237-
desc: Runs load tests against a network deployed to kube
238-
cmds:
239-
- task: generate-load-contract-bindings
240-
- cmd: bash -x ./scripts/tests.load.kube.sh {{.CLI_ARGS}}
241-
242237
test-load2:
243238
desc: Runs second iteration of load tests
244-
cmds:
239+
cmds:
245240
- task: build
246241
- cmd: go run ./tests/load2/main --avalanchego-path=./build/avalanchego {{.CLI_ARGS}}
247242

@@ -250,6 +245,18 @@ tasks:
250245
cmds:
251246
- cmd: go run ./tests/load/c/main --runtime=kube --kube-use-exclusive-scheduling {{.CLI_ARGS}}
252247

248+
test-load-kube:
249+
desc: Runs load tests against a kubernetes cluster
250+
cmds:
251+
- task: generate-load-contract-bindings
252+
- cmd: go run ./tests/load/c/main --runtime=kube {{.CLI_ARGS}}
253+
254+
test-load-kube-kind:
255+
desc: Runs load tests against a kind cluster
256+
cmds:
257+
- task: generate-load-contract-bindings
258+
- cmd: bash -x ./scripts/tests.load.kube.kind.sh {{.CLI_ARGS}}
259+
253260
test-unit:
254261
desc: Runs unit tests
255262
# Invoking with bash ensures compatibility with CI execution on Windows

connectproto/pb/xsvm/service.pb.go

Lines changed: 32 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

connectproto/pb/xsvm/xsvmconnect/service.connect.go

Lines changed: 6 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)