Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit b44feeb
Author: Stephen Buttolph <[email protected]>
Date:   Wed Apr 3 19:49:53 2024 -0400

    Remove `linked.Hashmap` locking (#2911)

commit 0fea82e
Author: Stephen Buttolph <[email protected]>
Date:   Wed Apr 3 19:00:22 2024 -0400

    Avoid allocating new list entries (#2910)

commit d3a74eb
Author: Stephen Buttolph <[email protected]>
Date:   Wed Apr 3 17:57:33 2024 -0400

    Use generic linked list (#2909)

commit 93b9000
Author: Stephen Buttolph <[email protected]>
Date:   Wed Apr 3 17:29:21 2024 -0400

    Remove full message from error logs (#2912)

commit e1954bb
Author: Stephen Buttolph <[email protected]>
Date:   Wed Apr 3 17:27:29 2024 -0400

    Implement generic `linked.List` (#2908)

    Co-authored-by: dhrubabasu <[email protected]>

commit f786a24
Author: marun <[email protected]>
Date:   Wed Apr 3 19:18:29 2024 +0200

    [tmpnet] Misc cleanup to support xsvm warp test PR (#2903)

commit d103931
Author: Stephen Buttolph <[email protected]>
Date:   Wed Apr 3 12:47:16 2024 -0400

    Rename linkedhashmap package to `linked` (#2907)

commit d4507bf
Author: Joshua Kim <[email protected]>
Date:   Tue Apr 2 20:31:00 2024 -0400

    Remove AddEphemeralNode (#2887)

    Signed-off-by: Joshua Kim <[email protected]>

commit d7452d3
Author: Stephen Buttolph <[email protected]>
Date:   Tue Apr 2 20:21:29 2024 -0400

    Reuse key buffers during hashing (#2902)

commit 5be62de
Author: Stephen Buttolph <[email protected]>
Date:   Tue Apr 2 17:16:42 2024 -0400

    Conditionally allocate WaitGroup memory (#2901)

commit e7b14e4
Author: Stephen Buttolph <[email protected]>
Date:   Tue Apr 2 16:50:28 2024 -0400

    Move bootstrapping queue out of common (#2856)

commit 6699924
Author: Stephen Buttolph <[email protected]>
Date:   Tue Apr 2 16:44:05 2024 -0400

    Optimize key creation in hashing (#2899)

commit e4b82cf
Author: Stephen Buttolph <[email protected]>
Date:   Tue Apr 2 16:23:45 2024 -0400

    Remove usage of bytes.Buffer and bytes.Reader (#2896)

commit 434db9c
Author: Stephen Buttolph <[email protected]>
Date:   Tue Apr 2 14:41:41 2024 -0400

    Improve tracing of merkledb trie updates (#2897)

commit f7def4d
Author: Stephen Buttolph <[email protected]>
Date:   Tue Apr 2 13:47:56 2024 -0400

    Improve performance of marshalling small keys (#2895)

commit 00d4e0a
Author: Stephen Buttolph <[email protected]>
Date:   Tue Apr 2 11:21:26 2024 -0400

    Optimize hashing of leaf nodes (#2894)

commit 617a9e2
Author: Stephen Buttolph <[email protected]>
Date:   Tue Apr 2 11:01:46 2024 -0400

    Interval tree syncing integration (#2855)

commit 9a0c852
Author: Stephen Buttolph <[email protected]>
Date:   Tue Apr 2 09:38:12 2024 -0400

    Remove memory alloc from encodeDBNode (#2893)

commit 4163dce
Author: Stephen Buttolph <[email protected]>
Date:   Fri Mar 29 18:20:48 2024 -0400

    Move functions so that encode and decode are adjacent (#2892)

commit ce8253c
Author: Dhruba Basu <[email protected]>
Date:   Fri Mar 29 16:56:45 2024 -0400

    [vms/platformvm] Miscellaneous testing cleanups (#2891)

commit 2dbc9ba
Author: Stephen Buttolph <[email protected]>
Date:   Fri Mar 29 16:20:53 2024 -0400

    Optimize merkledb hashing (#2886)

commit d046f29
Author: marun <[email protected]>
Date:   Fri Mar 29 15:34:16 2024 +0100

    `ci`: Skip monitoring if secrets are not present (#2880)

commit 835d9ff
Author: Dhruba Basu <[email protected]>
Date:   Fri Mar 29 09:39:54 2024 -0400

    [vms/platformvm] Minimize exported functions in `txstest` (#2888)

commit b01d98d
Author: Stephen Buttolph <[email protected]>
Date:   Fri Mar 29 00:43:33 2024 -0400

    Remove merkledb codec struct (#2883)

commit 10b881f
Author: Dhruba Basu <[email protected]>
Date:   Thu Mar 28 21:54:25 2024 -0400

    [components/avax] Remove `AtomicUTXOManager` interface (#2884)

commit 2a0bd08
Author: Stephen Buttolph <[email protected]>
Date:   Thu Mar 28 19:53:12 2024 -0400

    Optimize encodeUint (#2882)

commit ec347cb
Author: Alberto Benegiamo <[email protected]>
Date:   Fri Mar 29 00:19:14 2024 +0100

    [vms/platformvm] Use `wallet` sdk in `txstest.Builder` (#2751)

    Co-authored-by: Stephen Buttolph <[email protected]>
    Co-authored-by: Dhruba Basu <[email protected]>

commit 70cd8e1
Author: Dhruba Basu <[email protected]>
Date:   Thu Mar 28 17:27:12 2024 -0400

    [vms/platformvm] Declare `maxPageSize` in `service.go` (#2881)

commit 42aefda
Author: Stephen Buttolph <[email protected]>
Date:   Wed Mar 27 17:36:37 2024 -0400

    Add tests for inefficient string formatting (#2878)

commit cb9386f
Author: marun <[email protected]>
Date:   Wed Mar 27 21:52:17 2024 +0100

    `tmpnet`: Improve subnet configuration (#2871)

    Signed-off-by: Stephen Buttolph <[email protected]>
    Co-authored-by: Stephen Buttolph <[email protected]>

commit 2f16057
Author: Stephen Buttolph <[email protected]>
Date:   Wed Mar 27 16:04:21 2024 -0400

    Update health API readme (#2875)

commit d60affa
Author: Alberto Benegiamo <[email protected]>
Date:   Wed Mar 27 17:09:52 2024 +0100

    Cleanup codec constants (#2699)

    Co-authored-by: Stephen Buttolph <[email protected]>

commit 402f96f
Author: Stephen Buttolph <[email protected]>
Date:   Tue Mar 26 17:06:43 2024 -0400

    Implement interval tree to replace bootstrapping jobs queue (#2756)

    Signed-off-by: Joshua Kim <[email protected]>
    Co-authored-by: Joshua Kim <[email protected]>

commit 800020b
Author: Meaghan FitzGerald <[email protected]>
Date:   Tue Mar 26 14:10:34 2024 -0600

    docs migration (#2845)

commit 0f6b123
Author: marun <[email protected]>
Date:   Tue Mar 26 19:12:18 2024 +0100

    Add detail to tmpnet metrics documentation (#2854)

    Signed-off-by: Stephen Buttolph <[email protected]>
    Co-authored-by: Stephen Buttolph <[email protected]>

commit f57f0f2
Author: Stephen Buttolph <[email protected]>
Date:   Tue Mar 26 13:59:34 2024 -0400

    Reindex P-chain blocks (#2869)

commit f945aa5
Author: Stephen Buttolph <[email protected]>
Date:   Tue Mar 26 13:41:51 2024 -0400

    indicies -> indices (#2873)

commit c896704
Author: marun <[email protected]>
Date:   Mon Mar 25 19:19:58 2024 +0100

    `tmpnet`: Ensure nodes are properly detached from the parent process (#2859)

    Signed-off-by: marun <[email protected]>
    Signed-off-by: Stephen Buttolph <[email protected]>
    Co-authored-by: Stephen Buttolph <[email protected]>
    Co-authored-by: Darioush Jalali <[email protected]>

commit 9833b45
Author: Stephen Buttolph <[email protected]>
Date:   Sat Mar 23 22:21:23 2024 -0400

    Revert removal of legacy P-chain block parsing (#2866)

commit 27bea09
Author: Stephen Buttolph <[email protected]>
Date:   Fri Mar 22 18:01:50 2024 -0400

    Push antithesis images (#2864)

commit 95edd92
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Fri Mar 22 10:46:12 2024 -0400

    Bump github.com/consensys/gnark-crypto from 0.10.0 to 0.12.1 (#2862)

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 7a67e5a
Author: Stephen Buttolph <[email protected]>
Date:   Thu Mar 21 18:15:24 2024 -0400

    Update versions for v1.11.3 (#2852)

    Co-authored-by: Darioush Jalali <[email protected]>

commit ffdb67f
Author: Stephen Buttolph <[email protected]>
Date:   Thu Mar 21 15:39:56 2024 -0400

    Remove duplicate log (#2860)

commit 14cdc04
Author: Stephen Buttolph <[email protected]>
Date:   Thu Mar 21 11:43:13 2024 -0400

    Remove useless bootstrapping metric (#2858)

commit 4d9bfdd
Author: marun <[email protected]>
Date:   Thu Mar 21 16:42:00 2024 +0100

    `tmpnet`: Reuse dynamically-allocated API port across restarts (#2857)

commit 23e5417
Author: Stephen Buttolph <[email protected]>
Date:   Wed Mar 20 01:48:04 2024 -0400

    Remove fallback validator height indexing (#2801)

commit 0118611
Author: Alberto Benegiamo <[email protected]>
Date:   Tue Mar 19 18:58:15 2024 +0100

    X-Chain - repackaged wallet backends (#2762)

    Co-authored-by: Stephen Buttolph <[email protected]>

commit 9cef7d3
Author: Alberto Benegiamo <[email protected]>
Date:   Tue Mar 19 02:51:27 2024 +0100

    P-Chain - repackaged wallet backends (#2757)

    Co-authored-by: Stephen Buttolph <[email protected]>

commit e88e565
Author: marun <[email protected]>
Date:   Mon Mar 18 19:18:53 2024 +0100

    `tmpnet`: Enable collection of logs and metrics (#2820)

commit 6249bab
Author: Alberto Benegiamo <[email protected]>
Date:   Mon Mar 18 19:11:00 2024 +0100

    Dynamic Fees - Add E Upgrade boilerplate (#2597)

    Co-authored-by: Stephen Buttolph <[email protected]>

commit 6a3661b
Author: aaronbuchwald <[email protected]>
Date:   Sun Mar 17 01:45:33 2024 -0400

    Remove verify height index (#2634)

    Co-authored-by: Stephen Buttolph <[email protected]>

commit a18c4a3
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Sat Mar 16 16:38:40 2024 +0000

    Bump bufbuild/buf-setup-action from 1.29.0 to 1.30.0 (#2842)

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Stephen Buttolph <[email protected]>

commit b62846f
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Fri Mar 15 15:28:36 2024 +0000

    Bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (#2849)

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Stephen Buttolph <[email protected]>

commit 5eaa9c2
Author: Derek Rada <[email protected]>
Date:   Fri Mar 15 08:00:29 2024 -0700

    packer build (#2806)

    Co-authored-by: yevhenvolchenko <[email protected]>

commit 598018b
Author: marun <[email protected]>
Date:   Thu Mar 14 20:38:07 2024 -0700

    `tmpnet`: Add a UUID to temporary networks to support metrics collection (#2763)

commit 4e2d005
Author: Dan Laine <[email protected]>
Date:   Thu Mar 14 16:22:59 2024 -0400

    update merkledb readme to specify key length is in bits (#2840)

commit 12cd5ec
Author: Stephen Buttolph <[email protected]>
Date:   Tue Mar 12 20:52:28 2024 -0400

    Allow configuring push gossip to send txs to validators by stake (#2835)

commit f0166fd
Author: Dan Laine <[email protected]>
Date:   Tue Mar 12 19:14:20 2024 -0400

    merkledb metric naming nits (#2844)

commit 31c0ce3
Author: Stephen Buttolph <[email protected]>
Date:   Tue Mar 12 19:13:48 2024 -0400

    Add Antithesis docker compose file (#2838)

    Signed-off-by: Stephen Buttolph <[email protected]>
    Co-authored-by: Dhruba Basu <[email protected]>

commit 6649530
Author: Stephen Buttolph <[email protected]>
Date:   Tue Mar 12 18:43:56 2024 -0400

    Add antithesis PoC workload (#2796)

commit ddf66ea
Author: Alberto Benegiamo <[email protected]>
Date:   Tue Mar 12 00:31:13 2024 +0100

    P-chain:  Improve GetValidatorsSet error expressivity (#2808)

    Co-authored-by: Stephen Buttolph <[email protected]>

commit f3abe3c
Author: Stephen Buttolph <[email protected]>
Date:   Mon Mar 11 09:37:40 2024 -0400

    Remove engine type handling for everything other than GetAncestors (#2800)

commit 6ec6a62
Author: Stephen Buttolph <[email protected]>
Date:   Mon Mar 11 09:09:23 2024 -0400

    Remove Durango codec check (#2818)

commit 2196015
Author: Dhruba Basu <[email protected]>
Date:   Mon Mar 11 09:09:02 2024 -0400

    Remove Pre-Durango TLS certificate parsing logic (#2831)

    Co-authored-by: Stephen Buttolph <[email protected]>

commit d003d29
Author: Dhruba Basu <[email protected]>
Date:   Fri Mar 8 23:12:16 2024 -0500

    Remove legacy p2p message handling (#2833)

    Co-authored-by: Stephen Buttolph <[email protected]>

commit b15c743
Author: Dhruba Basu <[email protected]>
Date:   Fri Mar 8 19:15:54 2024 -0500

    [utils/compression] Remove gzip compressor (#2839)

commit f02d463
Author: Stephen Buttolph <[email protected]>
Date:   Fri Mar 8 13:43:50 2024 -0500

    Prevent zero length values in slices and maps in codec (#2819)

commit d2d09c2
Author: Dhruba Basu <[email protected]>
Date:   Fri Mar 8 13:35:29 2024 -0500

    [vms/platformvm] Remove state pruning logic (#2825)

commit 8fedfd9
Author: Dhruba Basu <[email protected]>
Date:   Fri Mar 8 13:31:11 2024 -0500

    [vms/avm] Remove `snow.Context` from `Network` (#2834)

commit 73b6c60
Author: Dhruba Basu <[email protected]>
Date:   Fri Mar 8 12:14:50 2024 -0500

    [vms/avm] Cleanup `GetTx` + remove state pruning logic (#2826)

commit b8cd687
Author: Dhruba Basu <[email protected]>
Date:   Fri Mar 8 11:03:26 2024 -0500

    [network/peer] Disconnect from peers who only send legacy version field (#2830)

    Co-authored-by: Stephen Buttolph <[email protected]>

commit 4be015b
Author: Stephen Buttolph <[email protected]>
Date:   Fri Mar 8 10:55:34 2024 -0500

    Combine AppGossip and AppGossipSpecific (#2836)

commit a593cc4
Author: Dhruba Basu <[email protected]>
Date:   Thu Mar 7 17:45:11 2024 -0500

    [snow/networking] Enforce `PreferredIDAtHeight` in `Chits` messages (#2827)

commit 50ca08e
Author: Stephen Buttolph <[email protected]>
Date:   Thu Mar 7 15:30:34 2024 -0500

    Remove pre-Durango checks in BLS key verification (#2824)

commit 1340cce
Author: Stephen Buttolph <[email protected]>
Date:   Thu Mar 7 15:16:23 2024 -0500

    Remove pre-Durango block building logic and verification (#2823)

commit 67b1aa0
Author: Dhruba Basu <[email protected]>
Date:   Wed Mar 6 16:21:35 2024 -0500

    [vms/platformvm] Remove `ErrFutureStakeTime` check in `VerifyTx` (#2797)

commit 639b9ca
Author: Dhruba Basu <[email protected]>
Date:   Wed Mar 6 13:08:15 2024 -0500

    [vms/platformvm] Remove `GetPendingValidators` API (#2817)

commit 90a13f3
Author: Stephen Buttolph <[email protected]>
Date:   Wed Mar 6 12:44:15 2024 -0500

    Remove put gossip (#2790)

commit dc03622
Author: Dhruba Basu <[email protected]>
Date:   Wed Mar 6 11:47:43 2024 -0500

    Use `BaseTx` in P-chain wallet (#2731)

    Co-authored-by: Alberto Benegiamo <[email protected]>
    Co-authored-by: Stephen Buttolph <[email protected]>

commit dc2c5d0
Author: Stephen Buttolph <[email protected]>
Date:   Wed Mar 6 11:17:20 2024 -0500

    Remove bitmaskCodec (#2792)

commit 5793120
Author: Stephen Buttolph <[email protected]>
Date:   Wed Mar 6 10:57:34 2024 -0500

    Remove peerlist push gossip (#2791)

commit 66ae8ef
Author: Stephen Buttolph <[email protected]>
Date:   Wed Mar 6 10:51:17 2024 -0500

    Cleanup consensus metrics (#2815)

Signed-off-by: Joshua Kim <[email protected]>
  • Loading branch information
joshua-kim committed Apr 4, 2024
1 parent 429693b commit 106a87a
Show file tree
Hide file tree
Showing 431 changed files with 21,631 additions and 14,052 deletions.
60 changes: 0 additions & 60 deletions .github/packer/ubuntu-jammy-x86_64-public-ami.json

This file was deleted.

81 changes: 81 additions & 0 deletions .github/packer/ubuntu-jammy-x86_64-public-ami.pkr.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
packer {
required_plugins {
amazon = {
source = "github.com/hashicorp/amazon"
version = "~> 1"
}
ansible = {
source = "github.com/hashicorp/ansible"
version = "~> 1"
}
}
}

variable "skip_create_ami" {
type = string
default = "${env("SKIP_CREATE_AMI")}"
}

variable "tag" {
type = string
default = "${env("TAG")}"
}

variable "version" {
type = string
default = "jammy-22.04"
}

data "amazon-ami" "autogenerated_1" {
filters = {
architecture = "x86_64"
name = "ubuntu/images/*ubuntu-${var.version}-*-server-*"
root-device-type = "ebs"
virtualization-type = "hvm"
}
most_recent = true
owners = ["099720109477"]
region = "us-east-1"
}

locals {
skip_create_ami = var.skip_create_ami == "True"
timestamp = regex_replace(timestamp(), "[- TZ:]", "")
clean_name = regex_replace(timestamp(), "[^a-zA-Z0-9-]", "-")
}

source "amazon-ebs" "autogenerated_1" {
ami_groups = ["all"]
ami_name = "public-avalanche-ubuntu-${var.version}-${var.tag}-${local.timestamp}"
instance_type = "c5.large"
region = "us-east-1"
skip_create_ami = local.skip_create_ami
source_ami = "${data.amazon-ami.autogenerated_1.id}"
ssh_username = "ubuntu"
tags = {
Base_AMI_Name = "{{ .SourceAMIName }}"
Name = "public-avalanche-ubuntu-${var.version}-${var.tag}-${local.clean_name}"
Release = "${var.version}"
}
}

build {
sources = ["source.amazon-ebs.autogenerated_1"]

provisioner "shell" {
inline = ["while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done", "wait_apt=$(ps aux | grep apt | wc -l)", "while [ \"$wait_apt\" -gt \"1\" ]; do echo \"waiting for apt to be ready....\"; wait_apt=$(ps aux | grep apt | wc -l); sleep 5; done", "sudo apt-get -y update", "sudo apt-get install -y python3-boto3 golang"]
}

provisioner "ansible" {
extra_arguments = ["-e", "component=public-ami build=packer os_release=jammy tag=${var.tag}"]
playbook_file = ".github/packer/create_public_ami.yml"
roles_path = ".github/packer/roles/"
use_proxy = false
}

provisioner "shell" {
execute_command = "sudo bash -x {{ .Path }}"
script = ".github/packer/clean-public-ami.sh"
}

}
2 changes: 1 addition & 1 deletion .github/workflows/buf-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.29.0
- uses: bufbuild/buf-setup-action@v1.30.0
- uses: bufbuild/buf-push-action@v1
with:
input: "proto"
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/build-public-ami.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
tags:
- "*"

env:
PACKER_VERSION: "1.10.2"
PYTHON3_BOTO3_VERSION: "1.20.34+dfsg-1"

jobs:
build-public-ami-and-upload:
runs-on: ubuntu-22.04
Expand All @@ -26,7 +30,7 @@ jobs:
- name: Install aws cli
run: |
sudo apt update
sudo apt-get -y install packer python3-boto3
sudo apt-get -y install python3-boto3=${PYTHON3_BOTO3_VERSION}
- name: Get the tag
id: get_tag
Expand All @@ -53,6 +57,20 @@ jobs:
aws-secret-access-key: ${{ secrets.MARKETPLACE_KEY }}
aws-region: us-east-1

- name: Setup `packer`
uses: hashicorp/setup-packer@main
id: setup
with:
version: ${{ env.PACKER_VERSION }}

- name: Run `packer init`
id: init
run: "packer init ./.github/packer/ubuntu-jammy-x86_64-public-ami.pkr.hcl"

- name: Run `packer validate`
id: validate
run: "packer validate ./.github/packer/ubuntu-jammy-x86_64-public-ami.pkr.hcl"

- name: Create AMI and upload to marketplace
run: |
./.github/workflows/update-ami.py
Expand Down
109 changes: 103 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:

env:
go_version: '~1.21.8'
tmpnet_data_path: ~/.tmpnet/networks/1000
grafana_url: https://grafana-experimental.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%7Cava-labs%2Favalanchego&var-filter=gh_run_id%7C%3D%7C${{ github.run_id }}&var-filter=gh_run_attempt%7C%3D%7C${{ github.run_attempt }}

jobs:
Unit:
Expand Down Expand Up @@ -67,15 +67,48 @@ jobs:
- name: Build AvalancheGo Binary
shell: bash
run: ./scripts/build.sh -r
- name: Start prometheus
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: bash -x ./scripts/run_prometheus.sh
env:
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
- name: Start promtail
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: bash -x ./scripts/run_promtail.sh
env:
LOKI_ID: ${{ secrets.LOKI_ID }}
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
- name: Notify of metrics availability
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: .github/workflows/notify-metrics-availability.sh
env:
GRAFANA_URL: ${{ env.grafana_url }}
GH_JOB_ID: ${{ github.job }}
FILTER_BY_OWNER: avalanchego-e2e
- name: Run e2e tests
shell: bash
run: E2E_SERIAL=1 ./scripts/tests.e2e.sh
env:
GH_REPO: ${{ github.repository }}
GH_WORKFLOW: ${{ github.workflow }}
GH_RUN_ID: ${{ github.run_id }}
GH_RUN_NUMBER: ${{ github.run_number }}
GH_RUN_ATTEMPT: ${{ github.run_attempt }}
GH_JOB_ID: ${{ github.job }}
- name: Upload tmpnet network dir
uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-tmpnet-data
path: ${{ env.tmpnet_data_path }}
path: |
~/.tmpnet/networks
~/.tmpnet/prometheus/prometheus.log
~/.tmpnet/promtail/promtail.log
if-no-files-found: error
e2e_existing_network:
runs-on: ubuntu-latest
Expand All @@ -88,15 +121,47 @@ jobs:
- name: Build AvalancheGo Binary
shell: bash
run: ./scripts/build.sh -r
- name: Start prometheus
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: bash -x ./scripts/run_prometheus.sh
env:
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
- name: Start promtail
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: bash -x ./scripts/run_promtail.sh
env:
LOKI_ID: ${{ secrets.LOKI_ID }}
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
- name: Notify of metrics availability
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: .github/workflows/notify-metrics-availability.sh
env:
GRAFANA_URL: ${{ env.grafana_url }}
GH_JOB_ID: ${{ github.job }}
- name: Run e2e tests with existing network
shell: bash
run: E2E_SERIAL=1 ./scripts/tests.e2e.existing.sh
env:
GH_REPO: ${{ github.repository }}
GH_WORKFLOW: ${{ github.workflow }}
GH_RUN_ID: ${{ github.run_id }}
GH_RUN_NUMBER: ${{ github.run_number }}
GH_RUN_ATTEMPT: ${{ github.run_attempt }}
GH_JOB_ID: ${{ github.job }}
- name: Upload tmpnet network dir
uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-existing-network-tmpnet-data
path: ${{ env.tmpnet_data_path }}
path: |
~/.tmpnet/networks
~/.tmpnet/prometheus/prometheus.log
~/.tmpnet/promtail/promtail.log
if-no-files-found: error
Upgrade:
runs-on: ubuntu-latest
Expand All @@ -109,15 +174,47 @@ jobs:
- name: Build AvalancheGo Binary
shell: bash
run: ./scripts/build.sh
- name: Start prometheus
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: bash -x ./scripts/run_prometheus.sh
env:
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
- name: Start promtail
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: bash -x ./scripts/run_promtail.sh
env:
LOKI_ID: ${{ secrets.LOKI_ID }}
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
- name: Notify of metrics availability
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: .github/workflows/notify-metrics-availability.sh
env:
GRAFANA_URL: ${{ env.grafana_url }}
GH_JOB_ID: ${{ github.job }}
- name: Run e2e tests
shell: bash
run: ./scripts/tests.upgrade.sh
env:
GH_REPO: ${{ github.repository }}
GH_WORKFLOW: ${{ github.workflow }}
GH_RUN_ID: ${{ github.run_id }}
GH_RUN_NUMBER: ${{ github.run_number }}
GH_RUN_ATTEMPT: ${{ github.run_attempt }}
GH_JOB_ID: ${{ github.job }}
- name: Upload tmpnet network dir
uses: actions/upload-artifact@v4
if: always()
with:
name: upgrade-tmpnet-data
path: ${{ env.tmpnet_data_path }}
path: |
~/.tmpnet/networks
~/.tmpnet/prometheus/prometheus.log
~/.tmpnet/promtail/promtail.log
if-no-files-found: error
Lint:
runs-on: ubuntu-latest
Expand All @@ -138,7 +235,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.29.0
- uses: bufbuild/buf-setup-action@v1.30.0
with:
github_token: ${{ github.token }}
- uses: bufbuild/buf-lint-action@v1
Expand All @@ -153,7 +250,7 @@ jobs:
with:
go-version: ${{ env.go_version }}
check-latest: true
- uses: bufbuild/buf-setup-action@v1.29.0
- uses: bufbuild/buf-setup-action@v1.30.0
- shell: bash
run: scripts/protobuf_codegen.sh
- shell: bash
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/notify-metrics-availability.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -euo pipefail

# Timestamps are in seconds
from_timestamp="$(date '+%s')"
monitoring_period=900 # 15 minutes
to_timestamp="$((from_timestamp + monitoring_period))"

# Grafana expects microseconds, so pad timestamps with 3 zeros
metrics_url="${GRAFANA_URL}&var-filter=gh_job_id%7C%3D%7C${GH_JOB_ID}&from=${from_timestamp}000&to=${to_timestamp}000"

# Optionally ensure that the link displays metrics only for the shared
# network rather than mixing it with the results for private networks.
if [[ -n "${FILTER_BY_OWNER:-}" ]]; then
metrics_url="${metrics_url}&var-filter=network_owner%7C%3D%7C${FILTER_BY_OWNER}"
fi

echo "::notice links::metrics ${metrics_url}"
Loading

0 comments on commit 106a87a

Please sign in to comment.