Skip to content

Commit 6f755e0

Browse files
committed
Track proto source commit hash
1 parent a9f02a3 commit 6f755e0

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ install:
1212

1313
gen-proto:
1414
curl -o durabletask/internal/orchestrator_service.proto https://raw.githubusercontent.com/microsoft/durabletask-protobuf/refs/heads/main/protos/orchestrator_service.proto
15+
curl -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/microsoft/durabletask-protobuf/commits?path=protos/orchestrator_service.proto&sha=main&per_page=1" | jq -r '.[0].sha' >> durabletask/internal/PROTO_SOURCE_COMMIT_HASH
1516
python3 -m grpc_tools.protoc --proto_path=. --python_out=. --pyi_out=. --grpc_python_out=. ./durabletask/internal/orchestrator_service.proto
1617
rm durabletask/internal/*.proto
1718

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,19 +161,13 @@ The following is more information about how to develop this project. Note that d
161161

162162
### Generating protobufs
163163

164-
Protobuf definitions are stored in the [./submodules/durabletask-proto](./submodules/durabletask-proto) directory, which is a submodule. To update the submodule, run the following command from the project root:
165-
166-
```sh
167-
git submodule update --init
168-
```
169-
170-
Once the submodule is available, the corresponding source code can be regenerated using the following command from the project root:
171-
172164
```sh
173165
pip3 install -r dev-requirements.txt
174166
make gen-proto
175167
```
176168

169+
This will download the `orchestrator_service.proto` from the `microsoft/durabletask-protobuf` repo and compile it using `grpcio-tools`. The version of the source proto file that was downloaded can be found in the file `durabletask/internal/PROTO_SOURCE_COMMIT_HASH`.
170+
177171
### Running unit tests
178172

179173
Unit tests can be run using the following command from the project root. Unit tests _don't_ require a sidecar process to be running.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
443b333f4f65a438dc9eb4f090560d232afec4b7

0 commit comments

Comments
 (0)