Dileep Damodaran01/25/2023, 3:38 AM
flow and set the reference tasks parameters based on that.
From the above code snippet, I’m expecting a parameter
with Flow( "Master", schedule=schedule, run_config=master_run_config, terminal_state_handler=_utils.final_state_handler, ) as flow: logger = prefect.utilities.logging.get_logger("master") bot_ids = Parameter("Bot Ids", required=False, default="") bots = bot_ids.run() if bot_ids else "" bots = [x for x in bots.split(",") if x] bots = [x.strip() for x in bots] all_b = ['A','B','C','D'] unknown_bots = [b for b in bots if b and b not in all_b] if len(unknown_bots) > 0: #TODO raise exception #TODO set reference tasks
and checking if the supplied
are valid or not. Here I’m facing two issues: •
parameter is not available in the prefect UI. I tried passing
to one of the reference tasks (Though I’m not using the parameter inside the task), and the parameter started appearing in the prefect Run Flow UI. is there any way to make the parameter input available in prefect Ui without having to pass the parameter to any of the reference tasks • I tried passing values for
from the prefect UI and noticed that it was not getting captured in the
flow. I was always getting
as empty • I tried changing the default value of the parameter , and noticed that the flow was working as expected.
Why is that the default value works in this case, but not the supplied values?
bot_ids = Parameter("Bot Ids", required=False, default="steps")
Chris White01/25/2023, 4:03 PM