Is there a known issue regarding the Run tab (Pref...
# prefect-ui
j
Is there a known issue regarding the Run tab (Prefect Cloud V1) when there are Date parameters? I can't get the Run tab to load, it just stalls and eventually "this page is slowing down Firefox" appears. The screenshot is for a flow that is literally just one Parameter.
Copy code
with Flow("Test_Flow", storage=Module("test_flow")) as flow:
    flow.add_task(
        Parameter(name="test_date", default=pendulum.datetime(1900, 1, 1).isoformat())
    )
k
I think it’s not even the date Parameter. It’s more like there are slowness issues on firefox in general
j
I'm unable to load the Run tab in Microsoft Edge as well, same results. I'm going to try Chrome in a moment
Same issue in Chrome
I can't open the Default Parameters in the Settings either
Same issue happens, freezes up
And can't seem to make a Schedule either, I'm guessing because that loads the Parameters
k
I think it can happen if the default parameter is not JSONSerializeable so it can’t pass through the API calls. I guess i’m not sure if pendulum datetimes are
It should be a string though from isoformat
j
Pendulum DateTime objects aren't, which is why I have it using the isoformat method
Right, exactly
For reference, here is one of the Parameters from GraphQL
Copy code
{
            "name": "end_date",
            "slug": "end_date",
            "tags": [
              "end_date",
              "parameter"
            ],
            "type": "prefect.core.parameter.Parameter",
            "default": "2099-12-31T00:00:00+00:00",
            "outputs": "typing.Any",
            "required": false,
            "__version__": "1.2.2"
          },
If you use the to_datetime_string method of Pendulum it works, so I will switch to using that. This should probably be opened as a bug though
k
I could not replicate with this:
Copy code
from prefect import Flow, task, Parameter
import pendulum

with Flow("Test_Flow") as flow:
    Parameter(name="test_date", default=pendulum.datetime(1900, 1, 1).isoformat())()

flow.register("databricks2")
j
one moment, seeing if that same code replicates it when I run it
k
Both quick and and run now worked
j
Well this is weird, your code exactly (except a different project name) causes the issue for me
let me try it with a different flow name so it doesn't have any old versions
same issue
Here are my diagnostics, maybe it's a version issue?
Copy code
{
  "config_overrides": {
    "cloud": {
      "heartbeat_mode": true
    },
    "engine": {
      "executor": {
        "default_class": true
      }
    },
    "logging": {
      "extra_loggers": true
    }
  },
  "env_vars": [
    "PREFECT__ENGINE__EXECUTOR__DEFAULT_CLASS",
    "PREFECT__FLOWS__CHECKPOINTING",
    "PREFECT__LOGGING__EXTRA_LOGGERS",
    "PREFECT__USER_CONFIG_PATH"
  ],
  "system_information": {
    "platform": "Windows-10-10.0.19044-SP0",
    "prefect_backend": "cloud",
    "prefect_version": "1.2.2",
    "python_version": "3.9.5"
  }
}
k
Thank you!
I really dont know what to make of it though unfortunately 😅. I would personally wonder if you can even run anything out of that project
j
Weirdly enough, yeah, a quick run works fine
🤦‍♂️ 1
It starts at least - it's not a deployed module so i can't actually test to see how it runs, but the Flow Run is created
When using the 'to_datetime_string' method, the parameter is registered as a String instead of a Date, so I think that is why it doesn't have the issue.
Oh hey, I think I found a different way to replicate. I just tried changing the default Parameter (currently a String with value '1900-01-01 000000') to a Date for 12/31/2099 at midnight. The UI froze as I selected 12/31
ooookay, I think I'm getting somewhere. It stalls when the dates are extremely far away from the current date. If I register the same way but set the defaults to today I get no issues. Is it possible that somewhere in the logic of reading the parameters there is a loop or something that is running for every single day between the default value and the current date?
Yep, it takes longer and longer the more years I put between today and the default value I'm selecting. Crazy
k
I tried
"test_date": "2049-12-31T16:00:00-08:00"
but i still couldn’t replicate
j
Have you tried setting the Date parameter on the Default Parameters page in the UI?
For me when I choose a date a few years in the future I get a lag of about 10 - 20 seconds. 10 years in the future is like 40 seconds. 2099 is a few minutes
Also, when I choose December 31st 2099 it keeps going to March 8th 2099
When I choose December 31st 1999 (earliest I can choose in the UI) it selects October 31st instead.
k
I actually can’t even go that far in the date picker. i just have type the string
j
You can type in the field when the Type is set to Date?
k
Ah no. But I couldn’t figure out how you get that far in the dates! haha. Do you just click?
j
Oh, gotcha. You gotta click on the year, which then gives you a list of years. You click on the year you want, and you go back to the regualr calendar view
k
Man I went that far and it still ran fine
j
That is bizarre
k
Yes using the datepicker to select all the way haha
j
Well I am flummoxed. I'm just going to leave it alone and pretend I never went down this rabbit hole
k
I appreciate it though!
j
Yeah, thanks for taking the time to try and replicate the issue. Even if it is apparently impossible to replicate