Include flow Parameters in flow run parameters
Description
If I query for a flow run and want to see its parameters, flow_run.parameters includes flow group default parameters and parameters set at run time but does not include flow parameters. This can be confusing for users who want to see all parameters that affect their flow run.
See UI#397 for a description of how this was affecting users in the UI.
Expected Behavior
UI#401 should resolve this issue in the UI but I think it would be better if we can update server to include flow parameters as part of a flow run's parameters - for example for users who use the API to check their flow run's parameters and want to see all the relevant parameters.
Reproduction
Simple flow with parameters like this:
from prefect import Flow, Parameter, task
import time
@task()
def sleep(x):
time.sleep(x)
with Flow(name='simple-sleep') as flow:
c = Parameter('c', default = 7)
sleep(c)
flow.register('project')
Run the flow (create_flow_run) setting no parameters. Then query for that flow run and its parameters. The parameter will not show. If you set the parameter at flow run time or as part of the flow's flow group default parameters (in the UI or using the set_flow_group_default_parameters mutation) it will be shown.