@mark1russell7/harness 0.16.26 → 0.16.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,13 +2,16 @@
2
2
  # container in the client's network namespace, as the harness's own TCP client does. It prints the
3
3
  # same JSON lines, with the state of the pool beside them.
4
4
  # lab.ts stages the build context: this folder, under harness/image/hikari. The build gets each jar
5
- # from Maven Central and checks its SHA-256 (jars.sha256), thus a build cannot get another jar.
5
+ # from Maven Central, else from its Google mirror, and checks its SHA-256 (jars.sha256), thus a build cannot get
6
+ # another jar. Central gives 429 to a burst of builds (8 shards at one time), so get() tries again after 15, 30, 60
7
+ # and 120 s.
6
8
  FROM eclipse-temurin:21.0.12.1_1-jdk-alpine@sha256:0bfc69a4758a86710e5c474032d28400a8bd00874766f9e8b1642ac2fd293159 AS build
7
9
  WORKDIR /build
8
10
  COPY harness/image/hikari/jars.sha256 ./
9
- RUN wget -q https://repo1.maven.org/maven2/com/zaxxer/HikariCP/7.1.0/HikariCP-7.1.0.jar \
10
- && wget -q https://repo1.maven.org/maven2/org/postgresql/postgresql/42.7.13/postgresql-42.7.13.jar \
11
- && wget -q https://repo1.maven.org/maven2/org/slf4j/slf4j-api/2.0.17/slf4j-api-2.0.17.jar \
11
+ RUN get() { name="${1##*/}"; for wait in 0 15 30 60 120; do sleep "$wait"; for base in https://repo1.maven.org/maven2 https://maven-central.storage-download.googleapis.com/maven2; do rm -f "$name"; wget -q "$base/$1" && return 0; done; done; echo "no mirror gave $1" >&2; return 1; } \
12
+ && get com/zaxxer/HikariCP/7.1.0/HikariCP-7.1.0.jar \
13
+ && get org/postgresql/postgresql/42.7.13/postgresql-42.7.13.jar \
14
+ && get org/slf4j/slf4j-api/2.0.17/slf4j-api-2.0.17.jar \
12
15
  && sha256sum -c jars.sha256
13
16
  COPY harness/image/hikari/ClientHikari.java ./
14
17
  RUN javac --release 21 -cp "HikariCP-7.1.0.jar:postgresql-42.7.13.jar:slf4j-api-2.0.17.jar" -d classes ClientHikari.java
@@ -3,16 +3,19 @@
3
3
  # same JSON lines. AdminKafka is the admin of a lab: it makes each topic, reads the state of a
4
4
  # partition, and reads the whole partition after a run.
5
5
  # lab.ts stages the build context: this folder, under harness/image/kafka. The build gets each jar
6
- # from Maven Central and checks its SHA-256 (jars.sha256), thus a build cannot get another jar. The
6
+ # from Maven Central, else from its Google mirror, and checks its SHA-256 (jars.sha256), thus a build cannot get
7
+ # another jar. Central gives 429 to a burst of builds (8 shards at one time), so get() tries again after 15, 30, 60
8
+ # and 120 s. The
7
9
  # jars are kafka-clients and each runtime dependency of its POM.
8
10
  FROM eclipse-temurin:21.0.12.1_1-jdk-alpine@sha256:0bfc69a4758a86710e5c474032d28400a8bd00874766f9e8b1642ac2fd293159 AS build
9
11
  WORKDIR /build
10
12
  COPY harness/image/kafka/jars.sha256 ./
11
- RUN wget -q https://repo1.maven.org/maven2/org/apache/kafka/kafka-clients/4.3.2/kafka-clients-4.3.2.jar \
12
- && wget -q https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar \
13
- && wget -q https://repo1.maven.org/maven2/com/github/luben/zstd-jni/1.5.6-10/zstd-jni-1.5.6-10.jar \
14
- && wget -q https://repo1.maven.org/maven2/at/yawk/lz4/lz4-java/1.11.4/lz4-java-1.11.4.jar \
15
- && wget -q https://repo1.maven.org/maven2/org/xerial/snappy/snappy-java/1.1.10.11/snappy-java-1.1.10.11.jar \
13
+ RUN get() { name="${1##*/}"; for wait in 0 15 30 60 120; do sleep "$wait"; for base in https://repo1.maven.org/maven2 https://maven-central.storage-download.googleapis.com/maven2; do rm -f "$name"; wget -q "$base/$1" && return 0; done; done; echo "no mirror gave $1" >&2; return 1; } \
14
+ && get org/apache/kafka/kafka-clients/4.3.2/kafka-clients-4.3.2.jar \
15
+ && get org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar \
16
+ && get com/github/luben/zstd-jni/1.5.6-10/zstd-jni-1.5.6-10.jar \
17
+ && get at/yawk/lz4/lz4-java/1.11.4/lz4-java-1.11.4.jar \
18
+ && get org/xerial/snappy/snappy-java/1.1.10.11/snappy-java-1.1.10.11.jar \
16
19
  && sha256sum -c jars.sha256
17
20
  COPY harness/image/kafka/ClientKafka.java harness/image/kafka/AdminKafka.java harness/image/kafka/ConsumerKafka.java ./
18
21
  RUN javac --release 21 -cp "kafka-clients-4.3.2.jar:slf4j-api-1.7.36.jar" -d classes ClientKafka.java AdminKafka.java ConsumerKafka.java
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@mark1russell7/harness",
4
- "version": "0.16.26",
4
+ "version": "0.16.27",
5
5
  "description": "Network labs in Docker, declared as data. A cell builds a topology of networks, routers and proxies around a stock target. It injects a fault at layer 3 or 4 from a NET_ADMIN sidecar, measures the records of the kernel and judges a prediction. The faults are black holes, resets, ICMP unreachable, one-way and MTU drops, tc netem, the toxics of Toxiproxy and frozen processes. Its disk tier cuts the power of a program on LazyFS: the disk loses each write after the last fsync. Its memory tier sets the limits of the cgroup of a client, and judges its throttle above memory.high and the choice of the OOM killer. Its egress tier puts a netem or tbf qdisc on the interface of a client, and judges the departure of each datagram from the stamps of the kernel. Its replicated groups are Redis with Sentinels, MongoDB replica sets, PostgreSQL standbys, Kafka, RabbitMQ and BGP fabrics with BFD. A lab can also operate in a QEMU guest. Its first use is connection timers: keep-alive, TCP retransmission, heartbeats and reconnects.",
6
6
  "keywords": [
7
7
  "fault-injection",