Skip to content

Commit 2ef2f08

Browse files
authored
fix: workload instrumentation (#3)
* fix workload instrumentation * cleanup
1 parent 2e47eea commit 2ef2f08

2 files changed

Lines changed: 20 additions & 14 deletions

File tree

Justfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
run-6min: push-daily-run
1+
run-6min description='manual run (short)': push-daily-run
22
curl --fail \
33
--user "formance:$ANTITHESIS_PASSWORD" \
44
-X POST https://formance.antithesis.com/api/v1/launch_experiment/formance-k8s -d '{ \
55
"params": { \
6-
"custom.duration": "0.1", \
6+
"custom.duration": "0.2", \
77
"antithesis.report.recipients": "'"$ANTITHESIS_REPORT_RECIPIENT"'", \
88
"antithesis.config_image": "antithesis-config:daily_run", \
9-
"antithesis.description": "manual run (short)", \
9+
"antithesis.description": "{{description}}", \
1010
"antithesis.images": "'"workload:latest;docker.io/library/postgres:15-alpine;ghcr.io/formancehq/operator:v2.10.1;ghcr.io/formancehq/operator-utils:v2.0.14;ghcr.io/formancehq/gateway:v2.0.24;ghcr.io/formancehq/ledger-instrumented:$LEDGER_PREVIOUS_TAG;ghcr.io/formancehq/ledger-instrumented:$LEDGER_LATEST_TAG"'" \
1111
} \
1212
}'
1313

14-
run-1h: push-daily-run
14+
run-1h description='manual run (1h)': push-daily-run
1515
curl --fail \
1616
--user "formance:$ANTITHESIS_PASSWORD" \
1717
-X POST https://formance.antithesis.com/api/v1/launch_experiment/formance-k8s -d '{ \
1818
"params": { \
1919
"custom.duration": "1", \
2020
"antithesis.report.recipients": "'"$ANTITHESIS_REPORT_RECIPIENT"'", \
2121
"antithesis.config_image": "antithesis-config:daily_run", \
22-
"antithesis.description": "manual run (1h)", \
22+
"antithesis.description": "{{description}}", \
2323
"antithesis.images": "'"workload:latest;docker.io/library/postgres:15-alpine;ghcr.io/formancehq/operator:v2.10.1;ghcr.io/formancehq/operator-utils:v2.0.14;ghcr.io/formancehq/gateway:v2.0.24;ghcr.io/formancehq/ledger-instrumented:$LEDGER_PREVIOUS_TAG;ghcr.io/formancehq/ledger-instrumented:$LEDGER_LATEST_TAG"'" \
2424
} \
2525
}'

workload/Dockerfile

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
11
# Compiler
2-
FROM golang:1.24-alpine3.22 AS compiler
2+
FROM golang:1.24-trixie AS compiler
3+
4+
RUN apt-get update && apt-get install -y bash git gcc
35

46
RUN go install github.com/antithesishq/antithesis-sdk-go/tools/antithesis-go-instrumentor@latest
57

6-
COPY go.* .
7-
COPY bin ./bin
8-
COPY internal ./internal
8+
COPY go.* /src/.
9+
COPY bin /src/bin
10+
COPY internal /src/internal
911

10-
RUN antithesis-go-instrumentor -assert_only .
12+
RUN mkdir /instrumented
13+
WORKDIR /src
14+
RUN antithesis-go-instrumentor . /instrumented
15+
WORKDIR /instrumented/customer
1116

1217
RUN go build -o /init ./bin/init
1318
RUN mkdir -p /cmds
14-
RUN for file in $(ls ./bin/cmds/); do cp ./github.com_V_formancehq_V_dst_V_workload_antithesis_catalog.go ./bin/cmds/$file; go build -o /cmds/$file ./bin/cmds/$file; done
19+
RUN for file in $(ls ./bin/cmds/); do cp ./github.com_V_formancehq_V_dst_V_workload_antithesis_catalog.go ./bin/cmds/$file; go build -race -o /cmds/$file ./bin/cmds/$file; done
1520

1621
# Runner
17-
FROM alpine:3.22
22+
FROM debian:trixie
1823

19-
RUN apk update && apk add --no-cache curl
24+
RUN apt-get update && apt-get install -y curl
2025

2126
ARG LEDGER_LATEST_TAG
2227

2328
COPY --from=compiler /init /init
2429
ENTRYPOINT ["/init"]
2530

2631
COPY --from=compiler /cmds/* /opt/antithesis/test/v1/main/
32+
COPY --from=compiler /instrumented/symbols/ /symbols
2733

28-
RUN echo ${LEDGER_LATEST_TAG} > /ledger_latest_tag
34+
RUN echo -n ${LEDGER_LATEST_TAG} > /ledger_latest_tag

0 commit comments

Comments
 (0)