-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Reinstate region to default_args for Alibaba example DAGs
#20423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reinstate region to default_args for Alibaba example DAGs
#20423
Conversation
|
Should we make region Optional and raise Runtime Error instead as I did in #20422 ? |
|
Ah nice. Using stub files seems to be a better solution. I will use that in #20422 too |
|
Hmm. It seems that the Mypy checks in CI and running |
Not for me #20422 It worked just fine in It could be about .pyc files probably ? (wild guess) Did you actually use breeze or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah noe
| region: str = ..., | |
| region: Optional[str] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh OK. Let me try this!
One more comment - what worked for me, I set the fields to be "Optional[str] = None" in stubs. That was what worked perfectly for me. |
|
The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease. |
2dcbb08 to
cf8da8c
Compare
|
There was a typo in an import within the stub file which was causing the stub to not be recognized. @potiuk can you review again when you get a chance please? |
Related: #19891
In a previous PR to fix Mypy errors, the
regionarg was removed fromdefault_argsin the Alibaba example DAGs. While this did alleviate Mypy errors it removed a valid DAG-authoring feature that was being showcased. This PR returns theregionarg todefault_argsas well as handling Mypy errors.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.