Good morning :slightly_smiling_face: So I have bee...
# prefect-community
Good morning ­čÖé So I have been working on this really extensive ETL and finally uploaded it to the cloud but there it is failing... I have a parameter like this:
weeks = Parameter("weeks", required=False, default=None)
Afterwards there is a case block where either the last actual weeks is getting pulled or set to the provided Parameter. Locally it's working like a charm but when I want to execute the flow within the cloud, I get an error for the week task:
Copy code
The following error messages were provided by the GraphQL server: INTERNAL_SERVER_ERROR: Variable "$input" got invalid value null at "input.states[0].task_run_id"; Expected non-nullable type UUID! not to be null. The GraphQL query was: mutation($input: set_task_run_states_input!) { set_task_run_states(input: $input) { states { status message id } } } The passed variables were: {"input": {"states": [{"state": {"context": {"tags": []}, "cached_inputs": {}, "message": "Starting task run.", "_result": {"__version__": "0.14.10", "type": "NoResultType"}, "__version__": "0.14.10", "type": "Running"}, "task_run_id": null, "version": null}]}}
Task 'weeks': Finished task run for task with final state: 'ClientFailed' Do you know what might be the problem here? Why is it stated that I got a null value? It should be None.
Ôťů 2
So I guess the null is referring to the task_run_id and not the parameter
Got it, registered flow was out of sync somehow.
nice work, thanks for the update!
One little issue remained, after registration the Prefect scheduler scheduled all the flows for the next weeks (every Sunday night) but those scheduled flows are missing labels and the agent - label problem. I just saw it this morning. Can I assign my agent to the scheduled ones or do I have to register the entire flow?
I think after I manually registered that flow, the labels were missing and I added them manually. This did not work for the scheduled runs though
there are many ways to set labels: 1. Run config 2. Register CLI or flow.register 3. in the UI 4. on a Clock (e.g. on a CronClock) - see code below
Copy code
from prefect.schedules import Schedule
from prefect.schedules.clocks import CronClock

schedule = Schedule(clocks=[CronClock("0 0 * * *", labels=["some-label"])])
how are you currently setting labels?
sharing your Flow configuration incl. schedule and run config would be helpful
Hey Anna ­čÖé thanks for your reply. I think when I registered the flow on Friday, I tried to set the labels but not the project in the CLI which did no work and in the end, I set it manually in the GUI. I was browsing the documentations and think I did it correctly now. I registered it with the CLI but specified the project this time. Now the labels are in place and I don't have a label problem warning anymore.
­čÖî 1
nice work! CLI is the best way to register flows