-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Durable functions reduce ISO8061's precession if milli second have zero as digit values #264
Comments
Thanks for reaching out! I see that you're using extension bundles in the V1 range. Are you able to reproduce this behavior in the V2 range? That is, in range: |
@davidmrdavid ok sure will check that and let you know. Can you pls confirm changing bundle version to v2 does it affect our other trigger binding like blob trigger |
@davidmrdavid I have experimented with just changing the version in host.json I still can see the date issue FYI one thing i noticed is, I can have proper date till orchestrator but in v1 thats not the case PFA: |
Thanks for your quick responses! With respect to installing the V2 version of the bundles, changing the Just for clarity, am I right in understanding that, after changing your extension bundles version to be in the V2 range, you no longer see a loss of precision for this date-formatted-string input in the orchestrator? Now, you're only seeing precision loss in the activities, correct? Thanks! |
Additionally, what version of the |
@davidmrdavid yes I observed that behaviour only on activity with v2 bundle (so fyi i just attached the screen shot) |
^1.4.6 durable function npm package version is the one i am using. I share my sample code already. And if you don't mind to share your sample code, i shall try it in my local or dev server and revert back with my result in this issue thread |
Of course. I'm attaching a I'm also attaching a picture of the output I'm seeing, note how the three 0's at the end are preserved in the logged/printed statements: Please let me know if there's something off about my reproducer! Thank you :) |
In orcha |
Thanks @MuhamedSalihSeyedIbrahim, I'm able to reproduce this issue now! I'll file this as a bug and start an investigation in a few days. Thank you! I'll keep you updated with our progress. Until then, let me know if this workaround works for you in the meantime! Thanks again :) |
We already adding 1 milli second to avoid this issue For now its fine! But awaiting for your response |
Description
Azure Durable function reduce precession of ISO 8061 date string format.
when ever the ISO date string passed to activity function its converted from higher precession to lower precession
YYYY-MM-DDTHH:MM:SS.SSSZ (actual format ) converted to YYYY-MM-DDTHH:MM:SSZ (lower precession format ) in case millisecond are present as zeros.
Eg:
Expected behavior
Actual behavior
Relevant source code snippets
client function:
const df = require("durable-functions");
async function DHT(context, req) {
const client = df.getClient(context);
const instanceId = await client.startNew(req.params.functionName, undefined, {
date: "2021-06-21T00:00:00.000Z",
});
context.log(
Started orchestration with ID = '${instanceId}'.
);return client.createCheckStatusResponse(context.bindingData.req, instanceId);
}
module.exports = DHT;
orchestrator:
const df = require("durable-functions");
const DO = df.orchestrator(function* (context) {
const outputs = [];
const { date } = context.df.getInput();
console.log(date);
// Replace "Hello" with the name of your Durable Activity Function.
outputs.push(yield context.df.callActivity("DA", date));
outputs.push(yield context.df.callActivity("DA", date));
outputs.push(yield context.df.callActivity("DA", date));
// returns ["DA Tokyo!", "Hello Seattle!", "Hello London!"]
return outputs;
});
module.exports = DO;
Activity:
async function DA(context) {
console.log(
Hello ${context.bindings.name}!
);return
Hello ${context.bindings.name}!
;}
Known workarounds
App Details
Screenshots
If deployed to Azure
The text was updated successfully, but these errors were encountered: