Hi! Any clue why the flow parameters won’t update ...
# ask-community
e
Hi! Any clue why the flow parameters won’t update on the scheduled runs after applying it on the main flow? I tried turning the Schedule off and on again, to create new runs and yet the parameters don’t change.
a
Can you share how did you set the Parameters originally in your flow? If this is not working as intended in the UI, I can open an issue to investigate - can you share the output of “prefect diagnostics” and a minimal reproducible example so that I can create a Github issue for you? It could be something specific to lists. As a workaround, you can check if setting this in your Flow code and reregistering your flow fixes the issue.
e
@Anna Geller hey, this is how they are set in the code (not by me, I just recently received this as the dev who created it left the company) So I might be doing something wrong as well, not much experience with prefect (or python)..
a
Thanks! I wanted to mostly check if the parameter defaults are set on Parameter task or on the clock. I will try to reproduce and get back to you. Meanwhile, we published this article just yesterday, it discusses parameters in detail: https://www.prefect.io/blog/how-to-make-your-data-pipelines-more-dynamic-using-parameters-in-prefect
Can you run “prefect diagnostics” in your terminal and share the output? this way I can reproduce in the same environment
e
Can this be done through the cloud? Haven’t setup local environment yet
Copy code
{
  "config_overrides": {},
  "env_vars": [],
  "system_information": {
    "platform": "macOS-12.1-x86_64-i386-64bit",
    "prefect_backend": "cloud",
    "prefect_version": "0.15.12",
    "python_version": "3.9.9"
  }
}
🙌 1
a
no worries, then I’ll reproduce in latest.
Copy code
from prefect import task, Flow, Parameter


@task(log_stdout=True)
def print_args(x):
    print(x)


with Flow("param_list") as flow:
    param = Parameter("udm_versions", default=["1.9.3", "1.11.4"])
    print_args(param)


if __name__ == "__main__":
    flow.run()
This seems to work fine - the parameters have been replaced by those set in the UI.
Can you try toggling the schedule off and then on again?
1
e
On this example, can you try to change the parameters again from the UI? Does it apply them? 👀
a
I did - the flow had 1.11.4 and UI had 1.11.0 and it took the one from the UI
e
Can you try toggling the schedule off and then on again?
Same issue, didn’t work
Can we get on a quick call? I can share my screen, probably doing something wrong
a
then I would reregister the flow - given you said it was created some time ago by a different employee, it may be good to reregister
for posterity: resolved by setting parameters on the schedule:
🙌 1
e
Thanks a lot @Anna Geller! 🙇
👍 1