github-actions[bot] opened a new pull request, #77688: URL: https://github.com/apache/airflow/pull/77688
* Accept a single string for Dag tags and allowed_run_types Passing a bare string such as tags="finance" silently produced one tag per character, because the converter iterated over the string. The same happened for @asset(tags=...), which forwards its tags to the Dag. A bare string for allowed_run_types failed with a confusing "'m' is not a valid DagRunType" error even though a single DagRunType member was already accepted. Treat a bare string as a single value, consistent with how other Dag arguments such as template_searchpath already handle it. * Widen allowed_run_types annotations to accept strings DagRunType is not exported from airflow.sdk, so Dag authors pass plain strings. The converter and the dag() overload now accept str and collections of str, so mypy no longer rejects allowed_run_types="manual". * Treat an empty allowed_run_types like None and document string inputs An empty string used to iterate to an empty frozenset, which the validator and serializer already treat as no restriction. Wrapping a bare string turned it into [""] and raised ValueError, so the converter now returns None for any falsy value, the same way _convert_tags handles tags="". (cherry picked from commit fd22958936c5ad8ada6de6fe8ae16ed19d649c5e) Co-authored-by: W. H. Wang <[email protected]> -- 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]
