Skip to content
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

Adds Docs to compare SubDAGs and TaskGroups #12741

Closed
wants to merge 1 commit into from

Conversation

VeenaArv
Copy link

@VeenaArv VeenaArv commented Dec 1, 2020

closes: 12298
link: #12298

Adds a section under TaskGroup to compare it to SubDAGs.

@boring-cyborg
Copy link

boring-cyborg bot commented Dec 1, 2020

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 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 Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment 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.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    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://s.apache.org/airflow-slack

than the other. The SubDagOperator launches a DAG as a separate entity from the original graph. This design pattern
offers flexibility to create SubDAGs with different schedulers and executors at the cost of greater complexity and
maintenance burden. TaskGroups creates a UI grouping concept on the same original DAG which simplifies logic and
maintenance for less flexibility.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How users can schedule SubDAGs using different scheduler or executor?

@github-actions
Copy link

github-actions bot commented Dec 1, 2020

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.

@VeenaArv VeenaArv marked this pull request as draft December 1, 2020 21:22
@ryw
Copy link
Member

ryw commented Dec 2, 2020

I'd recommend stronger language against subdags. I know @mistercrunch has an opinion on this that we could add.

@potiuk potiuk added this to the Airflow 2.0.0rc1 milestone Dec 7, 2020
@potiuk
Copy link
Member

potiuk commented Dec 7, 2020

Should we complete the review before 2.0.0rc1 tomorrow? @ryw @VeenaArv @turbaszek -> this one needs some love I think.

@ashb ashb modified the milestones: Airflow 2.0.0rc1, Airflow 2.0 Dec 9, 2020
+----------------------+----------------------+
| Honors all pool | Does not honor pool |
| configurations | configurations |
+----------------------+----------------------+
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very helpful, but one thing still not clear to me from these docs: Since SubDAGs can have different schedules, how does a SubDAG's execution trigger or block executions of tasks further down in the parent DAG?

For example, if a SubDAG is scheduled to execute every 1 hour, and the parent DAG is scheduled every 20 minutes, will the SubDAG be executed every 20 minutes?

Or if the schedules were reversed (SubDAG every 20 minutes and parent DAG every hour), how do the SubDAG's multiple executions in that hour factor into the parent DAG's eventual execution?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two parts here:

  • Parent DAG "SubDAG task" — This is the link between the two: the parent and the SubDAG. It is runs a "Sensor" underneath. I think you can even specify the poking interval.
  • SubDAG "DAG" — Can be added to the global scope to make it available in the main screen, have different schedule intervals... just like a regular DAG. Only limitation is the name (AFAIK).

SubDAG could easily be renamed as ExternalDagSensor

@github-actions
Copy link

github-actions bot commented Mar 9, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Mar 9, 2021
@github-actions github-actions bot closed this Mar 14, 2021
@jhtimmins
Copy link
Contributor

Hi @VeenaArv, are you still interested in getting this merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:documentation stale Stale PRs per the .github/workflows/stale.yml policy file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants