Hey! I'm trying to set up schedules for my workflo...
# announcements
r
Hey! I'm trying to set up schedules for my workflows (LaunchPlan.get_or_create -> remote.register_launch_plan -> flyte update launchplan --activate in cli). The schedule does show up in Flyte console (eg. as "Every hour"), but the workflow is never executed. In the scheduler pod there's an error message
rpc error: code = InvalidArgument desc = missing key in inputs
. Any ideas what could be wrong? More code in the thread.
Copy code
@workflow
def wf(
    transactions_dump_base_path: str = "s3://...",
    created_date: str = "",
    out_remote_base_path: str = "s3://...",
) -> typing.List[FlyteFile]:
    ...

...

remote = FlyteRemote(config=Config.auto())

# also tried this with fixed_inputs and without any inputs, same error
launch_plan = LaunchPlan.get_or_create(
    name="lp_name",
    workflow=wf,
    schedule=CronSchedule(schedule="@hourly"),
    default_inputs={
        "transactions_dump_base_path": "s3://...",
        "created_date": "",
        "out_remote_base_path": "s3://...",
    },
)

remote.register_launch_plan(
    launch_plan,
    project="flytesnacks",
    domain="development",
    version="BxKlPRTnz1-RaW3r0XHoGQ==",
)

# CLI: flytectl update launchplan -p flytesnacks -d development --version BxKlPRTnz1-RaW3r0XHoGQ== lp_name --activate
Full error msg (the first one only once, the second one a bunch of times)
Copy code
{"json":{"routine":"jobfunc-6675663219511107547"},"level":"error","msg":"unable to fire the schedule {BaseModel:{ID:69 CreatedAt:2022-05-23 16:58:44.966854 +0000 UTC UpdatedAt:2022-05-23 16:58:44.966854 +0000 UTC DeletedAt:\u003cnil\u003e} SchedulableEntityKey:{Project:flytesnacks Domain:development Name:lp_name Version:BxKlPRTnz1-RaW3r0XHoGQ==} CronExpression:@hourly FixedRateValue:0 Unit:MINUTE KickoffTimeInputArg: Active:0xc0007bf2a0} at 2022-05-24 08:00:00 +0000 UTC time due to rpc error: code = InvalidArgument desc = missing key in inputs","ts":"2022-05-24T08:26:50Z"}

{"json":{"routine":"jobfunc-6675663219511107547"},"level":"error","msg":"failed to create execution create request %+v due to %vproject:\"flytesnacks\" domain:\"development\" name:\"f59ebe1b8b5084062000\" spec:\u003claunch_plan:\u003cresource_type:LAUNCH_PLAN project:\"flytesnacks\" domain:\"development\" name:\"ner_data_analysis_schedule_hourly2\" version:\"BxKlPRTnz1-RaW3r0XHoGQ==\" \u003e metadata:\u003cmode:SCHEDULED scheduled_at:\u003cseconds:1653382800 \u003e \u003e \u003e inputs:\u003cliterals:\u003ckey:\"\" value:\u003cscalar:\u003cprimitive:\u003cdatetime:\u003cseconds:1653382800 \u003e \u003e \u003e \u003e \u003e \u003e  rpc error: code = InvalidArgument desc = missing key in inputs","ts":"2022-05-24T09:06:42Z"}
Ah I noticed in another thread someone was using the cron schedule without the kickoff arg and it didn't work either so maybe it's that. The fixed rate schedule works fine.
p
Hi @Robin Kahlow what version of admin are you using . This was already fixed.
r
the helm chart is flyte-core-v1.0.0, so whatever is in that
p
Created an issue for it https://github.com/flyteorg/flyte/issues/2534 . Will update on the issue
👍 1
Found this issue aswell . sending fix in the same fixed rate PR .
🎉 1
The latest tag image (v1.1.13) https://github.com/flyteorg/flyteadmin/pkgs/container/flytescheduler should have both the fixes.
👍 1
r
cool ty, upgraded and seems to work so far!
👍 1
169 Views