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

Clean up operator failing #1359

Closed
sunank200 opened this issue Dec 5, 2022 · 1 comment · Fixed by #1385
Closed

Clean up operator failing #1359

sunank200 opened this issue Dec 5, 2022 · 1 comment · Fixed by #1385
Assignees
Milestone

Comments

@sunank200
Copy link
Contributor

Describe the bug
When I'm running this dag getting below error -
string" File "/usr/local/lib/python3.9/site-packages/astro/sql/operators/cleanup.py", line 235, in resolve_tables_from_tasks"
38:string" for t in task.output.resolve(context):"
39:string"AttributeError: 'MappedOperator' object has no attribute 'output'"
Is this expected ?

Raised by @jyotsa09

@sunank200 sunank200 self-assigned this Dec 5, 2022
@phanikumv phanikumv added this to the 1.3.1 milestone Dec 5, 2022
@feluelle
Copy link
Member

feluelle commented Dec 6, 2022

The output was implemented in 2.4.0 according to the release notes (see here)

Add output property to MappedOperator (#25604)

A possible fix would be to use XComArg(...) instead.

sunank200 added a commit that referenced this issue Dec 12, 2022
# Description
## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
The output was implemented in 2.4.0 according to the release notes (see
[here](https://airflow.apache.org/docs/apache-airflow/stable/release_notes.html#id13))

Add output property to MappedOperator
apache/airflow#25604

<!--
Issues are required for both bug fixes and features.
Reference it using one of the following:

closes: #ISSUE
related: #ISSUE
-->
closes: #1359 


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Catch exception for airflow version < 2.4.0 and use `XComArg(...)`
instead.


## Does this introduce a breaking change?
No

### Checklist
- [x] Created tests which fail without the change (if possible)
- [x] Extended the README / documentation, if necessary

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
kaxil pushed a commit that referenced this issue Dec 13, 2022
# Description
## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
The output was implemented in 2.4.0 according to the release notes (see
[here](https://airflow.apache.org/docs/apache-airflow/stable/release_notes.html#id13))

Add output property to MappedOperator
apache/airflow#25604

<!--
Issues are required for both bug fixes and features.
Reference it using one of the following:

closes: #ISSUE
related: #ISSUE
-->
closes: #1359

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Catch exception for airflow version < 2.4.0 and use `XComArg(...)`
instead.

## Does this introduce a breaking change?
No

### Checklist
- [x] Created tests which fail without the change (if possible)
- [x] Extended the README / documentation, if necessary

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(cherry picked from commit 0f5ff62)
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 a pull request may close this issue.

3 participants