Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
86d2a41
Don't use labels for branch names creation in the backport bot (#9243)
EgorPopelyaev Jul 17, 2025
6b17df5
Remove unused deps (#9235)
dimartiro Jul 17, 2025
0ae5c5b
Fixed genesis config presets for bridge tests (#9185)
antkve Jul 17, 2025
b9fd81b
Remove `subwasmlib` (#9252)
bkchr Jul 18, 2025
8b21416
zombienet, make logs for para works (#9230)
pepoviola Jul 18, 2025
e007db0
feat(cumulus): Adds support for additional relay state keys in parach…
RomarQ Jul 18, 2025
0d21066
Allow locking to bump consumer without limits (#9176)
kianenigma Jul 20, 2025
b17f06b
babe: keep stateless verification in `Verifier`, move everything else…
sistemd Jul 20, 2025
13950ee
Fix CandidateDescriptor debug logs (#9255)
AlexandruCihodaru Jul 21, 2025
443c2ff
Rewrite validator disabling test with zombienet-sdk (#9128)
AlexandruCihodaru Jul 21, 2025
c7f9908
gossip-support: make low connectivity message an error (#9264)
alexggh Jul 21, 2025
b4f1cc6
Allow setting idle connection timeout value in custom node implementa…
dmitry-markin Jul 21, 2025
7a747ff
[revive] eth-decimals (#9101)
pgherveou Jul 21, 2025
161e7f4
Rewrite old disputes test with zombienet-sdk (#9257)
AlexandruCihodaru Jul 21, 2025
b4b019e
Zombienet CI improvements (#9172)
lrubasze Jul 21, 2025
2f8d2a2
consensus/grandpa: Fix high number of peer disconnects with invalid j…
lexnv Jul 22, 2025
db5e645
network: Upgrade litep2p to v0.10.0 (#9287)
dmitry-markin Jul 22, 2025
6a951f7
Dedup dependencies between dependencies and dev-dependencies (#9233)
dimartiro Jul 22, 2025
419ab3c
Ci-unified update (with solc and resolc) (#9289)
AndWeHaveAPlan Jul 22, 2025
e2802be
fix: skip verifying imported blocks (#9280)
sistemd Jul 22, 2025
a34de56
[Staking Async] Saturating accrue era reward points (#9186)
Ank4n Jul 23, 2025
9428742
Replace `log` with `tracing` on `pallet-bridge-grandpa` (#9294)
raymondkfcheung Jul 23, 2025
069b7b5
Fix subsume_assets incorrectly merging two AssetsInHolding (#9179)
karolk91 Jul 24, 2025
e5e3941
yap-runtime: fixes for `GetParachainInfo` (#9312)
ordian Jul 24, 2025
bb39b4e
RecentDisputes/ActiveDisputes use BTreeMap instead of Vec (#9309)
AlexandruCihodaru Jul 24, 2025
5b4ce9c
network/litep2p: Switch to system DNS resolver (#9321)
dmitry-markin Jul 25, 2025
7a60803
litep2p/discovery: Ensure non-global addresses are not reported as ex…
lexnv Jul 25, 2025
e11b1dc
[Backport] Regular version bumps and prdoc reordering from the stable…
EgorPopelyaev Jul 25, 2025
cea0d61
add node version to the announcement message
EgorPopelyaev Jul 25, 2025
d3e9010
test in the internal room
EgorPopelyaev Jul 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 9 additions & 6 deletions .github/actions/zombienet-sdk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ inputs:
ref-slug:
description: "Ref slug (e.g branch-name-short)"
required: true
test:
test-filter:
description: "test filter to pass to nextest (e.g: functional::spam_statement_distribution_requests::spam_statement_distribution_requests_test)"
required: true
job-name:
description: "Job name to use for artifact uploading"
required: true
prefix:
description: "Archive prefix for tests files (e.g polkadot, cumulus or substrate)"
required: true
Expand All @@ -25,7 +28,7 @@ runs:
- name: common_vars
shell: bash
env:
TEST_NAME: ${{ inputs.test }}
TEST_FILTER: ${{ inputs.test-filter }}
PREFIX: ${{ inputs.prefix }}
run: |
echo "Vars"
Expand All @@ -36,7 +39,7 @@ runs:
echo "COL_IMAGE: $COL_IMAGE"
echo "MALUS_IMAGE: $MALUS_IMAGE"
echo "Inputs"
echo "test: $TEST_NAME"
echo "test: $TEST_FILTER"
echo "prefix: $PREFIX"

- name: Download binaries for zombienet native tests
Expand Down Expand Up @@ -66,7 +69,7 @@ runs:
env:
# don't retry sdk tests
NEXTEST_RETRIES: 0
TEST_NAME: ${{ inputs.test }}
TEST_FILTER: ${{ inputs.test-filter }}
PREFIX: ${{ inputs.prefix }}
run: |
# RUN_IN_CI=1 shall be set only for k8s provider
Expand All @@ -87,7 +90,7 @@ runs:
# We want to run tests sequentially, '--no-capture' ensures that.
# If we want to get rid of '--no-capture' some day, please use '--test-threads 1' or NEXTEST_TEST_THREADS=1
# Both options cannot coexist for cargo-nextest below v0.9.94
cargo nextest run --archive-file ./artifacts/${PREFIX}-zombienet-tests.tar.zst --no-capture -- ${TEST_NAME}
cargo nextest run --archive-file ./artifacts/${PREFIX}-zombienet-tests.tar.zst --no-capture -- ${TEST_FILTER}

- name: process_logs
if: ${{ ! cancelled() }}
Expand All @@ -108,7 +111,7 @@ runs:
uses: actions/upload-artifact@v4
if: ${{ ! cancelled() }}
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
name: zombienet-logs-${{ inputs.job-name }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*

18 changes: 11 additions & 7 deletions .github/actions/zombienet/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: "Zombienet test v1"
description: "Runs zombienet tests"
inputs:
test:
test-definition:
description: "test definition (zndsl file)"
required: true
job-name:
description: "Job name to use for artifact uploading"
required: true
local-dir:
description: "Path to the directory tha contains the test file (.zndsl)"
required: true
Expand All @@ -27,7 +30,7 @@ runs:
- name: common_vars
shell: bash
env:
TEST_NAME: ${{ inputs.test }}
TEST_DEFINITION: ${{ inputs.test-definition }}
LOCAL_PATH: ${{ inputs.local-dir }}
CONCURRENCY: ${{ inputs.concurrency }}
run: |
Expand All @@ -36,7 +39,8 @@ runs:
echo "ZOMBIENET_PROVIDER: $ZOMBIENET_PROVIDER"
echo "COL_IMAGE: $COL_IMAGE"
echo "Inputs"
echo "test: $TEST_NAME"
echo "test-definition: $TEST_DEFINITION"
echo "job-name: ${{ inputs.job-name }}"
echo "local-dir: $LOCAL_PATH"
echo "concurrency: $CONCURRENCY"

Expand All @@ -59,7 +63,7 @@ runs:
- name: zombie_test
shell: bash
env:
TEST_NAME: ${{ inputs.test }}
TEST_DEFINITION: ${{ inputs.test-definition }}
LOCAL_PATH: ${{ inputs.local-dir }}
CONCURRENCY: ${{ inputs.concurrency }}
run: |
Expand All @@ -71,7 +75,7 @@ runs:
./.github/scripts/run-zombienet-test.sh \
"$(pwd)/$LOCAL_PATH" \
$CONCURRENCY \
"$TEST_NAME"
"$TEST_DEFINITION"
else
# no need to check other runner variables. for k8s they shall store the same value
if [[ $ZOMBIENET_DEFAULT_RUNNER == "parity-zombienet" ]]; then
Expand All @@ -81,7 +85,7 @@ runs:
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh \
--local-dir="$(pwd)/$LOCAL_PATH" \
--concurrency=$CONCURRENCY \
--test="$TEST_NAME"
--test="$TEST_DEFINITION"
fi

- name: process_logs
Expand All @@ -102,7 +106,7 @@ runs:
uses: actions/upload-artifact@v4
if: ${{ ! cancelled() }}
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
name: zombienet-logs-${{ inputs.job-name }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*

2 changes: 1 addition & 1 deletion .github/env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
IMAGE="docker.io/paritytech/ci-unified:bullseye-1.88.0-2025-06-27-v202507112050"
IMAGE="docker.io/paritytech/ci-unified:bullseye-1.88.0-2025-06-27-v202507221446"
123 changes: 123 additions & 0 deletions .github/scripts/dispatch-zombienet-workflow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
#!/bin/bash

# Zombienet Workflow Dispatcher
#
# This script triggers GitHub Actions workflows for zombienet tests and monitors their execution.
# It can run workflows multiple times for reliability testing and optionally filter tests by pattern.
# Results are automatically saved to a timestamped CSV file for analysis.
#
# Features:
# - Trigger workflows on specific branches
# - Filter tests by pattern (useful for debugging specific tests)
# - Run workflows multiple times for flaky test detection
# - Monitor workflow completion and collect results
# - Export results to CSV with job details (ID, name, conclusion, timing, URLs)
#
# Requirements:
# - GitHub CLI (gh) must be installed and authenticated
# - Must be run from polkadot-sdk repository root
# - Target branch must have corresponding PR with CI enabled

# Exit on error
# set -e

function dbg {
local msg="$@"

local tstamp=$(date "+%Y-%m-%d %T")
printf "%s - %s\n" "$tstamp" "$msg"
}

function write_job_results_to_csv {
local run_id="$1"
local branch="$2"
local csv_file="$3"

dbg "Writing job results for run $run_id to $csv_file"

# Get job details for the completed run, filtering only jobs starting with 'zombienet-' and with success or failure conclusions
gh run view "$run_id" --json jobs --jq \
'.jobs[] | select(.name | startswith("zombienet-")) |
select(.conclusion == "success" or .conclusion == "failure") |
[.databaseId, .name, .conclusion, .startedAt, "'"$branch"'", .url] | @csv' >> "$csv_file"
}

# Parse command line arguments
WORKFLOW_FILE=""
BRANCH=""
MAX_RESULT_CNT=-1
TEST_PATTERN=""

while getopts "w:b:m:p:h" opt; do
case $opt in
w) WORKFLOW_FILE="$OPTARG" ;;
b) BRANCH="$OPTARG" ;;
m) MAX_RESULT_CNT="$OPTARG" ;;
p) TEST_PATTERN="$OPTARG" ;;
h) echo "Usage: $0 -w <workflow-file> -b <branch> [-m max-triggers] [-p test-pattern]"
echo " -w: Workflow file (required)"
echo " -b: Branch name (required)"
echo " -m: Maximum number of triggers (optional, default: infinite)"
echo " -p: Test pattern for workflow input (optional)"
exit 0 ;;
\?) echo "Invalid option -$OPTARG" >&2
echo "Use -h for help"
exit 1 ;;
esac
done

if [[ -z "$WORKFLOW_FILE" || -z "$BRANCH" ]]; then
echo "Error: Both workflow file (-w) and branch (-b) are required"
echo "Usage: $0 -w <workflow-file> -b <branch> [-m max-triggers] [-p test-pattern]"
echo "Use -h for help"
exit 1
fi

# Create CSV file with headers
CSV_FILE="workflow_results_$(date +%Y%m%d_%H%M%S).csv"
echo "job_id,job_name,conclusion,started_at,branch,job_url" > "$CSV_FILE"
dbg "Created CSV file: $CSV_FILE"

dbg "Starting loop for workflow: $WORKFLOW_FILE on branch: $BRANCH"

TRIGGER_CNT=0
RESULT_CNT=0

while [[ $MAX_RESULT_CNT -eq -1 || $RESULT_CNT -lt $MAX_RESULT_CNT ]]; do

dbg "Waiting until workflow $WORKFLOW_FILE (branch: $BRANCH) jobs are completed"

while true ; do
echo ""
gh run list --workflow=$WORKFLOW_FILE -e workflow_dispatch -b $BRANCH -L 5
sleep 2
# if job is completed it should have non-empty conclusion field
ALL_JOBS_COMPLETED=$(gh run list --workflow=$WORKFLOW_FILE -e workflow_dispatch -b $BRANCH --json conclusion --jq 'all(.[]; .conclusion != "")')
if [[ "$ALL_JOBS_COMPLETED" == "true" ]]; then
break
fi
sleep 60
done
dbg "Workflow $WORKFLOW_FILE (branch: $BRANCH) jobs completed"

# Skip the first iteration - latest run id is not the one we triggered here
if [ $TRIGGER_CNT -gt 0 ]; then
# Get the most recent completed run ID and write job results to CSV
LATEST_RUN_ID=$(gh run list --workflow=$WORKFLOW_FILE -e workflow_dispatch -b $BRANCH -L 1 --json databaseId --jq '.[0].databaseId')
write_job_results_to_csv "$LATEST_RUN_ID" "$BRANCH" "$CSV_FILE"
RESULT_CNT=$(( RESULT_CNT + 1 ))
fi

TRIGGER_CNT=$(( TRIGGER_CNT + 1 ))
dbg "Triggering #$TRIGGER_CNT workflow $WORKFLOW_FILE (branch: $BRANCH)"

if [[ -n "$TEST_PATTERN" ]]; then
gh workflow run "$WORKFLOW_FILE" --ref "$BRANCH" -f test_pattern="$TEST_PATTERN"
else
gh workflow run "$WORKFLOW_FILE" --ref "$BRANCH"
fi

dbg "Sleeping 60s"
sleep 60
done

63 changes: 63 additions & 0 deletions .github/scripts/parse-zombienet-tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/usr/bin/env python3

"""
Zombienet Test Matrix Parser

This script parses YAML test definition files and converts them to JSON format
for use as GitHub Actions matrix jobs. It provides filtering capabilities to:

1. Exclude flaky tests (unless a specific test pattern is provided)
2. Filter tests by name pattern for targeted execution
3. Convert YAML test definitions to JSON matrix format

The script is used by GitHub Actions workflows to dynamically generate
test matrices based on YAML configuration files, enabling flexible
test execution and maintenance.

Usage:
python parse-zombienet-tests.py --matrix tests.yml [--flaky-tests flaky.txt] [--test-pattern pattern]

Output:
JSON array of test job objects suitable for GitHub Actions matrix strategy
"""

import argparse
import yaml
import json
import fnmatch

def parse_args():
parser = argparse.ArgumentParser(description="Parse test matrix YAML file with optional filtering")
parser.add_argument("--matrix", required=True, help="Path to the YAML matrix file")
parser.add_argument("--flaky-tests", default="", help="Newline-separated list of flaky job names")
parser.add_argument("--test-pattern", default="", help="Pattern to match job_name (substring or glob)")
return parser.parse_args()

def load_jobs(matrix_path):
with open(matrix_path, "r") as f:
return yaml.safe_load(f)

def filter_jobs(jobs, flaky_tests, test_pattern):
flaky_set = set(name.strip() for name in flaky_tests.splitlines() if name.strip())
filtered = []

for job in jobs:
name = job.get("job-name", "")

# If test_pattern provided then don't care about flaky tests, just check test_pattern
if test_pattern and len(test_pattern) > 0:
if fnmatch.fnmatch(name, f"*{test_pattern}*"):
filtered.append(job)
elif name not in flaky_set:
filtered.append(job)

return filtered

def main():
args = parse_args()
jobs = load_jobs(args.matrix)
result = filter_jobs(jobs, args.flaky_tests, args.test_pattern)
print(json.dumps(result))

if __name__ == "__main__":
main()
24 changes: 11 additions & 13 deletions .github/scripts/process-logs-zombienet-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ fi
NS=$(jq -r '.ns // .namespace' "$ZOMBIE_JSON")
# test start time in milliseconds
FROM=$(jq -r '.start_time_ts' "$ZOMBIE_JSON")
# current time in milliseconds
TO=$(date +%s%3N)
# current time in milliseconds + 60 secs to allow loki to ingest logs
TO=$(($(date +%s%3N) + 60000))

make_url() {
local name="$1"
local to="$2"
local url="${LOKI_URL_FOR_NODE//\{\{namespace\}\}/$NS}"
url="${url//\{\{podName\}\}/$name}"
url="${url//\{\{from\}\}/$FROM}"
url="${url//\{\{to\}\}/$TO}"
url="${url//\{\{to\}\}/$to}"
echo "$url"
}

Expand All @@ -54,6 +55,7 @@ if [[ $(echo "$NS" | grep -E "zombie-[A-Fa-f0-9]+-") ]]; then
fi;

jq -r $JQ_QUERY_RELAY "$ZOMBIE_JSON" | while read -r name; do
local_to=$TO
if [[ "$ZOMBIE_PROVIDER" == "k8s" ]]; then
# Fetching logs from k8s
if ! kubectl logs "$name" -c "$name" -n "$NS" > "$TARGET_DIR/$name.log" ; then
Expand All @@ -68,23 +70,19 @@ jq -r $JQ_QUERY_RELAY "$ZOMBIE_JSON" | while read -r name; do

# send logs to loki
if [ -d "$LOKI_DIR_FOR_NATIVE_LOGS" ]; then
echo "send logs to loki for node: $name";
awk -v NS="$NS" -v NAME="$name" '{print NS" "NAME" " $0}' $TARGET_DIR/$name.log >> $LOKI_DIR_FOR_NATIVE_LOGS/to-loki.log
local_to=$(($(date +%s%3N) + 60000))
fi
fi
echo -e "\t$name: $(make_url "$name")"
echo -e "\t$name: $(make_url "$name" "$local_to")"
done
echo ""

# Debug
echo "\n"
cat $ZOMBIE_JSON
echo "\n"

# Handle parachains grouped by paraId
jq -r '.paras // .parachains | to_entries[] | "\(.key)"' "$ZOMBIE_JSON" | while read -r para_id; do
echo "ParaId: $para_id"
jq -r --arg pid "$para_id" "'$JQ_QUERY_PARA_NODES'" "$ZOMBIE_JSON" | while read -r name; do
jq -r --arg pid "$para_id" "$JQ_QUERY_PARA_NODES" "$ZOMBIE_JSON" | while read -r name; do
local_to=$TO
if [[ "$ZOMBIE_PROVIDER" == "k8s" ]]; then
# Fetching logs from k8s
if ! kubectl logs "$name" -c "$name" -n "$NS" > "$TARGET_DIR/$name.log" ; then
Expand All @@ -99,11 +97,11 @@ jq -r '.paras // .parachains | to_entries[] | "\(.key)"' "$ZOMBIE_JSON" | while

# send logs to loki
if [ -d "$LOKI_DIR_FOR_NATIVE_LOGS" ]; then
echo "send logs to loki for node: $name";
awk -v NS="$NS" -v NAME="$name" '{print NS" "NAME" " $0}' $TARGET_DIR/$name.log >> $LOKI_DIR_FOR_NATIVE_LOGS/to-loki.log
local_to=$(($(date +%s%3N) + 60000))
fi
fi
echo -e "\t$name: $(make_url "$name")"
echo -e "\t$name: $(make_url "$name" "$local_to")"
done
echo ""
done
2 changes: 1 addition & 1 deletion .github/workflows/command-backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
"conflict_resolution": "draft_commit_conflicts"
}
copy_assignees: true
label_pattern: ^A4-backport-(stable|unstable)
label_pattern: ''

- name: Label Backports
if: ${{ steps.backport.outputs.created_pull_numbers != '' }}
Expand Down
Loading
Loading