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

Add support for tested task group @glazunov996 #292

Merged
merged 3 commits into from
Nov 20, 2024
Merged

Add support for tested task group @glazunov996 #292

merged 3 commits into from
Nov 20, 2024

Conversation

pankajastro
Copy link
Contributor

@pankajastro pankajastro commented Nov 19, 2024

Resolves Nested Subgroups #119 issue

Original PR: #141

Co-authored-by: Kuris [email protected]

closes: #119

Example YML DAG

default:
  default_args:
    owner: default_owner
    retries: 1
    retry_delay_sec: 300
    start_date: 2024-01-01
  default_view: tree
  max_active_runs: 1
  schedule_interval: 0 1 * * *
example_task_group:
  description: "this dag uses task groups"
  task_groups:
    task_group_1:
      tooltip: "this is a task group"
      dependencies: [task_1]
    task_group_2:
      tooltip: "this is a task group"
      parent_group_name: task_group_1
  tasks:
    task_1:
      operator: airflow.operators.bash_operator.BashOperator
      bash_command: "echo 1"
    task_2:
      operator: airflow.operators.bash_operator.BashOperator
      bash_command: "echo 2"
      task_group_name: task_group_1
    task_4:
      operator: airflow.operators.bash_operator.BashOperator
      bash_command: "echo 4"
      task_group_name: task_group_2

Co-authored-by: glazunov996 <glazunov996>
@codecov-commenter
Copy link

codecov-commenter commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 84.21053% with 6 lines in your changes missing coverage. Please review.

Project coverage is 93.22%. Comparing base (841c5ff) to head (45b114b).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
dagfactory/dagbuilder.py 84.21% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #292      +/-   ##
==========================================
- Coverage   93.95%   93.22%   -0.74%     
==========================================
  Files           8        8              
  Lines         645      664      +19     
==========================================
+ Hits          606      619      +13     
- Misses         39       45       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@pankajastro pankajastro marked this pull request as ready for review November 19, 2024 12:50
@pankajastro pankajastro requested a review from a team as a code owner November 19, 2024 12:50
@pankajastro pankajastro self-assigned this Nov 19, 2024
Copy link
Contributor

@pankajkoti pankajkoti left a comment

Choose a reason for hiding this comment

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

mostly looks good to me, have some comments inline

dagfactory/dagbuilder.py Outdated Show resolved Hide resolved
dagfactory/dagbuilder.py Outdated Show resolved Hide resolved
dagfactory/dagbuilder.py Outdated Show resolved Hide resolved
tests/test_dagbuilder.py Show resolved Hide resolved
dagfactory/dagbuilder.py Outdated Show resolved Hide resolved
dagfactory/dagbuilder.py Outdated Show resolved Hide resolved
dagfactory/dagbuilder.py Show resolved Hide resolved
dagfactory/dagbuilder.py Outdated Show resolved Hide resolved
Copy link
Contributor

@pankajkoti pankajkoti left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for addressing the previous comments so quickly!

@pankajastro pankajastro merged commit 7626fa6 into main Nov 20, 2024
67 checks passed
@pankajastro pankajastro deleted the PR-141 branch November 20, 2024 10:47
@pankajastro pankajastro added this to the DAG Factory 0.21.0 milestone Nov 20, 2024
pankajastro added a commit that referenced this pull request Nov 20, 2024
This PR adds an example for the task group. 
Depend on PR: #292

<img width="1678" alt="Screenshot 2024-11-19 at 6 23 42 PM"
src="https://github.com/user-attachments/assets/7203fc6a-940b-4a99-9fc2-c189b0fb70b6">
@tatiana tatiana mentioned this pull request Dec 6, 2024
tatiana added a commit that referenced this pull request Dec 6, 2024
### Added

- Add support to TaskFlow and improve dynamic task mapping support by
@tatiana in #314
- Render YML DAG config as DAG Docs by @pankajastro #305
- Support building DAGs out of topologically unsorted YAML files by
@tatiana in #307
- Add support for nested task groups by @glazunov996 and @pankajastro in
#292
- Add support for templating `on_failure_callback` by @jroach-astronomer
#252

### Fixed

- Fix compatibility with
apache-airflow-providers-cncf-kubernetes>=10.0.0 by @tatiana in #311
- Refactor telemetry to collect events during DAG run and not during DAG
parsing by @pankajastro #300

### Docs

- Fix reference for HttpSensor in README.md by @pankajastro in #277
- Add example DAG for task group by @pankajastro in #293
- Add CODEOWNERS by @pankajkoti in #270
- Update CODEOWNERS to track all files by @pankajkoti in #276
- Modified Status badge in README by @jaejun #298

### Others

- Refactor dynamic task mapping implementation by @tatiana in #313
- Remove pytest durations from tests by @tatiana in #309
- Remove DAG retries check since many DAGs have different retry values
by @tatiana in #310
- Lint fixes after running `pre-commit run --all-files` by @tatiana in
#312
- Remove redundant exception code by @pankajastro #294
- Add GitHub issue template for bug reports and feature requests by
@pankajkoti in #269

Closes: #223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested Subgroups
3 participants