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

Remove check for tuple in test_security #21228

Merged
merged 1 commit into from
Jan 30, 2022

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Jan 30, 2022

SQLAlchemy 1.4 does not produce iterator of "real" Tuples,
it returns iterator of Rows. Rows are not Tuples so instance
check will fail for them, however for all practical purpose
they behave as Tuples (even comparing them with Tuples of the
same content produce an equality). They also behave like dict,
but this is a different story.

The test started to fail in SQLAlchemy 1.4 because it contained
assert for the returned set entry to be Tuple, but it also contained
the actual check for length and whether the expected Tuple is in
the set, so assert for instance is pretty redundant.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.

SQLAlchemy 1.4 does not produce iterator of "real" Tuples,
it returns iterator of Rows. Rows are not Tuples so instance
check will fail for them, however for all practical purpose
they behave as Tuples (even comparing them with Tuples of the
same content produce an equality). They also behave like dict,
but this is a different story.

The test started to fail in SQLAlchemy 1.4 because it contained
assert for the returned set entry to be Tuple, but it also contained
the actual check for length and whether the expected Tuple is in
the set, so assert for instance is pretty redundant.
@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Jan 30, 2022
@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 Jan 30, 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.

@potiuk potiuk merged commit 60a2bdd into apache:main Jan 30, 2022
@potiuk potiuk deleted the fix-tuple-problem-with-sqlalchemy branch January 30, 2022 20:10
potiuk added a commit to potiuk/airflow that referenced this pull request Jan 31, 2022
The recent release of FAB 3.4.4 has unblocked us from upgrading
SQLAlchemy to 1.4.* version. We wanted to do it for quite some
time however upgrading to 1.4.* of sqlalchemy and allowing our
users to use it for 2.2.4 is a bit risky.

We are fixing resulting "aftermath" in the main branch and as
of this commit there are two fixes merged and remaining MsSQL
problem. The MSSql problem does not affect 2.2.4 as MsSQL will
be available only starting from 2.3.0, however the two other
problems have shown that SQLAlchemy has a potential to break
things and we might want to test it more thoroughly before
releasing 2.3.0.

The problems in question are apache#21205 and apache#21228. Both were only
test problems but the indicate that there might be more hidden
issues involved.

In order to limit risks, this PR proposes to limit SQLAlchemy
for 2.2.* to < 1.4.0. This will allow to upgrade FAB and
related dependencies without opening up Airflow to upgrade to
SQLAlchemy 1.4 (yet).
potiuk added a commit that referenced this pull request Jan 31, 2022
The recent release of FAB 3.4.4 has unblocked us from upgrading
SQLAlchemy to 1.4.* version. We wanted to do it for quite some
time however upgrading to 1.4.* of sqlalchemy and allowing our
users to use it for 2.2.4 is a bit risky.

We are fixing resulting "aftermath" in the main branch and as
of this commit there are two fixes merged and remaining MsSQL
problem. The MSSql problem does not affect 2.2.4 as MsSQL will
be available only starting from 2.3.0, however the two other
problems have shown that SQLAlchemy has a potential to break
things and we might want to test it more thoroughly before
releasing 2.3.0.

The problems in question are #21205 and #21228. Both were only
test problems but the indicate that there might be more hidden
issues involved.

In order to limit risks, this PR proposes to limit SQLAlchemy
for 2.2.* to < 1.4.0. This will allow to upgrade FAB and
related dependencies without opening up Airflow to upgrade to
SQLAlchemy 1.4 (yet).
jedcunningham pushed a commit that referenced this pull request Feb 10, 2022
The recent release of FAB 3.4.4 has unblocked us from upgrading
SQLAlchemy to 1.4.* version. We wanted to do it for quite some
time however upgrading to 1.4.* of sqlalchemy and allowing our
users to use it for 2.2.4 is a bit risky.

We are fixing resulting "aftermath" in the main branch and as
of this commit there are two fixes merged and remaining MsSQL
problem. The MSSql problem does not affect 2.2.4 as MsSQL will
be available only starting from 2.3.0, however the two other
problems have shown that SQLAlchemy has a potential to break
things and we might want to test it more thoroughly before
releasing 2.3.0.

The problems in question are #21205 and #21228. Both were only
test problems but the indicate that there might be more hidden
issues involved.

In order to limit risks, this PR proposes to limit SQLAlchemy
for 2.2.* to < 1.4.0. This will allow to upgrade FAB and
related dependencies without opening up Airflow to upgrade to
SQLAlchemy 1.4 (yet).
jedcunningham pushed a commit that referenced this pull request Feb 17, 2022
The recent release of FAB 3.4.4 has unblocked us from upgrading
SQLAlchemy to 1.4.* version. We wanted to do it for quite some
time however upgrading to 1.4.* of sqlalchemy and allowing our
users to use it for 2.2.4 is a bit risky.

We are fixing resulting "aftermath" in the main branch and as
of this commit there are two fixes merged and remaining MsSQL
problem. The MSSql problem does not affect 2.2.4 as MsSQL will
be available only starting from 2.3.0, however the two other
problems have shown that SQLAlchemy has a potential to break
things and we might want to test it more thoroughly before
releasing 2.3.0.

The problems in question are #21205 and #21228. Both were only
test problems but the indicate that there might be more hidden
issues involved.

In order to limit risks, this PR proposes to limit SQLAlchemy
for 2.2.* to < 1.4.0. This will allow to upgrade FAB and
related dependencies without opening up Airflow to upgrade to
SQLAlchemy 1.4 (yet).
@potiuk potiuk restored the fix-tuple-problem-with-sqlalchemy branch April 26, 2022 20:48
@potiuk potiuk deleted the fix-tuple-problem-with-sqlalchemy branch July 29, 2022 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:webserver Webserver related Issues okay to merge It's ok to merge this PR as it does not require more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants