Skip to content

Commit e4fd451

Browse files
YunchuWangCopilot
andcommitted
Merge origin/main into functions-grpc-support
Brings the PR branch up to date with main so the compat layer can build against the current core public API: cancellable TimerTask (#293), native AggregateError WhenAll semantics (#302), rewind support (#296), and related fixes. Clean auto-merge (proto + worker). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2 parents c7114a9 + 28253b9 commit e4fd451

43 files changed

Lines changed: 3831 additions & 129 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
groups:
6+
github-actions:
7+
patterns: ["*"]
8+
schedule:
9+
interval: "weekly"
10+
cooldown:
11+
default-days: 7

.github/workflows/dts-e2e-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
steps:
3838
- name: 📥 Checkout code
39-
uses: actions/checkout@v4
39+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
4040

4141
- name: 🐳 Pull Docker image
4242
run: docker pull mcr.microsoft.com/dts/dts-emulator:$EMULATOR_VERSION
@@ -54,7 +54,7 @@ jobs:
5454
echo "ENDPOINT=localhost:8080" >> $GITHUB_ENV
5555
5656
- name: ⚙️ NodeJS - Install
57-
uses: actions/setup-node@v4
57+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
5858
with:
5959
node-version: ${{ matrix.node-version }}
6060
registry-url: "https://registry.npmjs.org"

.github/workflows/pr-validation.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020

2121
steps:
2222
- name: 📥 Checkout code
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2424

2525
- name: ⚙️ NodeJS - Install
26-
uses: actions/setup-node@v4
26+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2727
with:
2828
node-version: ${{ env.NODE_VER }}
2929
registry-url: "https://registry.npmjs.org"
@@ -47,10 +47,10 @@ jobs:
4747

4848
steps:
4949
- name: 📥 Checkout code
50-
uses: actions/checkout@v4
50+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
5151

5252
- name: ⚙️ NodeJS - Install
53-
uses: actions/setup-node@v4
53+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
5454
with:
5555
node-version: ${{ matrix.node-version }}
5656
registry-url: "https://registry.npmjs.org"
@@ -60,7 +60,7 @@ jobs:
6060

6161
# Install Go SDK for durabletask-go sidecar
6262
- name: 🔧 Install Go SDK
63-
uses: actions/setup-go@v5
63+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
6464
with:
6565
go-version: "stable"
6666

.github/workflows/prepare-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2727
with:
2828
fetch-depth: 0 # Full history needed for git diff and tags
2929

3030
- name: Setup Node.js
31-
uses: actions/setup-node@v4
31+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3232
with:
3333
node-version: '22'
3434

.github/workflows/validate-samples.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
emulator-samples: ${{ steps.find.outputs.emulator }}
3737
no-emulator-samples: ${{ steps.find.outputs.no_emulator }}
3838
steps:
39-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
4040

4141
- name: 🔍 Discover samples via sample.json
4242
id: find
@@ -84,10 +84,10 @@ jobs:
8484
matrix:
8585
node-version: ["22.x"]
8686
steps:
87-
- uses: actions/checkout@v4
87+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
8888

8989
- name: ⚙️ Setup Node.js ${{ matrix.node-version }}
90-
uses: actions/setup-node@v4
90+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
9191
with:
9292
node-version: ${{ matrix.node-version }}
9393
cache: npm
@@ -99,7 +99,7 @@ jobs:
9999
run: npm run build
100100

101101
- name: 📁 Cache build output
102-
uses: actions/cache/save@v4
102+
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
103103
with:
104104
path: |
105105
node_modules
@@ -120,15 +120,15 @@ jobs:
120120
sample: ${{ fromJson(needs.discover.outputs.no-emulator-samples) }}
121121
node-version: ["22.x"]
122122
steps:
123-
- uses: actions/checkout@v4
123+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
124124

125125
- name: ⚙️ Setup Node.js ${{ matrix.node-version }}
126-
uses: actions/setup-node@v4
126+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
127127
with:
128128
node-version: ${{ matrix.node-version }}
129129

130130
- name: 📦 Restore build cache
131-
uses: actions/cache/restore@v4
131+
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
132132
with:
133133
path: |
134134
node_modules
@@ -169,7 +169,7 @@ jobs:
169169
DURABLE_TASK_SCHEDULER_CONNECTION_STRING: "Endpoint=http://localhost:8080;Authentication=None;TaskHub=default"
170170

171171
steps:
172-
- uses: actions/checkout@v4
172+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
173173

174174
- name: 🐳 Start DTS emulator
175175
run: |
@@ -190,12 +190,12 @@ jobs:
190190
run: sleep 10
191191

192192
- name: ⚙️ Setup Node.js ${{ matrix.node-version }}
193-
uses: actions/setup-node@v4
193+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
194194
with:
195195
node-version: ${{ matrix.node-version }}
196196

197197
- name: 📦 Restore build cache
198-
uses: actions/cache/restore@v4
198+
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
199199
with:
200200
path: |
201201
node_modules

internal/protocol/SOURCE_COMMIT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1caadbd7ecfdf5f2309acbeac28a3e36d16aa156
1+
3145f9337fca9de57d2f89a6ff6f07150d34f1c2

internal/protocol/protos/orchestrator_service.proto

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ message ActivityRequest {
2525
OrchestrationInstance orchestrationInstance = 4;
2626
int32 taskId = 5;
2727
TraceContext parentTraceContext = 6;
28+
map<string, string> tags = 7;
2829
}
2930

3031
message ActivityResponse {
@@ -320,6 +321,10 @@ message SendEntityMessageAction {
320321
}
321322
}
322323

324+
message RewindOrchestrationAction {
325+
repeated HistoryEvent newHistory = 1;
326+
}
327+
323328
message OrchestratorAction {
324329
int32 id = 1;
325330
oneof orchestratorActionType {
@@ -330,6 +335,7 @@ message OrchestratorAction {
330335
CompleteOrchestrationAction completeOrchestration = 6;
331336
TerminateOrchestrationAction terminateOrchestration = 7;
332337
SendEntityMessageAction sendEntityMessage = 8;
338+
RewindOrchestrationAction rewindOrchestration = 9;
333339
}
334340
}
335341

@@ -364,12 +370,14 @@ message OrchestratorResponse {
364370
// Whether or not a history is required to complete the original OrchestratorRequest and none was provided.
365371
bool requiresHistory = 7;
366372

373+
/* Chunking logic has since been deprecated and fields related to it are marked as such */
374+
367375
// True if this is a partial (chunked) completion. The backend must keep the work item open until the final chunk (isPartial=false).
368-
bool isPartial = 8;
376+
bool isPartial = 8 [deprecated=true];
369377

370378
// Zero-based position of the current chunk within a chunked completion sequence.
371379
// This field is omitted for non-chunked completions.
372-
google.protobuf.Int32Value chunkIndex = 9;
380+
google.protobuf.Int32Value chunkIndex = 9 [deprecated=true];
373381
}
374382

375383
message CreateInstanceRequest {
@@ -517,6 +525,7 @@ message PurgeInstanceFilter {
517525
google.protobuf.Timestamp createdTimeFrom = 1;
518526
google.protobuf.Timestamp createdTimeTo = 2;
519527
repeated OrchestrationStatus runtimeStatus = 3;
528+
google.protobuf.Duration timeout = 4;
520529
}
521530

522531
message PurgeInstancesResponse {

packages/durabletask-js-azuremanaged/src/retry-policy.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ function statusCodeToName(code: GrpcStatus): string {
8888
* @returns A JSON string representing the service config.
8989
*/
9090
export function createServiceConfig(options?: ClientRetryOptions): string {
91-
const maxAttempts = options?.maxRetries ?? DEFAULT_MAX_ATTEMPTS;
91+
// gRPC maxAttempts includes the original attempt, while maxRetries means
92+
// retries *after* the initial call. Convert by adding 1.
93+
const maxAttempts = options?.maxRetries != null ? options.maxRetries + 1 : DEFAULT_MAX_ATTEMPTS;
9294
const initialBackoffMs = options?.initialBackoffMs ?? DEFAULT_INITIAL_BACKOFF_MS;
9395
const maxBackoffMs = options?.maxBackoffMs ?? DEFAULT_MAX_BACKOFF_MS;
9496
const backoffMultiplier = options?.backoffMultiplier ?? DEFAULT_BACKOFF_MULTIPLIER;

0 commit comments

Comments
 (0)