Skip to content

Commit

Permalink
chore: bump proto image version to be in sync with golang (#970)
Browse files Browse the repository at this point in the history
  • Loading branch information
nandor-magyar authored May 8, 2024
1 parent fceb8e8 commit d55f4f5
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/builder_image_protobuf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tester_image_builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -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); \
Expand Down
1 change: 1 addition & 0 deletions images/builder-golang/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions images/builder-protobuf/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 \
[email protected] \
Expand Down
2 changes: 1 addition & 1 deletion protobuf/go/agent/agent.pb.go

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

2 changes: 1 addition & 1 deletion protobuf/go/agent/agent_grpc.pb.go

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

2 changes: 1 addition & 1 deletion protobuf/go/common/common.pb.go

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

2 changes: 1 addition & 1 deletion web/crux/src/grpc/google/protobuf/timestamp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d55f4f5

Please sign in to comment.