Skip to content

Commit cb870cd

Browse files
authored
Merge branch 'main' into develop
2 parents c14e6b5 + d158374 commit cb870cd

10 files changed

Lines changed: 733 additions & 11 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sh text eol=lf

.github/workflows/pr-validation.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ jobs:
5353
- uses: actions/checkout@v4
5454
with:
5555
fetch-depth: 1
56-
submodules: true
5756

5857
- name: Setup Go environment
5958
uses: actions/setup-go@v5
@@ -74,7 +73,7 @@ jobs:
7473
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@$PROTOC_GEN_GO_GRPC
7574
7675
- name: Generate grpc code
77-
run: protoc --go_out=. --go-grpc_out=. -I ./submodules/durabletask-protobuf/protos orchestrator_service.proto
76+
run: protoc --go_out=. --go-grpc_out=. -I ./vendored/durabletask-protobuf/protos orchestrator_service.proto
7877

7978
- name: Run go vet
8079
run: go vet ./...

.gitmodules

Lines changed: 0 additions & 4 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## Unreleased
9+
10+
### Changed
11+
12+
- Removed the `submodules/durabletask-protobuf` git submodule. The `orchestrator_service.proto` file is now vendored under `vendored/durabletask-protobuf/protos/`, with the source provenance (URL, branch/ref, commit hash) tracked in `vendored/durabletask-protobuf/PROTO_SOURCE_COMMIT_HASH` and a helper script (`vendored/durabletask-protobuf/update-proto.sh`) for refreshing the proto from upstream.
13+
814
## [v0.6.0] - 2025-02-05
915

1016
### Added

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,23 +247,25 @@ Note that each orchestration is represented as a single span with activities, ti
247247

248248
## Cloning this repository
249249

250-
This repository contains submodules. Be sure to clone it with the option to include submodules. Otherwise you will not be able to generate the protobuf code.
250+
Clone the repository as you normally would:
251251

252252
```bash
253-
git clone --recurse-submodules https://github.com/microsoft/durabletask-go
253+
git clone https://github.com/microsoft/durabletask-go
254254
```
255255

256+
The protocol buffer definitions used to generate the gRPC bindings are vendored under [`vendored/durabletask-protobuf/protos`](./vendored/durabletask-protobuf/protos). See [`vendored/durabletask-protobuf/README.md`](./vendored/durabletask-protobuf/README.md) for details on how to refresh them from the upstream [microsoft/durabletask-protobuf](https://github.com/microsoft/durabletask-protobuf) repository.
257+
256258
## Building the project
257259

258260
This project requires go v1.19.x or greater. You can build a standalone executable by simply running `go build` at the project root.
259261

260262
### Generating protobuf
261263

262-
Use the following command to regenerate the protobuf from the submodule. Use this whenever updating the submodule reference.
264+
Use the following command to regenerate the protobuf bindings from the vendored proto file. Use this whenever updating the proto file under [`vendored/durabletask-protobuf/protos`](./vendored/durabletask-protobuf/protos).
263265

264266
```bash
265267
# NOTE: assumes the .proto file defines: option go_package = "/internal/protos"
266-
protoc --go_out=. --go-grpc_out=. -I submodules/durabletask-protobuf/protos orchestrator_service.proto
268+
protoc --go_out=. --go-grpc_out=. -I vendored/durabletask-protobuf/protos orchestrator_service.proto
267269
```
268270

269271
### Generating mocks for testing

submodules/durabletask-protobuf

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Source: https://github.com/microsoft/durabletask-protobuf
2+
Branch: main
3+
Commit: 4207e1dbd14cedc268f69c3befee60fcaad19367
4+
URL: https://github.com/microsoft/durabletask-protobuf/blob/4207e1dbd14cedc268f69c3befee60fcaad19367/protos/orchestrator_service.proto
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Durable Task Protobuf Files
2+
3+
This directory contains the protocol buffer definitions used by the Durable Task Framework Go SDK. The files in this directory are vendored from the [microsoft/durabletask-protobuf](https://github.com/microsoft/durabletask-protobuf) repository.
4+
5+
## Directory Structure
6+
7+
- `protos/` - Contains the vendored proto files
8+
- `PROTO_SOURCE_COMMIT_HASH` - Records the upstream source URL, branch/ref, and commit hash that the proto files were last synced from
9+
- `update-proto.sh` - Helper script to refresh the vendored proto file and commit hash from upstream
10+
11+
## Updating the proto files
12+
13+
Run the helper script from the repository root to download the latest `orchestrator_service.proto` from upstream and update `PROTO_SOURCE_COMMIT_HASH`:
14+
15+
```bash
16+
# Update from the default branch (main)
17+
./vendored/durabletask-protobuf/update-proto.sh
18+
19+
# Update from a specific branch, tag, or commit SHA
20+
./vendored/durabletask-protobuf/update-proto.sh <branch-tag-or-sha>
21+
```
22+
23+
After running the script, regenerate the Go gRPC bindings so that the committed `internal/protos/*.pb.go` files match the updated `.proto`:
24+
25+
```bash
26+
protoc --go_out=. --go-grpc_out=. -I ./vendored/durabletask-protobuf/protos orchestrator_service.proto
27+
```
28+
29+
Commit the updated proto file, `PROTO_SOURCE_COMMIT_HASH`, and the regenerated `.pb.go` files together.

0 commit comments

Comments
 (0)