Hi! I'm trying new dagster release 0.15.1, and I s...
# ask-community
m
Hi! I'm trying new dagster release 0.15.1, and I see that dagit now automatically treats datetime strings in launchpad as
datetime.datetime
. But I don't see any information about that in changelog.
🤖 1
d
Hi Mykola - do you have an example of config that's being parsed differently now?
m
I believe something like this:
Copy code
ops:
  my_op:
    config:
      start: 2022-06-10T00:00:00.000000+00:00
Adding quotes fixes the problem. Bit that's still different from the 0.15.0 behavior.
The message in dagit is something like this (modified to follow my example above):
Copy code
Invalid scalar at path root:ops:my_op:config:start. Value "2022-06-10 00:00:00+00:00" of type "<class 'datetime.datetime'>" is not valid for expected type "String".
d
Got it - the relevant changlog entry is "Fixed an issue where entering a string in the launchpad that is valid YAML but invalid JSON would render incorrectly in Dagit" - but I guess that 'fix' cuts both ways - we're passing the string down directly to the server and PyYAML is behaving slightly differently
m
I like the new behavior. But I'm curious if it's legit to pass datetime as a config parameter with proper type validation. Also it would be great to describe the behavior of passing to PyYAML in documentation.
d
There isn't currently a config type for datetimes, no - this change might pave the way for adding it in the future though
https://github.com/dagster-io/dagster/pull/8621 should bring the way we parse that date-like string back the way it was before, thanks for the report