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

Fix deferrable RedshiftClusterSensor #45098

Merged

Conversation

ferruzzi
Copy link
Contributor

We recently started running the system tests in deferrable mode and noticed the Redshift one fails in that case with a 'coroutine' object is not subscriptable exception. Moving ["Clusters"] to the following line allows the result to parse into a subscriptable object and the test works now.

TLDR:

this fails:

async with self.async_conn as client:
    response = await client.describe_clusters(ClusterIdentifier=cluster_identifier)["Clusters]
    return response

but this works:

async with self.async_conn as client:
    response = await client.describe_clusters(ClusterIdentifier=cluster_identifier)
    return response["Clusters"]

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

- Previously threw an exception that "'coroutine' object is not subscriptable".  Moving ["Clusters"] to the following line allows the result to parse into a subscriptable object.
@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Dec 19, 2024
@ferruzzi ferruzzi merged commit b6e3d1c into apache:main Dec 19, 2024
66 checks passed
@ferruzzi ferruzzi deleted the ferruzzi/system-tests/fix-redshift-deferrable branch December 19, 2024 23:56
LefterisXefteris pushed a commit to LefterisXefteris/airflow that referenced this pull request Jan 5, 2025
- Previously threw an exception that "'coroutine' object is not subscriptable".  Moving ["Clusters"] to the following line allows the result to parse into a subscriptable object.
agupta01 pushed a commit to agupta01/airflow that referenced this pull request Jan 6, 2025
- Previously threw an exception that "'coroutine' object is not subscriptable".  Moving ["Clusters"] to the following line allows the result to parse into a subscriptable object.
got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
- Previously threw an exception that "'coroutine' object is not subscriptable".  Moving ["Clusters"] to the following line allows the result to parse into a subscriptable object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:amazon AWS/Amazon - related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants