From d55f4f5fc86ba1806792c334858371a2d1129daa Mon Sep 17 00:00:00 2001 From: Nandor Magyar Date: Wed, 8 May 2024 14:32:50 +0200 Subject: [PATCH] chore: bump proto image version to be in sync with golang (#970) --- .github/workflows/builder_image_protobuf.yaml | 2 +- .github/workflows/tester_image_builder.yaml | 2 +- Makefile | 10 +++------- images/builder-golang/Dockerfile | 1 + images/builder-protobuf/Dockerfile | 5 +++-- protobuf/go/agent/agent.pb.go | 2 +- protobuf/go/agent/agent_grpc.pb.go | 2 +- protobuf/go/common/common.pb.go | 2 +- web/crux/src/grpc/google/protobuf/timestamp.ts | 2 +- 9 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/builder_image_protobuf.yaml b/.github/workflows/builder_image_protobuf.yaml index bf5cbb1ce9..219da4f50b 100644 --- a/.github/workflows/builder_image_protobuf.yaml +++ b/.github/workflows/builder_image_protobuf.yaml @@ -12,7 +12,7 @@ permissions: env: GITHUB_REGISTRY: ghcr.io BUILDER_IMAGE_NAME: dyrector-io/dyrectorio/builder-images/protobuf - VERSION: 1 + VERSION: 2 jobs: build: runs-on: ubuntu-22.04 diff --git a/.github/workflows/tester_image_builder.yaml b/.github/workflows/tester_image_builder.yaml index 0f84794940..af318a26d2 100644 --- a/.github/workflows/tester_image_builder.yaml +++ b/.github/workflows/tester_image_builder.yaml @@ -16,7 +16,7 @@ jobs: build: runs-on: ubuntu-22.04 container: - image: ghcr.io/dyrector-io/dyrectorio/builder-images/protobuf:1 + image: ghcr.io/dyrector-io/dyrectorio/builder-images/protobuf:2 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/Makefile b/Makefile index 0060035d0e..9b7368535f 100644 --- a/Makefile +++ b/Makefile @@ -72,13 +72,13 @@ protogen:| proto-agent proto-crux # Run linting on the Go code .PHONY: go-lint go-lint: - MSYS_NO_PATHCONV=1 docker run --rm -u ${UID}:${GID} -v ${PWD}:/usr/work ghcr.io/dyrector-io/dyrectorio/alpine-proto:3.17-4 ash -c "\ + MSYS_NO_PATHCONV=1 docker run --rm -u ${UID}:${GID} -v ${PWD}:/usr/work ghcr.io/dyrector-io/dyrectorio/builder-images/protobuf:2 ash -c "\ cd golang && make lint" # Generate agent gRPC files .PHONY: proto-agent proto-agent: - MSYS_NO_PATHCONV=1 docker run --rm -u ${UID}:${GID} -v ${PWD}:/usr/work ghcr.io/dyrector-io/dyrectorio/alpine-proto:3.17-4 ash -c "\ + MSYS_NO_PATHCONV=1 docker run --rm -u ${UID}:${GID} -v ${PWD}:/usr/work ghcr.io/dyrector-io/dyrectorio/builder-images/protobuf:2 ash -c "\ mkdir -p protobuf/go && \ protoc -I. \ --go_out /tmp \ @@ -91,7 +91,7 @@ proto-agent: # Generate API grpc files .PHONY: proto-crux proto-crux: - MSYS_NO_PATHCONV=1 docker run --rm -u ${UID}:${GID} -v ${PWD}:/usr/work ghcr.io/dyrector-io/dyrectorio/alpine-proto:3.17-4 ash -c "\ + MSYS_NO_PATHCONV=1 docker run --rm -u ${UID}:${GID} -v ${PWD}:/usr/work ghcr.io/dyrector-io/dyrectorio/builder-images/protobuf:2 ash -c "\ mkdir -p ./web/crux/src/grpc && \ protoc \ --experimental_allow_proto3_optional \ @@ -106,10 +106,6 @@ proto-crux: cd ./web/crux/src/grpc && \ npx prettier -w "./**.ts" -.PHONY: build-proto-image -build-proto-image: - docker build -t ghcr.io/dyrector-io/dyrectorio/alpine-proto:3.17-4 -f images/alpine-proto/Dockerfile --progress plain . - .PHONY: branch-check branch-check: @branch=$$(git rev-parse --abbrev-ref HEAD); \ diff --git a/images/builder-golang/Dockerfile b/images/builder-golang/Dockerfile index c626ad838a..4a9511ea99 100644 --- a/images/builder-golang/Dockerfile +++ b/images/builder-golang/Dockerfile @@ -1,3 +1,4 @@ +# note: update this together with protobuf image FROM docker.io/library/golang:1.22-alpine3.19 ENV GOLANGCI_LINT_CACHE $GOPATH/cache diff --git a/images/builder-protobuf/Dockerfile b/images/builder-protobuf/Dockerfile index 982b93a927..02990d6b92 100644 --- a/images/builder-protobuf/Dockerfile +++ b/images/builder-protobuf/Dockerfile @@ -1,6 +1,7 @@ # this image is our official way of generating proto-files # for reproducable builds, anywhere -FROM docker.io/library/golang:1.20-alpine3.17 +# note: update this together with golang image +FROM docker.io/library/golang:1.22-alpine3.19 ENV GOLANGCI_LINT_CACHE $GOPATH/cache ENV GOCACHE $GOPATH/cache @@ -14,7 +15,7 @@ RUN mkdir -p $GOPATH/src && \ mkdir -p $GOPATH/cache && \ mkdir -p $GOPATH/pkg -RUN apk add nodejs npm alpine-sdk protoc protobuf-dev rsync docker git zstd openssl1.1-compat bash jq +RUN apk add nodejs npm alpine-sdk protoc protobuf-dev rsync docker git zstd openssl bash jq RUN npm i -g \ ts-proto@1.138.0 \ diff --git a/protobuf/go/agent/agent.pb.go b/protobuf/go/agent/agent.pb.go index 2212e21d73..fb3337b1fc 100644 --- a/protobuf/go/agent/agent.pb.go +++ b/protobuf/go/agent/agent.pb.go @@ -6,7 +6,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.9 +// protoc v4.24.4 // source: protobuf/proto/agent.proto package agent diff --git a/protobuf/go/agent/agent_grpc.pb.go b/protobuf/go/agent/agent_grpc.pb.go index f489b97ac4..59e018dda7 100644 --- a/protobuf/go/agent/agent_grpc.pb.go +++ b/protobuf/go/agent/agent_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.9 +// - protoc v4.24.4 // source: protobuf/proto/agent.proto package agent diff --git a/protobuf/go/common/common.pb.go b/protobuf/go/common/common.pb.go index 072dd680dc..e929da025a 100644 --- a/protobuf/go/common/common.pb.go +++ b/protobuf/go/common/common.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.9 +// protoc v4.24.4 // source: protobuf/proto/common.proto package common diff --git a/web/crux/src/grpc/google/protobuf/timestamp.ts b/web/crux/src/grpc/google/protobuf/timestamp.ts index c03ffb6040..490fef20b9 100644 --- a/web/crux/src/grpc/google/protobuf/timestamp.ts +++ b/web/crux/src/grpc/google/protobuf/timestamp.ts @@ -90,7 +90,7 @@ export const protobufPackage = 'google.protobuf' * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D + * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() * ) to obtain a formatter capable of generating timestamps in this format. */ export interface Timestamp {