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 is_mapped field to Task response. #23319

Merged
merged 2 commits into from
Apr 28, 2022

Conversation

tirkarthi
Copy link
Contributor

closes: #23284
related: #23284

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Apr 28, 2022
@@ -58,6 +58,7 @@ class TaskSchema(Schema):
sub_dag = fields.Nested(DAGSchema, dump_only=True)
downstream_task_ids = fields.List(fields.String(), dump_only=True)
params = fields.Method('get_params', dump_only=True)
is_mapped = fields.Boolean(dump_only=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding a field to the schema also requires adding it to the API definition in airflow/api_connexion/openapi/v1.yaml (line 2,938 onwards), so that it shows up in the docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I though it was automatically generated. Added now.

Copy link
Contributor

@norm norm left a comment

Choose a reason for hiding this comment

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

Other than the YAML update I mentioned it would be nice if one of the results in TestGetTasks contained a mapped task, just for the sake of completeness.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Apr 28, 2022
@github-actions
Copy link

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.

@bbovenzi bbovenzi merged commit f3d80c2 into apache:main Apr 28, 2022
@ephraimbuddy ephraimbuddy added the type:improvement Changelog: Improvements label May 8, 2022
@ephraimbuddy ephraimbuddy added type:bug-fix Changelog: Bug Fixes and removed type:improvement Changelog: Improvements labels May 27, 2022
@ephraimbuddy ephraimbuddy added this to the Airflow 2.3.2 milestone May 27, 2022
ephraimbuddy pushed a commit that referenced this pull request May 27, 2022
* Add is_mapped field to Task response.

* Add is_mapped to schema file and add test for GetTasks.

(cherry picked from commit f3d80c2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API okay to merge It's ok to merge this PR as it does not require more tests type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get DAG tasks in REST API does not include is_mapped
4 participants