Open sebastianneubauer opened 11 months ago
Thanks for informing will check update this.plz share the func app name also
app name is "UpdateChart", but I don't think that is relevant, you should be reproducible rather easy, just check any ISO timestamp in the results of an cosmosdb input binding. BTW: I just saw, the same is happening in the logs in the portal as well, so putting this into any function:
logging.info("2023-10-10T20:40:16.000Z")
results in this output in the azure function monitoring log:
"2023-10-15T20:10:01Z"
Investigative information
Repro steps
In a python azure function I have this comos db input binding
Expected behavior
This worked in V1 of the azure functions just fine
Actual behavior
In V2 of azure functions with this hosts.json
it breaks for some data with the following exception:
And indeed, after some debugging, I confirmed, that the timestamps in 'published_at' are malformed. Example:
"2023-10-10T20:40:16Z"
is wrong, when looking at the cosmos db data, there the timestamp string is:"2023-10-10T20:40:16.000Z"
. Note the missing trailing ".000" before the Z. I also confirmed, that all trailing 0 before the Z are stripped.I could not find a way my code could introduce this bug. It most likely is introduced in the binding.
Summary:
"2023-10-10T20:40:16Z"
in 'published_at' handed into my azure function is wrong and should be"2023-10-10T20:40:16.000Z"
Known workarounds
I could to some evil string magic (fill up missing 0 before the Z), but I would rather not do it.