Sebastian
09/19/2022, 7:10 AMwf
and launch plan like
launch_plan.LaunchPlan.get_or_create(
workflow=wf,
name="my_lp",
schedule=CronSchedule("0 0 ? * * *"),
default_inputs={...},
fixed_inputs={...},
)
how do I schedule this after registering it alongside my workflows with pyflyte serialize
and flytectl register
? I think the relevant docs are supposed to be https://docs.flyte.org/projects/flytectl/en/latest/gen/flytectl_update_launchplan.html but running the specified commands fails with launch plan prod failed to update due to rpc error: code = NotFound desc
. This command requires a version which I have none so it might be because of this. How should I proceed?
Some side note feedback: It feels to me like activating launch plans is more naturally done in the web UI. However, trying to open my launch plan errors with
Error: Minified React error #31; visit <https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Brole_session_name%2C%20region_name%2C%20role_arn%7D&args[]=> for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Which probably comes from me using using struct arguments (role_session_name, region_name, role_arn are in a dataclass) but it nevertheless seems like there is a bug in the launch plan rendering.flytectl get launchplans
that the version is the git sha used to register it. Now sure how that's wired but that works.
However, trying to register errors since no cron format is valid. In https://docs.flyte.org/en/latest/concepts/schedules.html#short-hand-cron-formats-predefined-schedules @midnight
or "0 0 * * *"
are suggested. Both fail during serialize
.
As do ` "0 0 * * * *"
and ` "0 0 ? * * *"
. Is cron scheduling just broken or can it be achieved any other way?CronSchedule(schedule="@midnight")
works (this is in fact in the docs) but CronSchedule(expr)
fails for expr
like all the above listed examplesError: Expression has only 1 part. At least 5 parts are required.
Where the 'schedule' menu used to be. Another react rendering error by the looks of itSamhita Alla
"0 0 * * *"
works for me. I ran the pyflyte run --remote <python-file> <wf-name>
command.Sebastian
09/19/2022, 11:54 AMpyflyte serialize
for CronSchedule("0 0 * * *")
for me.
Flyte console is
UI Version1.1.6
Admin Version0.4.7-223-g0266a06Samhita Alla
pyflyte serialize
isn’t the right command anymore. Can you try running pyflyte --pkgs <parent-package>.<child-package-that-has-the-workflow> package --image <image>
? Where have you come across the pyflyte serialize
command?
You can also try the pyflyte run command I shared with you earlier. It’s far more easy than packaging and registering the workflow separately.Sebastian
09/19/2022, 12:55 PMSamhita Alla
Ketan (kumare3)
Hampus Rosvall
09/19/2022, 1:47 PMPrafulla Mahindrakar
09/19/2022, 1:51 PMHampus Rosvall
09/19/2022, 1:51 PMKetan (kumare3)
Prafulla Mahindrakar
09/19/2022, 1:55 PMKetan (kumare3)
Hampus Rosvall
09/19/2022, 1:57 PMUI Version
1.1.6
Admin Version
1.1.43
Prafulla Mahindrakar
09/19/2022, 3:42 PMSamhita Alla
Prafulla Mahindrakar
09/20/2022, 5:22 AM