Skip to content

Commit

Permalink
make generate
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <pingsutw@apache.org>
  • Loading branch information
pingsutw committed Apr 15, 2023
1 parent 7fcff9c commit 3bf0466
Show file tree
Hide file tree
Showing 108 changed files with 2,746 additions and 2,689 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
- name: Prime docker cache
run: (docker load -i /tmp/tmp/docker-images/snapshot-builder.tar || true) && (docker load -i /tmp/tmp/docker-images/snapshot.tar || true)
- name: Build dockerfile
if : ${{ matrix.package }} == 'flyteadmin' || ${{ matrix.package }} == 'flytepropeller' || ${{ matrix.package }} == 'flytecopilot'
if : ${{ matrix.package == 'flyteadmin'}}
env:
# We are unable to leverage docker buildx here without changing the
# caching mechanism significantly. See here for the caching options
Expand All @@ -119,10 +119,11 @@ jobs:
# should rewrite this pipeline to use docker buildx with cache type=gha.
DOCKER_BUILDKIT: "1"
run: |
docker build -t flyteorg/${{ github.event.repository.name }}:builder --target builder --cache-from=flyteorg/${{ github.event.repository.name }}:builder .
docker build -t flyteorg/${{ github.event.repository.name }}:latest --cache-from=flyteorg/${{ github.event.repository.name }}:builder .
docker build -t flyteorg/${{ github.event.repository.name }}:builder --target builder --cache-from=flyteorg/${{ github.event.repository.name }}:builder ../
docker build -t flyteorg/${{ github.event.repository.name }}:latest --cache-from=flyteorg/${{ github.event.repository.name }}:builder ../
- name: Tag and cache docker image
if : ${{ matrix.package == 'flyteadmin'}}
run: mkdir -p /tmp/tmp/docker-images && docker save flyteorg/${{ github.event.repository.name }}:builder -o /tmp/tmp/docker-images/snapshot-builder.tar && docker save flyteorg/${{ github.event.repository.name }}:latest -o /tmp/tmp/docker-images/snapshot.tar

end-to-end:
Expand Down
298 changes: 171 additions & 127 deletions boilerplate/flyte/golang_support_tools/go.mod

Large diffs are not rendered by default.

1,266 changes: 643 additions & 623 deletions boilerplate/flyte/golang_support_tools/go.sum

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions boilerplate/flyte/golang_test_targets/download_tooling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ tools=(
"github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc"
)

SCRIPT_DIR=$(dirname "$0")
tmp_dir=$(mktemp -d -t gotooling-XXX)
echo "Using temp directory ${tmp_dir}"
cp -R "$SCRIPT_DIR"/../golang_support_tools/* "$tmp_dir"
cp -R ../boilerplate/flyte/golang_support_tools/* $tmp_dir
pushd "$tmp_dir"

for tool in "${tools[@]}"
do
echo "Installing ${tool}"
GO111MODULE=on go install "$tool"
GO111MODULE=on go install $tool
done

popd
popd
2 changes: 1 addition & 1 deletion boilerplate/flyte/golang_test_targets/go-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ go generate ./...
if [ -n "$DELTA_CHECK" ]; then
DIRTY=$(git status --porcelain)
if [ -n "$DIRTY" ]; then
echo "FAILED: Go code updated without commiting generated code."
echo "FAILED: Go code updated without committing generated code."
echo "Ensure make generate has run and all changes are committed."
DIFF=$(git diff)
echo "diff detected: $DIFF"
Expand Down
6 changes: 1 addition & 5 deletions flyteadmin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,13 @@ RUN GRPC_HEALTH_PROBE_VERSION=v0.4.11 && \
echo 'ded15e598d887ccc47bf2321371950bbf930f5e4856b9f75712ce4b2b5120480 /artifacts/grpc_health_probe' > .grpc_checksum && \
sha256sum -c .grpc_checksum

# COPY only the go mod files for efficient caching
COPY flyteadmin/go.mod flyteadmin/go.sum /go/src/github.com/flyteorg/flyte/flyteadmin/
COPY . /go/src/github.com/flyteorg/flyte/
WORKDIR /go/src/github.com/flyteorg/flyte/flyteadmin

# Pull dependencies
RUN go mod download


# COPY the rest of the source code
COPY . /go/src/github.com/flyteorg/flyte/

# This 'linux_compile' target should compile binaries to the /artifacts directory
# The main entrypoint should be compiled to /artifacts/flyteadmin
RUN make linux_compile
Expand Down
7 changes: 2 additions & 5 deletions flytecopilot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ FROM golang:1.18-alpine3.16 as builder
RUN apk add git openssh-client make curl

# COPY only the go mod files for efficient caching
COPY flytecopilot/go.mod flytecopilot/go.sum /go/src/github.com/lyft/flyte/flytecopilot/
WORKDIR /go/src/github.com/lyft/flyte/flytecopilot
COPY . /go/src/github.com/flyteorg/flyte/
WORKDIR /go/src/github.com/flyteorg/flyte/flytecopilot

# Pull dependencies
RUN go mod download

# COPY the rest of the source code
COPY . /go/src/github.com/lyft/flyte/flytecopilot/

# This 'linux_compile' target should compile binaries to the /artifacts directory
# The main entrypoint should be compiled to /artifacts/flyteplugins
RUN make linux_compile
Expand Down
4 changes: 0 additions & 4 deletions flytecopilot/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/flyteorg/flyteidl v1.3.6 h1:PI846AdnrQZ84pxRVAzA3WGihv+xXmjQHO91nj/kV9g=
github.com/flyteorg/flyteidl v1.3.6/go.mod h1:Pkt2skI1LiHs/2ZoekBnyPhuGOFMiuul6HHcKGZBsbM=
github.com/flyteorg/flytestdlib v1.0.15 h1:kv9jDQmytbE84caY+pkZN8trJU2ouSAmESzpTEhfTt0=
github.com/flyteorg/flytestdlib v1.0.15/go.mod h1:ghw/cjY0sEWIIbyCtcJnL/Gt7ZS7gf9SUi0CCPhbz3s=
github.com/flyteorg/stow v0.3.6 h1:jt50ciM14qhKBaIrB+ppXXY+SXB59FNREFgTJqCyqIk=
github.com/flyteorg/stow v0.3.6/go.mod h1:5dfBitPM004dwaZdoVylVjxFT4GWAgI0ghAndhNUzCo=
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
Expand Down
3 changes: 3 additions & 0 deletions flytectl/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ require (
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/EngHabu/mockery v0.0.0-20220916190332-dde70e38baba // indirect
github.com/Microsoft/go-winio v0.5.0 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
Expand Down Expand Up @@ -137,10 +138,12 @@ require (
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
golang.org/x/tools v0.1.12 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
google.golang.org/api v0.76.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand Down
6 changes: 6 additions & 0 deletions flytectl/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp
github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/EngHabu/mockery v0.0.0-20220916190332-dde70e38baba h1:HDBbUo0odjuCCtStDS//vNd3CeP1GdjQVhFmSZLnFwU=
github.com/EngHabu/mockery v0.0.0-20220916190332-dde70e38baba/go.mod h1:DjqxgJ6VUERvvVE41d4Rrn72K29MXwk9ziY18bi36BU=
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
Expand Down Expand Up @@ -977,6 +979,8 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -1250,6 +1254,8 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
2 changes: 1 addition & 1 deletion flytectl/pkg/k8s/k8s_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ users:
- name: foo-user
user:
exec:
apiVersion: client.authentication.k8s.io/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
args:
- arg-1
- arg-2
Expand Down
2 changes: 1 addition & 1 deletion flytectl/pkg/sandbox/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ users:
- name: default
user:
exec:
apiVersion: client.authentication.k8s.io/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
args:
- arg-1
- arg-2
Expand Down
7 changes: 2 additions & 5 deletions flytepropeller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@ ENV GOOS linux
RUN apk add git openssh-client make curl

# COPY only the go mod files for efficient caching
COPY flytepropeller/go.mod flytepropeller/go.sum /go/src/github.com/flyteorg/flyte/flytepropeller/
COPY . /go/src/github.com/flyteorg/flyte/
WORKDIR /go/src/github.com/flyteorg/flyte/flytepropeller

# Pull dependencies
RUN go mod download

# COPY the rest of the source code
COPY . /go/src/github.com/flyteorg/flyte/flytepropeller/

# This 'linux_compile' target should compile binaries to the /artifacts directory
# The main entrypoint should be compiled to /artifacts/flytepropeller
RUN make linux_compile
Expand All @@ -30,7 +27,7 @@ ENV PATH="/artifacts:${PATH}"

# This will eventually move to centurylink/ca-certs:latest for minimum possible image size
FROM alpine:3.16
LABEL org.opencontainers.image.source https://github.com/flyteorg/flytepropeller
LABEL org.opencontainers.image.source=https://github.com/flyteorg/flytepropeller

COPY --from=builder /artifacts /bin

Expand Down
24 changes: 12 additions & 12 deletions flytepropeller/events/mocks/event_recorder.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions flytepropeller/events/mocks/event_sink.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions flytepropeller/events/mocks/node_event_recorder.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions flytepropeller/events/mocks/task_event_recorder.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions flytepropeller/events/mocks/workflow_event_recorder.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions flytepropeller/events/mocks/writer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3bf0466

Please sign in to comment.