Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sh text eol=lf
3 changes: 1 addition & 2 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: true

- name: Setup Go environment
uses: actions/setup-go@v5
Expand All @@ -74,7 +73,7 @@ jobs:
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@$PROTOC_GEN_GO_GRPC

- name: Generate grpc code
run: protoc --go_out=. --go-grpc_out=. -I ./submodules/durabletask-protobuf/protos orchestrator_service.proto
run: protoc --go_out=. --go-grpc_out=. -I ./vendored/durabletask-protobuf/protos orchestrator_service.proto

- name: Run go vet
run: go vet ./...
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

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

## Unreleased

### Changed

- 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.

## [v0.6.0] - 2025-02-05

### Added
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,23 +247,25 @@ Note that each orchestration is represented as a single span with activities, ti

## Cloning this repository

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.
Clone the repository as you normally would:

```bash
git clone --recurse-submodules https://github.com/microsoft/durabletask-go
git clone https://github.com/microsoft/durabletask-go
```

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.

## Building the project

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

### Generating protobuf

Use the following command to regenerate the protobuf from the submodule. Use this whenever updating the submodule reference.
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).

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

### Generating mocks for testing
Expand Down
1 change: 0 additions & 1 deletion submodules/durabletask-protobuf
Submodule durabletask-protobuf deleted from 4207e1
4 changes: 4 additions & 0 deletions vendored/durabletask-protobuf/PROTO_SOURCE_COMMIT_HASH
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: https://github.com/microsoft/durabletask-protobuf
Branch: main
Commit: 4207e1dbd14cedc268f69c3befee60fcaad19367
URL: https://github.com/microsoft/durabletask-protobuf/blob/4207e1dbd14cedc268f69c3befee60fcaad19367/protos/orchestrator_service.proto
29 changes: 29 additions & 0 deletions vendored/durabletask-protobuf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Durable Task Protobuf Files

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.

## Directory Structure

- `protos/` - Contains the vendored proto files
- `PROTO_SOURCE_COMMIT_HASH` - Records the upstream source URL, branch/ref, and commit hash that the proto files were last synced from
- `update-proto.sh` - Helper script to refresh the vendored proto file and commit hash from upstream

## Updating the proto files

Run the helper script from the repository root to download the latest `orchestrator_service.proto` from upstream and update `PROTO_SOURCE_COMMIT_HASH`:

```bash
# Update from the default branch (main)
./vendored/durabletask-protobuf/update-proto.sh

# Update from a specific branch, tag, or commit SHA
./vendored/durabletask-protobuf/update-proto.sh <branch-tag-or-sha>
```

After running the script, regenerate the Go gRPC bindings so that the committed `internal/protos/*.pb.go` files match the updated `.proto`:

```bash
protoc --go_out=. --go-grpc_out=. -I ./vendored/durabletask-protobuf/protos orchestrator_service.proto
```

Commit the updated proto file, `PROTO_SOURCE_COMMIT_HASH`, and the regenerated `.pb.go` files together.
Loading
Loading