Skip to content

Commit

Permalink
Commit generated Go code and bump dependencies (open-telemetry#946)
Browse files Browse the repository at this point in the history
* accountingservice: commit generated code

bump deps

* license-checker to ignore genproto

* Update README.md

* Add comment to tools.go

* checkoutservice: commit generated code

bump dependencies

* productcatalogservice: commit generated code

bump dependencies
  • Loading branch information
pellared authored and AlexanderWert committed Jul 24, 2023
1 parent 4f7d042 commit 808421a
Show file tree
Hide file tree
Showing 27 changed files with 15,601 additions and 1,249 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,13 @@ src/frontend/cypress/screenshots
src/shippingservice/target/

# Ignore copied/generated protobuf files
/src/accountingservice/genproto/
/src/cartservice/src/protos/
/src/checkoutservice/genproto/
/src/featureflagservice/proto/
/src/featureflagservice/src/ffs_demo_pb.erl
/src/featureflagservice/src/ffs_service_*.erl
/src/featureflagservice/src/oteldemo_*.erl
/src/frontend/pb/
/src/frontend/protos/
/src/paymentservice/demo.proto
/src/productcatalogservice/genproto/
/src/recommendationservice/demo_pb2*.py
/src/shippingservice/proto/
3 changes: 3 additions & 0 deletions .licenserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@
],
"ignore": [
"node_modules/",
"src/accountingservice/genproto/",
"src/cartservice/src/obj/",
"src/cartservice/tests/obj/",
"src/checkoutservice/genproto/",
"src/featureflagservice/assets/vendor/",
"src/featureflagservice/priv/",
"src/productcatalogservice/genproto/",
"internal/tools/"
]
}
11 changes: 1 addition & 10 deletions src/accountingservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,10 @@


FROM golang:1.19.2-alpine AS builder
RUN apk add build-base protobuf-dev protoc
WORKDIR /usr/src/app/

# Restore dependencies
COPY ./src/accountingservice/ ./
COPY ./pb/ ./proto/
RUN go mod download
RUN go install google.golang.org/protobuf/cmd/[email protected]
RUN go install google.golang.org/grpc/cmd/[email protected]

# Build executable
RUN protoc -I ./proto/ ./proto/demo.proto --go_out=./ --go-grpc_out=./
RUN go build -o /go/bin/accountingservice/ ./
RUN go build -o /go/bin/accountingservice/

# -----------------------------------------------------------------------------

Expand Down
25 changes: 22 additions & 3 deletions src/accountingservice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ This service consumes new orders from a Kafka topic.

## Local Build

To build the protos and the service binary, run:
To build the service binary, run:

```sh
protoc -I ../../pb/ ../../pb/demo.proto --go_out=./ --go-grpc_out=./
go build -o /go/bin/accountingservice/ ./
go build -o /go/bin/accountingservice/
```

## Docker Build
Expand All @@ -18,3 +17,23 @@ From the root directory, run:
```sh
docker compose build accountingservice
```

## Regenerate protos

> **Note**
> [`protoc`](https://grpc.io/docs/protoc-installation/) is required.
To regenerate gRPC code run:

```sh
go generate
```

## Bump dependencies

To bump all dependencies run:

```sh
go get -u -t ./...
go mod tidy
```
Loading

0 comments on commit 808421a

Please sign in to comment.