Skip to content

Commit 6e613a5

Browse files
authored
Merge branch 'main' into andystaples/add-async-client
2 parents aa9d198 + 9a909d2 commit 6e613a5

34 files changed

+4029
-471
lines changed

.github/workflows/durabletask-azuremanaged-dev.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- main
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
publish-dev:
1316
runs-on: ubuntu-latest

.github/workflows/durabletask-azuremanaged-experimental.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- main
77
- release/*
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
publish-experimental:
1114
runs-on: ubuntu-latest

.github/workflows/durabletask-azuremanaged.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
branches:
1111
- "main"
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
lint:
1518
runs-on: ubuntu-latest

.github/workflows/durabletask-dev.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- main
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
publish-dev:
1316
# needs: run-tests

.github/workflows/durabletask-experiment.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- main
77
- release/*
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
publish-experimental:
1114
# needs: run-tests

.github/workflows/durabletask.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
branches:
1111
- "main"
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
lint-and-unit-tests:
1518
runs-on: ubuntu-latest
@@ -57,19 +60,7 @@ jobs:
5760
- name: Pytest unit tests
5861
working-directory: tests/durabletask
5962
run: |
60-
pytest -m "not e2e and not dts" --verbose
61-
# Sidecar for running e2e tests requires Go SDK
62-
- name: Install Go SDK
63-
uses: actions/setup-go@v5
64-
with:
65-
go-version: 'stable'
66-
# Install and run the durabletask-go sidecar for running e2e tests
67-
- name: Pytest e2e tests
68-
working-directory: tests/durabletask
69-
run: |
70-
go install github.com/microsoft/durabletask-go@main
71-
durabletask-go --port 4001 &
72-
pytest -m "e2e and not dts" --verbose
63+
pytest -m "not dts" --verbose
7364
7465
publish-release:
7566
if: startsWith(github.ref, 'refs/tags/v') # Only run if a matching tag is pushed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ 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-
## v1.4.0
8+
## Unreleased
99

1010
ADDED
1111

12+
- Added `durabletask.testing` module with `InMemoryOrchestrationBackend` for testing orchestrations without a sidecar process
1213
- Added `AsyncTaskHubGrpcClient` for asyncio-based applications using `grpc.aio`
1314
- Added `DefaultAsyncClientInterceptorImpl` for async gRPC metadata interceptors
1415
- Added `get_async_grpc_channel` helper for creating async gRPC channels
@@ -18,6 +19,10 @@ CHANGED
1819
- Refactored `TaskHubGrpcClient` to share request-building and validation logic
1920
with `AsyncTaskHubGrpcClient` via module-level helper functions
2021

22+
FIXED:
23+
24+
- Fix unbound variable in entity V1 processing
25+
2126
## v1.3.0
2227

2328
ADDED

Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
init:
22
pip3 install -r requirements.txt
33

4-
test-unit:
5-
pytest -m "not e2e" --verbose
6-
7-
test-e2e:
8-
pytest -m e2e --verbose
4+
test:
5+
pytest --verbose
96

107
install:
118
python3 -m pip install .
@@ -16,4 +13,4 @@ gen-proto:
1613
python3 -m grpc_tools.protoc --proto_path=. --python_out=. --pyi_out=. --grpc_python_out=. ./durabletask/internal/orchestrator_service.proto
1714
rm durabletask/internal/*.proto
1815

19-
.PHONY: init test-unit test-e2e gen-proto install
16+
.PHONY: init test gen-proto install

docs/development.md

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,10 @@ make gen-proto
1111

1212
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`.
1313

14-
### Running unit tests
14+
### Running tests
1515

16-
Unit tests can be run using the following command from the project root. Unit tests _don't_ require a sidecar process to be running.
16+
Tests can be run using the following command from the project root.
1717

1818
```sh
19-
make test-unit
20-
```
21-
22-
### Running E2E tests
23-
24-
The E2E (end-to-end) tests require a sidecar process to be running. You can use the Durable Task test sidecar using the following `docker` command:
25-
26-
```sh
27-
go install github.com/microsoft/durabletask-go@main
28-
durabletask-go --port 4001
29-
```
30-
31-
To run the E2E tests, run the following command from the project root:
32-
33-
```sh
34-
make test-e2e
19+
make test
3520
```

durabletask/internal/helpers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ def new_orchestrator_completed_event() -> pb.HistoryEvent:
2626

2727

2828
def new_execution_started_event(name: str, instance_id: str, encoded_input: Optional[str] = None,
29-
tags: Optional[dict[str, str]] = None) -> pb.HistoryEvent:
29+
tags: Optional[dict[str, str]] = None,
30+
version: Optional[str] = None) -> pb.HistoryEvent:
3031
return pb.HistoryEvent(
3132
eventId=-1,
3233
timestamp=timestamp_pb2.Timestamp(),
3334
executionStarted=pb.ExecutionStartedEvent(
3435
name=name,
36+
version=get_string_value(version),
3537
input=get_string_value(encoded_input),
3638
orchestrationInstance=pb.OrchestrationInstance(instanceId=instance_id),
3739
tags=tags))
@@ -85,12 +87,14 @@ def new_sub_orchestration_created_event(
8587
event_id: int,
8688
name: str,
8789
instance_id: str,
88-
encoded_input: Optional[str] = None) -> pb.HistoryEvent:
90+
encoded_input: Optional[str] = None,
91+
version: Optional[str] = None) -> pb.HistoryEvent:
8992
return pb.HistoryEvent(
9093
eventId=event_id,
9194
timestamp=timestamp_pb2.Timestamp(),
9295
subOrchestrationInstanceCreated=pb.SubOrchestrationInstanceCreatedEvent(
9396
name=name,
97+
version=get_string_value(version),
9498
input=get_string_value(encoded_input),
9599
instanceId=instance_id)
96100
)

0 commit comments

Comments
 (0)