Comments (1)
I've encountered this as well but I've discovered more information when testing with the basic "Hello" activity template. Instead of yielding to an array, I changed it to yield to it's own variable.
const activityName = "DurableFunctionsHelloActivity";
const orchestratorName = "DurableFunctionsOrchestrator";
export const durableFunctionsOrchestrator: OrchestrationHandler = function* (context: OrchestrationContext) {
logIfNotReplaying(context, `Received request to orchestrator ${orchestratorName}`);
const output1 = yield context.df.callActivity(activityName, "Tokyo"); // line 7
const output2 = yield context.df.callActivity(activityName, "Seattle"); // line 8
const output3 = yield context.df.callActivity(activityName, "Cairo"); // line 9
logIfNotReplaying(context, `Processed orchestrator with outputs ${output1} ${output2} ${output3}`);
return [output1, output2, output3];
};
const logIfNotReplaying = (context: OrchestrationContext, message: string): void => {
const isReplayString = context.triggerMetadata.isReplaying as string;
if (isReplayString == 'False') {
context.log(message);
}
};
df.app.orchestration(orchestratorName, durableFunctionsOrchestrator);
context.triggerMetadata.isReplaying is 'False' until after the first callActivity and then for the rest of the orchestrator's life (line 8 and on) it is set to 'True' regardless of whether it has handled the next activity yet or not. So this is not a reliable replacement.
context.df.isReplaying is undefined until after a callActivity processes. So put a break point on line 8. First time that break point is hit, it changes to false. After the 2nd time it hits the break point (meaning 2nd callActivity processed and intends to go to the 3rd callActivity) then it changes to true but only during the breakpoint on line 8. A second break point on line 9 would show the value immediately go back to false.
So there's definitely a bug to this context.df.isReplaying value. I've confirmed this with durable-functions version 3.0.0 and latest.
from azure-functions-durable-js.
Related Issues (20)
- Intermittent Error Running Suborchestrator
- weak typing for yield results on `callActivity` HOT 1
- ❓Survey: Your experience with Durable Functions
- [Please ignore] Testing GH triage automation HOT 1
- Failed: node exited with code 1 HOT 2
- Long running Functions hangs and then timeout HOT 6
- Function hangs and doesn't even timeout unless terminated HOT 2
- This repo is missing important files HOT 1
- Durable entity creation? (and lifecycle management) HOT 3
- waitForExternalEvent not completing in reasonable time when event arrives early
- Update axios package version HOT 10
- Receiving error "Cannot read properties of undefined" at method getClient HOT 7
- Orchestrations are failing to find the orchestration but its listed in the known orchestrators HOT 1
- Update axios dependency in both v2 and v3 HOT 2
- Hello world works locally but fails when deployed to Azure HOT 1
- `callHttp` long polling returning error: `Reason: Message: Converting circular structure to JSON`
- `context.df.Task.any` launches tasks even if the task was already launched and sometimes return result from a different `Task` HOT 6
- context.df.Task.any with createTimer and waitForExternalEvent leaves orchestrator in invalid state
- Known regression: Activity input fails to deserialize when the input is an array HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-functions-durable-js.