Skip to content

Commit 8b0ef32

Browse files
qdm12maru-avaDarioush Jalali
authored
chore(ci): simplify monitoring configuration (re-apply #1440) (#1545)
Signed-off-by: maru <[email protected]> Co-authored-by: maru <[email protected]> Co-authored-by: Darioush Jalali <[email protected]>
1 parent 0abb00e commit 8b0ef32

File tree

11 files changed

+115
-256
lines changed

11 files changed

+115
-256
lines changed

.envrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# - Will execute on entry to the containing directory only if authorized with `direnv allow`
2+
# - Requires a recent version of direnv (https://direnv.net/)
3+
# - For quieter direnv output, set `export DIRENV_LOG_FORMAT=`
4+
5+
# Determine AVALANCHE_VERSION
6+
source ./scripts/versions.sh
7+
8+
# - Starts an avalanchego dev shell
9+
# - Requires nix (https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#install-nix)
10+
use flake "github:ava-labs/avalanchego?ref=${AVALANCHE_VERSION}"

.github/workflows/tests.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ jobs:
3838
run: |
3939
go mod tidy
4040
git diff --exit-code
41+
- name: Ensure consistent avalanchego version
42+
shell: bash
43+
run: |
44+
bash -x ./scripts/update_avalanchego_version.sh
45+
git diff --exit-code
4146
4247
unit_test:
4348
name: Golang Unit Tests (${{ matrix.os }})
@@ -146,18 +151,15 @@ jobs:
146151
shell: bash
147152
run: ./scripts/build.sh
148153
- name: Run Warp E2E Tests
149-
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@v1.11.13
154+
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@6c72dfc4254a3d157bba5c9c45135cb563b813e7
150155
with:
151-
run: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego ./scripts/run_ginkgo_warp.sh
152-
prometheus_id: ${{ secrets.PROMETHEUS_ID || '' }}
156+
run: ./scripts/run_ginkgo_warp.sh
157+
run_env: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego
158+
artifact_prefix: warp
159+
prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }}
153160
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
154-
loki_id: ${{ secrets.LOKI_ID || '' }}
161+
loki_username: ${{ secrets.LOKI_ID || '' }}
155162
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
156-
- name: Upload tmpnet network dir for warp testing
157-
uses: ava-labs/avalanchego/.github/actions/upload-tmpnet-artifact@v1-actions
158-
if: always()
159-
with:
160-
name: warp-tmpnet-data
161163
e2e_load:
162164
name: e2e load tests
163165
runs-on: ubuntu-latest
@@ -177,18 +179,15 @@ jobs:
177179
shell: bash
178180
run: ./scripts/build.sh
179181
- name: Run E2E Load Tests
180-
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@v1.11.13
182+
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@6c72dfc4254a3d157bba5c9c45135cb563b813e7
181183
with:
182-
run: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego ./scripts/run_ginkgo_load.sh
183-
prometheus_id: ${{ secrets.PROMETHEUS_ID || '' }}
184+
run: ./scripts/run_ginkgo_load.sh
185+
run_env: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego
186+
artifact_prefix: load
187+
prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }}
184188
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
185-
loki_id: ${{ secrets.LOKI_ID || '' }}
189+
loki_username: ${{ secrets.LOKI_ID || '' }}
186190
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
187-
- name: Upload tmpnet network dir for load testing
188-
uses: ava-labs/avalanchego/.github/actions/upload-tmpnet-artifact@v1-actions
189-
if: always()
190-
with:
191-
name: load-tmpnet-data
192191
test_build_image:
193192
name: Image build
194193
runs-on: ubuntu-latest

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,5 @@ diffs/
5858

5959
# clone used for antithesis image builds
6060
avalanchego/
61+
62+
.direnv

bin/tmpnetctl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
# Ensure the go command is run from the root of the repository
6+
REPO_ROOT=$(cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd )
7+
cd "${REPO_ROOT}"
8+
9+
# Set AVALANCHE_VERSION
10+
. ./scripts/versions.sh
11+
12+
echo "Running tmpnetctl @ ${AVALANCHE_VERSION}"
13+
go run github.com/ava-labs/avalanchego/tests/fixture/tmpnet/tmpnetctl@"${AVALANCHE_VERSION}" "${@}"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.23.6
55
require (
66
github.com/VictoriaMetrics/fastcache v1.12.1
77
github.com/antithesishq/antithesis-sdk-go v0.3.8
8-
github.com/ava-labs/avalanchego v1.13.0
8+
github.com/ava-labs/avalanchego v1.13.1-0.20250321174807-6c72dfc4254a
99
github.com/cespare/cp v0.1.0
1010
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233
1111
github.com/davecgh/go-spew v1.1.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl
6262
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
6363
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
6464
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
65-
github.com/ava-labs/avalanchego v1.13.0 h1:bUWMWLShC0ACa5bQgZdBEJf5lMn1lJIvFrolj3iqTZk=
66-
github.com/ava-labs/avalanchego v1.13.0/go.mod h1:fpV/GmbfIB3P53gkq6zFpyeQtyAsJIuZCCKnm7TJ4sQ=
65+
github.com/ava-labs/avalanchego v1.13.1-0.20250321174807-6c72dfc4254a h1:JiXcmzcosrMp35ow+lQ9DQxrWvX9y+AGgGFhAGZcfgA=
66+
github.com/ava-labs/avalanchego v1.13.1-0.20250321174807-6c72dfc4254a/go.mod h1:fpV/GmbfIB3P53gkq6zFpyeQtyAsJIuZCCKnm7TJ4sQ=
6767
github.com/ava-labs/coreth v0.15.0-rc.0 h1:wabaNbSXcqhhO6Qg/9fnrgDNCuP3StwB5sls45dHbiI=
6868
github.com/ava-labs/coreth v0.15.0-rc.0/go.mod h1:gIGr+5WDNX1DrFvUMy53AtTpkxlM/8cNOD/PDIChKfM=
6969
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=

scripts/dev_shell.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
# Requires nix to be installed. The determinate systems installer is recommended:
6+
#
7+
# https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#install-nix
8+
#
9+
10+
# Load AVALANCHE_VERSION
11+
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
12+
# shellcheck source=/scripts/versions.sh
13+
source "$SCRIPT_DIR"/versions.sh
14+
15+
# Start a dev shell with the avalanchego flake
16+
FLAKE="github:ava-labs/avalanchego?ref=${AVALANCHE_VERSION}"
17+
echo "Starting nix shell for ${FLAKE}"
18+
nix develop "${FLAKE}" "${@}"

scripts/run_prometheus.sh

Lines changed: 0 additions & 120 deletions
This file was deleted.

scripts/run_promtail.sh

Lines changed: 0 additions & 115 deletions
This file was deleted.

0 commit comments

Comments
 (0)