Skip to content

Commit a7ae18e

Browse files
authored
Merge branch 'main' into andystaples/add-distributed-tracing
2 parents 06f3064 + 9a909d2 commit a7ae18e

26 files changed

+3848
-465
lines changed

.github/workflows/durabletask.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,7 @@ jobs:
6060
- name: Pytest unit tests
6161
working-directory: tests/durabletask
6262
run: |
63-
pytest -m "not e2e and not dts" --verbose
64-
# Sidecar for running e2e tests requires Go SDK
65-
- name: Install Go SDK
66-
uses: actions/setup-go@v5
67-
with:
68-
go-version: 'stable'
69-
# Install and run the durabletask-go sidecar for running e2e tests
70-
- name: Pytest e2e tests
71-
working-directory: tests/durabletask
72-
run: |
73-
go install github.com/microsoft/durabletask-go@main
74-
durabletask-go --port 4001 &
75-
pytest -m "e2e and not dts" --verbose
63+
pytest -m "not dts" --verbose
7664
7765
publish-release:
7866
if: startsWith(github.ref, 'refs/tags/v') # Only run if a matching tag is pushed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
ADDED
11+
12+
- Added `durabletask.testing` module with `InMemoryOrchestrationBackend` for testing orchestrations without a sidecar process
13+
1014
FIXED:
1115

1216
- Fix unbound variable in entity V1 processing

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)