You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/04/02 23:24:22 UTC
[GitHub] [airflow] cBournhonesque opened a new pull request #8081:
[AIRFLOW-5500] Fix the trigger_dag api in the case of nested subdags
cBournhonesque opened a new pull request #8081: [AIRFLOW-5500] Fix the trigger_dag api in the case of nested subdags
URL: https://github.com/apache/airflow/pull/8081
Like the jira issue states (https://issues.apache.org/jira/browse/AIRFLOW-5500), the experimental api is broken when one tries to trigger a dag that contains nested subdags.
The reason for this is that calling `dag.subdags` returns a list of ALL the subdags for the dag (even the nested ones), instead of the direct child subdags.
My fix directly changes the trigger_dag.py, but a better solution is probably to make `dag.subdags` return only the child subdags. I didn't know if the current behaviour was chosen for a specific reason so I decided to just change the experimental api.
---
Make sure to mark the boxes below before creating PR: [x]
- [X] Description above provides context of the change
- [X] Unit tests coverage for changes (not needed for documentation changes)
- [X] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
- [X] Relevant documentation is updated including usage instructions.
- [X] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
---
In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] boring-cyborg[bot] commented on issue #8081:
[AIRFLOW-5500] Fix the trigger_dag api in the case of nested subdags
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #8081: [AIRFLOW-5500] Fix the trigger_dag api in the case of nested subdags
URL: https://github.com/apache/airflow/pull/8081#issuecomment-608143366
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
Here are some useful points:
- Pay attention to the quality of your code (flake8, pylint and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/master/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks) will help you with that.
- In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/master/docs/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/master/BREEZE.rst) for testing locally, itโs a heavy docker but it ships with a working Airflow and a lot of integrations.
- Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
- Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#coding-style-and-best-practices).
Apache Airflow is a community-driven project and together we are making it better ๐.
In case of doubts contact the developers at:
Mailing List: dev@airflow.apache.org
Slack: https://apache-airflow-slack.herokuapp.com/
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] Devarajegowda commented on issue #8081: [AIRFLOW-5500]
Fix the trigger_dag api in the case of nested subdags
Posted by GitBox <gi...@apache.org>.
Devarajegowda commented on issue #8081: [AIRFLOW-5500] Fix the trigger_dag api in the case of nested subdags
URL: https://github.com/apache/airflow/pull/8081#issuecomment-608991196
@cBournhonesque Wanted to understand why all nested subdags are stored in dag.subdags level,
Ex: dag1-> subdag_dag1 -> subdag_subdag_dag1
dag.subdags contain both subdag_dag1 , subdag_subdag_dag1, I was wondering if it make sense to store 1st level of subdags inside dag.subdags.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] cBournhonesque commented on issue #8081: [AIRFLOW-5500]
Fix the trigger_dag api in the case of nested subdags
Posted by GitBox <gi...@apache.org>.
cBournhonesque commented on issue #8081: [AIRFLOW-5500] Fix the trigger_dag api in the case of nested subdags
URL: https://github.com/apache/airflow/pull/8081#issuecomment-611039617
@Devarajegowda I think it would make sense to only have dags.subdags have the 1st level of subdags; but I thought that maybe this choice was made for a specific reason?
Personally, on the airflow instance I am using, I modified the dags.subdags code to only return the 1st level subdags, and everything seems to be working, so it might make more sense to just modify the code there?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] Devarajegowda commented on issue #8081: [AIRFLOW-5500]
Fix the trigger_dag api in the case of nested subdags
Posted by GitBox <gi...@apache.org>.
Devarajegowda commented on issue #8081: [AIRFLOW-5500] Fix the trigger_dag api in the case of nested subdags
URL: https://github.com/apache/airflow/pull/8081#issuecomment-611300065
> @Devarajegowda I think it would make sense to only have dags.subdags have the 1st level of subdags; but I thought that maybe this choice was made for a specific reason?
> Personally, on the airflow instance I am using, I modified the dags.subdags code to only return the 1st level subdags, and everything seems to be working, so it might make more sense to just modify the code there?
Yes even I believe so, if we make those changes change in this commit may not be needed at all.
Appreciate if others can give us some more idea on why all nested subdags are stored under dag.subdags.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services