From b5220e9a2697ece0d4b19a17a41b97d2b5c3af4f Mon Sep 17 00:00:00 2001 From: Randy <857271370@qq.com> Date: Fri, 6 Nov 2026 08:33:26 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E2=9C=85=20test:=20roll=20out=20the=20curr?= =?UTF-8?q?ent=20chart=20instead=20of=20upgrading=20from=20the=20previous?= =?UTF-8?q?=20one?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Weir has no users to stay compatible with. The kind test now rolls this checkout's chart out under load from one current-SDK soak client, instead of upgrading from the previous server's chart through the base commit with clients of two SDKs. The soak client moves to weir-tests c992d6f, which uses weir-go v0.24.1. --- .github/workflows/ci.yaml | 54 +------- scripts/{kind-upgrade.sh => kind-rollout.sh} | 127 ++++++------------- 2 files changed, 47 insertions(+), 134 deletions(-) rename scripts/{kind-upgrade.sh => kind-rollout.sh} (50%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8fd1b22..12a5050 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,13 +37,11 @@ jobs: with: name: weir-chart path: dist/*.tgz - upgrade: + rollout: runs-on: ubuntu-24.04 timeout-minutes: 20 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - fetch-depth: 0 - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 with: go-version: '1.27.3' @@ -51,51 +49,11 @@ jobs: - uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0 with: version: v3.17.0 - - name: Install kind - run: GOBIN="$PWD/.bin" go install sigs.k8s.io/kind@v0.33.0 - - name: Build the soak client with the current and the previous SDK - shell: bash - run: | - bin=$PWD/.bin - git clone -q https://github.com/batchstream/weir-tests "$RUNNER_TEMP/weir-tests" - cd "$RUNNER_TEMP/weir-tests" - git checkout -q 1347bcdb3351852b7df484e778a757d0d2e80ff3 - CGO_ENABLED=0 go build -o "$bin/weir-soak" ./cmd/weir-soak - version=$(jq -er .weir_go_previous versions.json) - protocol=$(go mod download -json "github.com/batchstream/weir-go@$version" | jq -er .GoMod | xargs awk '$1 == "github.com/batchstream/weir-protocol" {print $2}') - go get "github.com/batchstream/weir-go@$version" "github.com/batchstream/weir-protocol@$protocol" - CGO_ENABLED=0 go build -o "$bin/weir-soak-previous" ./cmd/weir-soak - sdk() { go version -m "$bin/$1" | awk '$2 == "github.com/batchstream/weir-go" {print $3}'; } - echo "soak clients use $(sdk weir-soak) and $(sdk weir-soak-previous)" - [ "$(sdk weir-soak)" != "$(sdk weir-soak-previous)" ] - # Held streams of v0.22.0 fail in a rollout; v0.23.0 fixed them. - if [ "$version" = v0.22.0 ]; then - echo 'PREVIOUS_PROFILES=single=40,visible=10,lua=15,batch=30,native=5' >> "$GITHUB_ENV" - fi - - name: Extract the charts of the previous server and the commit this change replaces - shell: bash - env: - BASE: ${{ github.event.pull_request.base.sha || github.event.before }} + - name: Install kind and the soak client run: | - digest() { git show "$1:charts/weir/values.yaml" | sed -n 's/^ digest: //p'; } - current=$(digest HEAD) - previous= - for commit in $(git log --first-parent --format=%H); do - if [ "$(digest "$commit")" != "$current" ]; then - previous=$commit - break - fi - done - [ -n "$previous" ] || { echo "no earlier commit on this branch pins another server" >&2; exit 1; } - echo "previous server $(digest "$previous") in $previous" - mkdir -p "$RUNNER_TEMP/previous" "$RUNNER_TEMP/base" - git archive "$previous" | tar -x -C "$RUNNER_TEMP/previous" - git archive "$BASE" | tar -x -C "$RUNNER_TEMP/base" - revision() { sed -n 's/^ weir.batchstream.io\/source-revision: "\(.*\)"$/\1/p' "$1/charts/weir/Chart.yaml"; } - pins=$RUNNER_TEMP/weir-tests/versions.json - [ "$(jq -er .weir_source "$pins")" = "$(revision .)" ] || { echo "weir-tests pins another current server than this chart" >&2; exit 1; } - [ "$(jq -er .weir_previous_source "$pins")" = "$(revision "$RUNNER_TEMP/previous")" ] || { echo "weir-tests pins another previous server than the previous chart" >&2; exit 1; } - - name: Upgrade from the previous server under load from both SDKs + GOBIN="$PWD/.bin" go install sigs.k8s.io/kind@v0.33.0 + GOBIN="$PWD/.bin" CGO_ENABLED=0 go install github.com/batchstream/weir-tests/cmd/weir-soak@c992d6f7809829cb1e12af9204e1b461308f1b6d + - name: Roll the chart out under load env: KIND: .bin/kind - run: THROUGH_CHECKOUT="$RUNNER_TEMP/base" scripts/kind-upgrade.sh "$RUNNER_TEMP/previous" . .bin/weir-soak .bin/weir-soak-previous + run: scripts/kind-rollout.sh .bin/weir-soak diff --git a/scripts/kind-upgrade.sh b/scripts/kind-rollout.sh similarity index 50% rename from scripts/kind-upgrade.sh rename to scripts/kind-rollout.sh index fc929cd..39c6d6b 100755 --- a/scripts/kind-upgrade.sh +++ b/scripts/kind-rollout.sh @@ -1,35 +1,29 @@ #!/bin/sh -# usage: kind-upgrade.sh [] -# Creates a kind cluster of its own and changes a Weir release under load: from -# one checkout's chart to the other's and back at one replica, a replacement that -# starts late, up to three replicas, the three back and forward again, and back -# down. Exits non-zero if a change does not complete, a caller saw any error or an -# outcome did not hold. It measures no throughput. +# usage: kind-rollout.sh +# Creates a kind cluster of its own and changes a release of this checkout's chart +# under load: rollouts at one replica, a replacement that starts late, up to three +# replicas, a rollout of the three, and back down. Exits non-zero if a change does +# not complete, a caller saw any error or an outcome did not hold. It measures no +# throughput. # -# The soak binaries come from weir-tests, built for the cluster's platform. A -# second one runs alongside the first with the profiles in PREVIOUS_PROFILES if -# set, so that clients of both SDKs meet servers of both charts during and between -# the rollouts. THROUGH_CHECKOUT names a checkout whose chart the release goes -# through on its first upgrade. KIND names the kind binary; helm, kubectl and -# Docker come from PATH. +# The soak binary comes from weir-tests, built for the cluster's platform. KIND +# names the kind binary; helm, kubectl and Docker come from PATH. set -eu -[ "$#" -ge 3 ] && [ -f "$1/charts/weir/Chart.yaml" ] && [ -f "$2/charts/weir/Chart.yaml" ] && [ -x "$3" ] && [ -x "${4:-$3}" ] || { sed -n 2p "$0" >&2; exit 2; } -FROM=$1 TO=$2 SOAK=$3 PREVIOUS_SOAK=${4:-} -THROUGH=${THROUGH_CHECKOUT:-$FROM} +[ "$#" -eq 1 ] && [ -x "$1" ] || { sed -n 2p "$0" >&2; exit 2; } +SOAK=$1 ROOT=$(cd "$(dirname "$0")/.." && pwd) KIND=${KIND:-kind} NODE_IMAGE=kindest/node:v1.37.0@sha256:a1ed56cfb0e7b93589bdf97c8cd566405a265939e3620fc4f5de89adff580ae5 -CLUSTER=weir-upgrade-$$ +CLUSTER=weir-rollout-$$ NS=weir RELEASE=search DEPLOYMENT=$RELEASE-weir ADDRESS=$DEPLOYMENT.$NS.svc.cluster.local. SELECTOR=app.kubernetes.io/instance=$RELEASE K="kubectl -n $NS" +H="helm --kube-context kind-$CLUSTER -n $NS" PAUSE=${PAUSE:-5} TEMPLATE=0 -CLIENTS=current -[ -z "$PREVIOUS_SOAK" ] || CLIENTS="current previous" SOAKING= CREATED= WORK=$(mktemp -d) @@ -50,9 +44,7 @@ diagnose() { $K get events --sort-by=.lastTimestamp | tail -n 30 $K logs -l "$SELECTOR" --all-containers --prefix --tail=30 $K logs search --tail=10 - for client in $CLIENTS; do - $K exec client -- sh -c "tail -n 5 /work/$client.log; cat /work/$client.json" - done + $K exec client -- sh -c "tail -n 5 /work/soak.log; cat /work/soak.json" } cleanup() { @@ -80,16 +72,6 @@ wait_for() { done } -# A checkout's chart uses that checkout's values, so a change may rename one. A -# chart that predates the kind values uses the other checkout's. -kind_values() { - if [ -f "$1/tests/kind/values.yaml" ]; then - echo "$1/tests/kind/values.yaml" - else - echo "$TO/tests/kind/values.yaml" - fi -} - pods() { $K get pods -l "$SELECTOR" -o jsonpath='{.items[*].metadata.name}'; } namespace_ready() { $K get serviceaccount default >/dev/null 2>&1; } @@ -105,11 +87,9 @@ settled() { check_soak() { [ -n "$SOAKING" ] || return 0 - for client in $CLIENTS; do - if $K exec client -- test -e "/work/$client.exit" 2>/dev/null; then - fail "the $client soak client ended early" - fi - done + if $K exec client -- test -e /work/soak.exit 2>/dev/null; then + fail "the soak client ended early" + fi } settled_while_soaking() { @@ -130,17 +110,16 @@ finish() { sleep "$PAUSE" } -# change [rollout] applies a change to the release. A -# rollout changes the Pod template, so it replaces every replica whether or not -# the charts differ. +# change [rollout] applies a change to the release. A rollout +# changes the Pod template, so it replaces every replica. change() { - WANT=$3 + WANT=$2 replaced= - if [ -n "${4:-}" ]; then + if [ -n "${3:-}" ]; then replaced=$(pods) TEMPLATE=$((TEMPLATE + 1)) fi - helm --kube-context "kind-$CLUSTER" -n "$NS" upgrade --install "$RELEASE" "$2/charts/weir" -f "$2/examples/search.yaml" -f "$(kind_values "$2")" --set "replicaCount=$WANT" --set-string "podAnnotations.rollout=$TEMPLATE" >/dev/null + $H upgrade --install "$RELEASE" "$ROOT/charts/weir" -f "$ROOT/examples/search.yaml" -f "$ROOT/tests/kind/values.yaml" --set "replicaCount=$WANT" --set-string "podAnnotations.rollout=$TEMPLATE" >/dev/null finish "$1" "$replaced" } @@ -153,8 +132,8 @@ patch() { # A slow or unreliable registry must not use up a rollout's time. pull() { - image=$(helm template "$RELEASE" "$1/charts/weir" -f "$1/examples/search.yaml" -f "$(kind_values "$1")" | sed -n 's/^ *image: *"*\([^"]*\)"*$/\1/p' | head -n 1) - [ -n "$image" ] || fail "the chart in $1 does not render with its values" + image=$(helm template "$RELEASE" "$ROOT/charts/weir" -f "$ROOT/examples/search.yaml" -f "$ROOT/tests/kind/values.yaml" | sed -n 's/^ *image: *"*\([^"]*\)"*$/\1/p' | head -n 1) + [ -n "$image" ] || fail "the chart does not render with its values" log "pulling $image" attempts=5 until docker exec "$CLUSTER-control-plane" crictl pull "$image" >/dev/null; do @@ -164,24 +143,9 @@ pull() { done } -# start_soak starts a client in the client Pod. -start_soak() { - kubectl cp "$2" "$NS/client:/work/$1.bin" - $K exec client -- chmod +x "/work/$1.bin" - $K exec client -- sh -c "nohup sh -c '/work/$1.bin -no-errors -weir-address $ADDRESS:7447 -weir-diagnostics $ADDRESS:7449 -search-url http://search:9200 -search-workers 40 -search-rate 400 -keys-per-worker 16 -duration 1h -settle 10s -operation-timeout 5s -sample-interval 10s -stream-lifetime 90s -output /work/$1 $3 & echo \$! > /work/$1.pid; wait \$!; echo \$? > /work/$1.exit' > /work/$1.log 2>&1 &" -} - -soak_sampled() { - for client in $CLIENTS; do - $K exec client -- test -s "/work/$client.jsonl" 2>/dev/null || return 1 - done -} +soak_sampled() { $K exec client -- test -s /work/soak.jsonl 2>/dev/null; } -soak_finished() { - for client in $CLIENTS; do - $K exec client -- test -s "/work/$client.exit" 2>/dev/null || return 1 - done -} +soak_finished() { $K exec client -- test -s /work/soak.exit 2>/dev/null; } log "creating cluster $CLUSTER" CREATED=yes @@ -191,42 +155,33 @@ wait_for "the namespace has no service account" 60 namespace_ready $K apply -f "$ROOT/tests/kind/fixtures.yaml" $K wait --for=condition=Ready --timeout=600s pod/search pod/client FIXTURE_IMAGE=$($K get pod client -o jsonpath='{.spec.containers[0].image}') -pull "$FROM" -pull "$THROUGH" -pull "$TO" +pull -change "install" "$FROM" 1 +change "install" 1 # Streams live longer than a one-replica rollout, so they meet each replica's exit. -start_soak current "$SOAK" "" -[ -z "$PREVIOUS_SOAK" ] || start_soak previous "$PREVIOUS_SOAK" "${PREVIOUS_PROFILES:+-profiles $PREVIOUS_PROFILES}" +kubectl cp "$SOAK" "$NS/client:/work/soak.bin" +$K exec client -- chmod +x /work/soak.bin +$K exec client -- sh -c "nohup sh -c '/work/soak.bin -no-errors -weir-address $ADDRESS:7447 -weir-diagnostics $ADDRESS:7449 -search-url http://search:9200 -search-workers 40 -search-rate 400 -keys-per-worker 16 -duration 1h -settle 10s -operation-timeout 5s -sample-interval 10s -stream-lifetime 90s -output /work/soak & echo \$! > /work/soak.pid; wait \$!; echo \$? > /work/soak.exit' > /work/soak.log 2>&1 &" SOAKING=yes wait_for "the soak client reported no sample" 120 soak_sampled check_soak -change "upgrade to the intermediate chart" "$THROUGH" 1 rollout -change "chart upgrade at one replica" "$TO" 1 rollout -change "chart rollback at one replica" "$FROM" 1 rollout -change "chart upgrade at one replica" "$TO" 1 rollout +change "rollout at one replica" 1 rollout +change "rollout at one replica" 1 rollout # Late enough that the old replica exits first unless the rollout waits for the replacement. patch "replacement that starts late" strategic '{"spec":{"template":{"spec":{"initContainers":[{"name":"late-start","image":"'"$FIXTURE_IMAGE"'","command":["sleep","30"]}]}}}}' patch "late start removed" json '[{"op":"remove","path":"/spec/template/spec/initContainers"}]' -change "scale up to three replicas" "$TO" 3 -change "chart rollback at three replicas" "$FROM" 3 rollout -change "chart upgrade at three replicas" "$TO" 3 rollout -change "scale down to one replica" "$TO" 1 +change "scale up to three replicas" 3 +change "rollout at three replicas" 3 rollout +change "rollout at three replicas" 3 rollout +change "scale down to one replica" 1 check_soak SOAKING= -passed=yes -for client in $CLIENTS; do - $K exec client -- sh -c "kill \$(cat /work/$client.pid)" || true -done -wait_for "the soak clients did not finish" 420 soak_finished -for client in $CLIENTS; do - log "$client SDK client report" - $K exec client -- cat "/work/$client.json" || true - [ "$($K exec client -- cat "/work/$client.exit")" = 0 ] || { log "FAILED: a caller of the $client SDK saw an error or an outcome did not hold"; passed=; } -done -[ -n "$passed" ] || exit 1 +$K exec client -- sh -c 'kill $(cat /work/soak.pid)' || true +wait_for "the soak client did not finish" 420 soak_finished +log "soak client report" +$K exec client -- cat /work/soak.json || true +[ "$($K exec client -- cat /work/soak.exit)" = 0 ] || fail "a caller saw an error or an outcome did not hold" log "passed" From ba8dc877b44f5a123d80dcb9863201eff23b1357 Mon Sep 17 00:00:00 2001 From: Randy <857271370@qq.com> Date: Fri, 6 Nov 2026 08:33:26 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=93=9D=20docs:=20describe=20the=20rol?= =?UTF-8?q?lout=20test=20and=20the=20v0.24.1=20SDK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++--- docs/configuration.md | 2 +- docs/development.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f6fb064..5d3ca86 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ MongoDB and Search data plane, on Kubernetes. | Chart | `0.20.0-rc.1` | | Server source | [commit `5107986b882d`](https://github.com/batchstream/weir/commit/5107986b882da60751403c7e05bbbebdb12b3cdb) | | Server image | `ghcr.io/batchstream/weir@sha256:b5d949cefb0ba01e18cff2b5210cef954bc387c20cffa87784466e793e0e088e` | -| Go SDK | [weir-go](https://github.com/batchstream/weir-go) v0.23.1 | +| Go SDK | [weir-go](https://github.com/batchstream/weir-go) v0.24.1 | `Chart.yaml` records the server source and `values.yaml` pins the image. Both the validation and release workflows install that exact source with `go install`. @@ -128,7 +128,7 @@ must exist first. | [Monitoring](docs/monitoring.md) | Metrics, labels, alerts and the Grafana dashboard | | [Autoscaling](docs/autoscaling.md) | KEDA and Prometheus setup | | [Operations](docs/operations.md) | Network, rolling updates, capacity, shutdown and probes | -| [Development](docs/development.md) | Chart tests, the upgrade test and releases | +| [Development](docs/development.md) | Chart tests, the rollout test and releases | | Example | Shows | | --- | --- | @@ -149,7 +149,7 @@ make test PYTHON=.venv/bin/python WEIR_BIN="$PWD/.bin/weir" ``` `SOURCE_REVISION` is the `weir.batchstream.io/source-revision` annotation in -`Chart.yaml`. See [Development](docs/development.md) for packaging and the upgrade +`Chart.yaml`. See [Development](docs/development.md) for packaging and the rollout test. - Contributing: [CONTRIBUTING.md](CONTRIBUTING.md) diff --git a/docs/configuration.md b/docs/configuration.md index 1b6a725..151dd99 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -37,7 +37,7 @@ helm upgrade --install search ./charts/weir --namespace application \ ## Client connections -Clients use [weir-go](https://github.com/batchstream/weir-go) v0.23.1, which speaks this server's protocol, and connect with `weir.New` to the group's headless Service by its full name with a trailing dot, `-weir..svc.cluster.local.:`, with the cluster's own domain if it is not `cluster.local`; without the dot every lookup first tries the Pod's DNS search domains. The name resolves to every Ready Pod, and the SDK spreads business RPCs across them. The SDK looks the name up every 5 seconds, so Pods added by a scale-out or rollout take their share of calls within seconds of becoming Ready, and a terminating Pod stops receiving calls once it leaves DNS, before SIGTERM. It also pings a replica it has heard nothing from for 10 seconds and leaves one that does not answer; this server accepts those pings, so upgrade the group before its clients. Generated `[::]` listeners accept IPv4 and IPv6 on the supported Go runtime. Group identity is `namespace/release`, so metric labels remain stable when `fullnameOverride` changes. The Service selects only its release. Allow clients to reach each group's application port. +Clients use [weir-go](https://github.com/batchstream/weir-go) v0.24.1, which speaks this server's protocol, and connect with `weir.New` to the group's headless Service by its full name with a trailing dot, `-weir..svc.cluster.local.:`, with the cluster's own domain if it is not `cluster.local`; without the dot every lookup first tries the Pod's DNS search domains. The name resolves to every Ready Pod, and the SDK spreads business RPCs across them. The SDK looks the name up every 5 seconds, so Pods added by a scale-out or rollout take their share of calls within seconds of becoming Ready, and a terminating Pod stops receiving calls once it leaves DNS, before SIGTERM. It also pings a replica it has heard nothing from for 10 seconds and leaves one that does not answer; this server accepts those pings. Generated `[::]` listeners accept IPv4 and IPv6 on the supported Go runtime. Group identity is `namespace/release`, so metric labels remain stable when `fullnameOverride` changes. The Service selects only its release. Allow clients to reach each group's application port. ## Generated configuration diff --git a/docs/development.md b/docs/development.md index 8f7026b..ad1185b 100644 --- a/docs/development.md +++ b/docs/development.md @@ -14,12 +14,12 @@ make package PYTHON=.venv/bin/python WEIR_BIN="$PWD/.bin/weir" `SOURCE_REVISION` is the `weir.batchstream.io/source-revision` annotation in `Chart.yaml`. `make test` lints the Chart, renders every example and validates the generated configuration with the selected Weir binary, including a scale check with many Stores and replicas and an isolated loopback-only serve, HTTP probe and shutdown run. With an official `promtool` on `PATH` or named by `PROMTOOL`, it also runs the rendered alerts and the autoscaling query against their PromQL fixtures; CI installs a checksum-verified promtool. It opens no backend connections, reads no existing Secrets and does not exercise CNI enforcement, Prometheus collection or KEDA scaling in a real cluster. -## Upgrade test +## Rollout test -CI also runs `scripts/kind-upgrade.sh` on every change. In a kind cluster of its own, under load from `weir-soak` with `-no-errors` on both the current and the previous SDK, it upgrades a release from the Chart of the previous server through the Chart a change replaces to the new one, back and forward again at one replica, replaces the replica with one that starts 30 seconds late, scales to three replicas, takes the three back and forward again and scales back down. The change fails if a rollout does not complete, a caller saw any error or an outcome did not hold. While the previous SDK is v0.22.0 its client skips held streams, which that version fails in a rollout. Every rollout setting stays the Chart's default, and the test measures no throughput. The job fails if the weir-tests revision it builds the clients from pins other servers than these two Charts, so pin a new server there first. To run it locally, build `weir-soak` from [weir-tests](https://github.com/batchstream/weir-tests) for the cluster's platform and check out the commit to upgrade from; the script uses a kubeconfig of its own and ignores your current context and Helm settings. A second binary, built with the previous SDK and its protocol version as in the workflow, is optional; `PREVIOUS_PROFILES` sets its profiles, and `THROUGH_CHECKOUT` a Chart to pass through: +CI also runs `scripts/kind-rollout.sh` on every change. In a kind cluster of its own, under load from `weir-soak` with `-no-errors`, it rolls a release of this checkout's Chart out twice at one replica, replaces the replica with one that starts 30 seconds late, scales to three replicas, rolls the three out twice and scales back down. The change fails if a rollout does not complete, a caller saw any error or an outcome did not hold. Every rollout setting stays the Chart's default, and the test measures no throughput. To run it locally, build `weir-soak` from [weir-tests](https://github.com/batchstream/weir-tests) for the cluster's platform; the script uses a kubeconfig of its own and ignores your current context and Helm settings: ```sh -scripts/kind-upgrade.sh FROM_CHECKOUT . path/to/weir-soak [path/to/previous-weir-soak] +scripts/kind-rollout.sh path/to/weir-soak ``` ## Release From 02ae72507bdb3dc2981665b855c4f1871ad4d4d3 Mon Sep 17 00:00:00 2001 From: Randy <857271370@qq.com> Date: Fri, 6 Nov 2026 08:39:03 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=93=9D=20docs:=20stop=20asking=20for?= =?UTF-8?q?=20weir-tests=20pins=20before=20chart=20pins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ea73034..7fd4b66 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,4 +33,4 @@ rendered alerts and the autoscaling query; without it, that test is skipped. - Keep the change focused and explain the observed problem and resulting behavior. - Add a regression test when fixing behavior. - Update `values.schema.json`, the [examples](examples), the README and [docs](docs) when values change. -- When pinning a new server, pin it in [weir-tests](https://github.com/batchstream/weir-tests) first, then change the source annotation, `appVersion`, image digest, workflow pins, the references in the README and [docs](docs) and the values in `tests/test_chart.py` together. +- When pinning a new server, change the source annotation, `appVersion`, image digest, workflow pins, the references in the README and [docs](docs) and the values in `tests/test_chart.py` together. From 9e0152b1601c69fc8301ae8cf5cfea5a6e13da83 Mon Sep 17 00:00:00 2001 From: Randy <857271370@qq.com> Date: Fri, 6 Nov 2026 08:56:02 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E2=9C=85=20test:=20build=20the=20soak=20cl?= =?UTF-8?q?ient=20from=20weir-tests=20df28116?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit df28116 is weir-tests main with klauspost/compress v1.20.2; the SDK stays v0.24.1. Also correct the script header: the three replicas roll out twice. --- .github/workflows/ci.yaml | 2 +- scripts/kind-rollout.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 12a5050..3325259 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -52,7 +52,7 @@ jobs: - name: Install kind and the soak client run: | GOBIN="$PWD/.bin" go install sigs.k8s.io/kind@v0.33.0 - GOBIN="$PWD/.bin" CGO_ENABLED=0 go install github.com/batchstream/weir-tests/cmd/weir-soak@c992d6f7809829cb1e12af9204e1b461308f1b6d + GOBIN="$PWD/.bin" CGO_ENABLED=0 go install github.com/batchstream/weir-tests/cmd/weir-soak@df28116e9c492e15db3ef19ab6a70bd2ea3110a3 - name: Roll the chart out under load env: KIND: .bin/kind diff --git a/scripts/kind-rollout.sh b/scripts/kind-rollout.sh index 39c6d6b..c766e9e 100755 --- a/scripts/kind-rollout.sh +++ b/scripts/kind-rollout.sh @@ -2,7 +2,7 @@ # usage: kind-rollout.sh # Creates a kind cluster of its own and changes a release of this checkout's chart # under load: rollouts at one replica, a replacement that starts late, up to three -# replicas, a rollout of the three, and back down. Exits non-zero if a change does +# replicas, rollouts of the three, and back down. Exits non-zero if a change does # not complete, a caller saw any error or an outcome did not hold. It measures no # throughput. # From d9e8bc4c4d20b1be9ee5b291f8ab04fafa44a6c4 Mon Sep 17 00:00:00 2001 From: Randy <857271370@qq.com> Date: Fri, 6 Nov 2026 08:56:02 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=93=9D=20docs:=20show=20how=20to=20bu?= =?UTF-8?q?ild=20the=20soak=20client=20and=20keep=20its=20SDK=20in=20step?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 2 +- docs/development.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7fd4b66..09a45ff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,4 +33,4 @@ rendered alerts and the autoscaling query; without it, that test is skipped. - Keep the change focused and explain the observed problem and resulting behavior. - Add a regression test when fixing behavior. - Update `values.schema.json`, the [examples](examples), the README and [docs](docs) when values change. -- When pinning a new server, change the source annotation, `appVersion`, image digest, workflow pins, the references in the README and [docs](docs) and the values in `tests/test_chart.py` together. +- When pinning a new server, change the source annotation, `appVersion`, image digest, workflow pins (including the weir-tests revision of the rollout test's soak client, whose SDK must speak the new server's protocol), the references in the README and [docs](docs) and the values in `tests/test_chart.py` together. diff --git a/docs/development.md b/docs/development.md index ad1185b..45c4b51 100644 --- a/docs/development.md +++ b/docs/development.md @@ -16,10 +16,11 @@ make package PYTHON=.venv/bin/python WEIR_BIN="$PWD/.bin/weir" ## Rollout test -CI also runs `scripts/kind-rollout.sh` on every change. In a kind cluster of its own, under load from `weir-soak` with `-no-errors`, it rolls a release of this checkout's Chart out twice at one replica, replaces the replica with one that starts 30 seconds late, scales to three replicas, rolls the three out twice and scales back down. The change fails if a rollout does not complete, a caller saw any error or an outcome did not hold. Every rollout setting stays the Chart's default, and the test measures no throughput. To run it locally, build `weir-soak` from [weir-tests](https://github.com/batchstream/weir-tests) for the cluster's platform; the script uses a kubeconfig of its own and ignores your current context and Helm settings: +CI also runs `scripts/kind-rollout.sh` on every change. In a kind cluster of its own, under load from `weir-soak` with `-no-errors`, it rolls a release of this checkout's Chart out twice at one replica, replaces the replica with one that starts 30 seconds late, scales to three replicas, rolls the three out twice and scales back down. The change fails if a rollout does not complete, a caller saw any error or an outcome did not hold. Every rollout setting stays the Chart's default, and the test measures no throughput. To run it locally, build `weir-soak` for the cluster's platform from a [weir-tests](https://github.com/batchstream/weir-tests) checkout at the revision `ci.yaml` installs. The script uses a kubeconfig of its own and ignores your current context and Helm settings. For kind on an arm64 Mac: ```sh -scripts/kind-rollout.sh path/to/weir-soak +(cd path/to/weir-tests && GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o weir-soak ./cmd/weir-soak) +scripts/kind-rollout.sh path/to/weir-tests/weir-soak ``` ## Release