Skip to content

Commit 1e57f5c

Browse files
committed
chore: break dependency on util
1 parent 8ca5215 commit 1e57f5c

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ COPY .git/ .git/
1515
COPY api/ api/
1616
COPY shared/ shared/
1717
COPY manager/ manager/
18-
RUN go generate ./shared/util/version.go
1918
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -a -ldflags="-X 'github.com/argoproj-labs/argo-dataflow/shared/util.message=xx$(git log -n1 --oneline)'" -o bin/manager ./manager
2019

2120
FROM gcr.io/distroless/static:nonroot AS controller
@@ -29,7 +28,6 @@ COPY .git/ .git/
2928
COPY api/ api/
3029
COPY shared/ shared/
3130
COPY runner/ runner/
32-
RUN go generate ./shared/util/version.go
3331
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -a -ldflags="-X 'github.com/argoproj-labs/argo-dataflow/shared/util.message=xx$(git log -n1 --oneline)'" -o bin/runner ./runner
3432
COPY kill/ kill/
3533
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -a -ldflags="-X 'github.com/argoproj-labs/argo-dataflow/shared/util.message=xx$(git log -n1 --oneline)'" -o bin/kill ./kill

api/v1alpha1/step_spec.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package v1alpha1
22

33
import (
4+
"encoding/json"
45
"strconv"
56
"time"
67

7-
"github.com/argoproj-labs/argo-dataflow/shared/util"
88
corev1 "k8s.io/api/core/v1"
99
"k8s.io/utils/pointer"
1010
)
@@ -56,12 +56,13 @@ func (in *StepSpec) GetPodSpec(req GetPodSpecReq) corev1.PodSpec {
5656
Name: "var-run-argo-dataflow",
5757
VolumeSource: corev1.VolumeSource{EmptyDir: &corev1.EmptyDirVolumeSource{}},
5858
}
59+
data, _ := json.Marshal(in)
5960
volumeMounts := []corev1.VolumeMount{{Name: volume.Name, MountPath: PathVarRun}}
6061
envVars := []corev1.EnvVar{
6162
{Name: EnvPipelineName, Value: req.PipelineName},
6263
{Name: EnvNamespace, Value: req.Namespace},
6364
{Name: EnvReplica, Value: strconv.Itoa(int(req.Replica))},
64-
{Name: EnvStepSpec, Value: util.MustJSON(in)},
65+
{Name: EnvStepSpec, Value: string(data)},
6566
{Name: EnvUpdateInterval, Value: req.UpdateInterval.String()},
6667
}
6768
return corev1.PodSpec{

0 commit comments

Comments
 (0)