nolan1999 commented on PR #41513: URL: https://github.com/apache/airflow/pull/41513#issuecomment-2304857683
I was about about to open an issue because i encountered the exact same problem. I think that either supporting `Param` in the `kwargs` or explicitly preventing it would be important, here is what happened to me: - I want to manually trigger an existing DAG from the UI, but notice that the parameters are read as strings instead of python objects (in that case, lists). - I look at the documentation and see that with `Param` i can add JSON schema validation and get the casting to python types from the UI. The documentation only shows examples using `with DAG...`, but the documentation for the `@dag` decorator proposes it as an alternative so i (my mistake) assume feature parity. - I try using `Param` in the `@dag`-decorated function, test on the UI, everything works as expected (including the default). - I merge the changes and the first scheduled run fails. It would be great if this PR could be worked on/merged. The current solution (using `params` instead of `kwargs`) looks like a workaround in my case since the rest of the DAGs in the codebase use the `kwargs` instead of the `params` to define DAG parameters. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
