Skip to content

Commit bf3b6df

Browse files
committed
Update scenario.go
1 parent 85c6621 commit bf3b6df

File tree

6 files changed

+18
-13
lines changed

6 files changed

+18
-13
lines changed

dockerfiles/cli.Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ COPY cmd ./cmd
1818
COPY loadgen ./loadgen
1919
COPY scenarios ./scenarios
2020
COPY workers ./workers/
21-
COPY common ./common
2221
COPY go.mod go.sum ./
2322

2423
# Install Antithesis SDK and instrumentor
@@ -36,22 +35,20 @@ COPY --from=source /go/pkg/mod /go/pkg/mod
3635
WORKDIR /omes_source
3736

3837
# Instrument OMES with Antithesis
39-
RUN echo "🔧 Instrumenting OMES..." && \
38+
RUN echo "🔧 Instrumenting..." && \
4039
mkdir /omes_transformed && \
4140
antithesis-go-instrumentor /omes_source /omes_transformed && \
42-
cp -r /omes_source/.git /omes_transformed/ 2>/dev/null || true && \
43-
mv /omes_transformed /instrumented && \
41+
cp -r /omes_source/.git /omes_transformed/customer/ 2>/dev/null || true && \
42+
cp /omes_source/go.mod /omes_source/go.sum /omes_transformed/customer/ && \
4443
mkdir -p /notifier /symbols && \
45-
mv /instrumented/notifier.json /notifier/ 2>/dev/null || true && \
46-
mv /instrumented/symbols.json /symbols/ 2>/dev/null || true
44+
cp /omes_transformed/notifier.json /notifier/ 2>/dev/null || true && \
45+
cp /omes_transformed/symbols.json /symbols/ 2>/dev/null || true
4746

4847
# Build stage: compile the instrumented code
4948
FROM --platform=linux/$TARGETARCH golang:1.25 AS build
5049

5150
ARG TARGETARCH
5251

53-
WORKDIR /app
54-
5552
# Install protobuf compiler and git
5653
RUN apt-get update \
5754
&& DEBIAN_FRONTEND=noninteractive \
@@ -72,8 +69,11 @@ RUN wget -q -O - https://sh.rustup.rs | sh -s -- -y \
7269
fi
7370
ENV PATH="$PATH:/root/.cargo/bin"
7471

75-
# Copy instrumented source code
76-
COPY --from=instrumented /instrumented /app
72+
# Copy entire instrumented structure (includes customer code + notifier package)
73+
COPY --from=instrumented /omes_transformed /omes_transformed
74+
75+
# Set working directory to the customer code
76+
WORKDIR /omes_transformed/customer
7777

7878
# Build the CLI
7979
RUN CGO_ENABLED=0 go build -o temporal-omes ./cmd

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ require (
3131
)
3232

3333
require (
34+
github.com/antithesishq/antithesis-sdk-go v0.5.1-0.20250924165633-f60b0222f1b6 // indirect
3435
github.com/davecgh/go-spew v1.1.1 // indirect
3536
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect
3637
github.com/golang/mock v1.6.0 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github.com/antithesishq/antithesis-sdk-go v0.5.1-0.20250924165633-f60b0222f1b6 h1:qSD74Vz3scN2SrfML8dy2Whcv0C3pNkfqYZXeL4SIq0=
2+
github.com/antithesishq/antithesis-sdk-go v0.5.1-0.20250924165633-f60b0222f1b6/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E=
13
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
24
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
35
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=

loadgen/scenario.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"go.temporal.io/sdk/temporal"
1919
"go.uber.org/zap"
2020

21-
"github.com/temporalio/omes/common/softassert"
21+
"github.com/antithesishq/antithesis-sdk-go/assert"
2222
"github.com/temporalio/omes/loadgen/kitchensink"
2323
)
2424

@@ -434,8 +434,7 @@ func (r *Run) ExecuteAnyWorkflow(ctx context.Context, options client.StartWorkfl
434434
}
435435
if err := execution.Get(ctx, valuePtr); err != nil {
436436
// Antithesis assertion: Workflow execution should never fail
437-
softassert.Always(
438-
false,
437+
assert.Unreachable(
439438
"Workflow execution should never return an error",
440439
map[string]any{
441440
"workflow_id": execution.GetID(),

workers/go/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ require (
1313
)
1414

1515
require (
16+
github.com/antithesishq/antithesis-sdk-go v0.5.1-0.20250924165633-f60b0222f1b6 // indirect
1617
github.com/beorn7/perks v1.0.1 // indirect
1718
github.com/cespare/xxhash/v2 v2.3.0 // indirect
1819
github.com/davecgh/go-spew v1.1.1 // indirect

workers/go/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github.com/antithesishq/antithesis-sdk-go v0.5.1-0.20250924165633-f60b0222f1b6 h1:qSD74Vz3scN2SrfML8dy2Whcv0C3pNkfqYZXeL4SIq0=
2+
github.com/antithesishq/antithesis-sdk-go v0.5.1-0.20250924165633-f60b0222f1b6/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E=
13
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
24
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
35
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=

0 commit comments

Comments
 (0)