Skip to content

Conversation

@frankcash
Copy link
Contributor

@frankcash frankcash commented Feb 14, 2022

Uses built in util to handle import of literal until python 3.8 is phased out.

Changes setup.cfg to install typing-extensions will all versions of python, not just <3.8

closes: #21566


^ 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.

@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Feb 14, 2022
@frankcash frankcash changed the title updates type imports to use typing_compat #21566 FIX: updates type imports to use typing_compat #21566 Feb 14, 2022
@uranusjr
Copy link
Member

Why not just add typing_extension as a dependency?

@frankcash frankcash changed the title FIX: updates type imports to use typing_compat #21566 FIX: extends typing-extensions to be installed with python 3.8+ #21566 Feb 15, 2022
@frankcash frankcash requested a review from potiuk February 15, 2022 13:34
@frankcash frankcash requested review from ashb and potiuk February 15, 2022 14:28
@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Feb 15, 2022
@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@frankcash
Copy link
Contributor Author

Looks like the Github Actions are "failed" because one was cancelled? Error: The operation was canceled.

@potiuk potiuk closed this Feb 15, 2022
@potiuk potiuk reopened this Feb 15, 2022
@potiuk
Copy link
Member

potiuk commented Feb 15, 2022

Closed/reopened to check if this was a flaky fail.

@potiuk
Copy link
Member

potiuk commented Feb 15, 2022

It could be that the typing extension actually causes some too long running constraint generation.

@frankcash
Copy link
Contributor Author

frankcash commented Feb 15, 2022

It could be that the typing extension actually causes some too long running constraint generation.

looks like it timed out again. Let me know how I can help resolve this / if I need to change the code

@frankcash
Copy link
Contributor Author

frankcash commented Feb 16, 2022

@potiuk / @uranusjr I've re-run this a few times but it continues to time out at the Screen Shot 2022-02-16 at 9 32 39 AM step

I am confused on what I need to change / do to get this to resolve -- would someone point me in the right direction?

@potiuk
Copy link
Member

potiuk commented Feb 16, 2022

I am confused on what I need to change / do to get this to resolve -- would someone point me in the right direction?

Yeah. I was afraid it is not "accident". I will have to take a look at that more closely, but I think the problem is that it creates unsolvable conflict with one of the relased providers (we prepare few variants of the constraints and apparently this one gets triggered.

What happens under the hood pip gets into backtracking and tries to find a solution to impossible conflict resolution and it takes awfully lot of time to resolve it. I am afraid this one will need to wait until we take a bit closer look what's going on in detail. I should find time for it this week.

@frankcash
Copy link
Contributor Author

Sounds good, thank you so much for your time

@frankcash
Copy link
Contributor Author

@potiuk / @uranusjr lgtm if one of ya'll want to merge it

@frankcash
Copy link
Contributor Author

Keeps timing out at Build Images / Build CI image 3.7 (pull_request_target) In progress — This check has started... 🙃

@frankcash
Copy link
Contributor Author

it looks like a lot of other builds are failing at the build images / build ci image {python_version} step..

@potiuk
Copy link
Member

potiuk commented Feb 25, 2022

it looks like a lot of other builds are failing at the build images / build ci image {python_version} step..

Not all - only those that change "setup.py". This is pip getting into backtracking loop.

@potiuk
Copy link
Member

potiuk commented Feb 25, 2022

@frankcash -> I would really love if you could upvote and comment here: pypa/pip#10258 (comment).

The problem is that we have no way currently to determine what is the root cause of the problem. The problem is that pip is not able to solve dependencies in a reasonable time and runs backtracking for hours - but it does not really give us the possibilty to get the root cause message that could allow us to determine how we could help pip.

I proposed to add optional timeout on pip install execution producing a "conflict" message if the timeout is reached. That could give us at least a chance to understand what is the problem (someone released a new dependency that makes pip fail installing airflow from the scratch and we need to help pip to determine the right set of dependencies because it is unable to figure it out on its own).

@frankcash
Copy link
Contributor Author

frankcash commented Feb 25, 2022

Thanks for linking that @potiuk , I will provide a comment on it.

@potiuk
Copy link
Member

potiuk commented Feb 25, 2022

@frankcash I think I managed to workaround the pip resolver issue with #21824 - please rebase to latest main.

@frankcash
Copy link
Contributor Author

🤞

@frankcash
Copy link
Contributor Author

@potiuk it worked yay

@potiuk potiuk merged commit e4ead2b into apache:main Feb 25, 2022
@frankcash frankcash deleted the frankcash/literal-patch branch February 25, 2022 21:26
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Feb 28, 2022
@jedcunningham jedcunningham added this to the Airflow 2.2.5 milestone Mar 22, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 23, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 24, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers full tests needed We need to run full set of tests for this PR to merge provider:amazon AWS/Amazon - related issues type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

typing_extensions package isn't installed with apache-airflow-providers-amazon causing an issue for SqlToS3Operator

5 participants