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 edge-case when conflicting constraints prevent k8s env creation (… #43298

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Oct 23, 2024

#43276)

The #36930 added constraints to creation of k8s environment, but it had a side effect - the constraints could not be created if source of airflow had dependencies conflicting with constraints (which might happen for example when we upgrade FAB - because locally pinned FAB might be different than the one in constraints).

Also the constraints were "hard-coded" - the python version, branch and github repository were hard-coded.

This PR fixes both problems:

  • constraints URL is dynamically generated based on current branch, repo and python version
  • in case attempts to create the venv with constraints fails, we attempt to install it again without constraints

(cherry picked from commit 274b6e1)


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

…pache#43276)

The apache#36930 added constraints to creation of k8s environment, but it
had a side effect - the constraints could not be created if source
of airflow had dependencies conflicting with constraints (which
might happen for example when we upgrade FAB - because locally
pinned FAB might be different than the one in constraints).

Also the constraints were "hard-coded" - the python version,
branch and github repository were hard-coded.

This PR fixes both problems:

* constraints URL is dynamically generated based on current
  branch, repo and python version
* in case attempts to create the venv with constraints fails,
  we attempt to install it again without constraints

(cherry picked from commit 274b6e1)
@potiuk
Copy link
Member Author

potiuk commented Oct 23, 2024

Backport of #43276

@potiuk potiuk requested review from eladkal and romsharon98 October 23, 2024 07:57
@potiuk
Copy link
Member Author

potiuk commented Oct 23, 2024

Both failures should already be fixed in tip of v2-10-test - merging

@potiuk potiuk merged commit 66b4439 into apache:v2-10-test Oct 23, 2024
67 of 70 checks passed
@potiuk potiuk deleted the fix-k8s-test-edge-case branch October 23, 2024 12:58
utkarsharma2 pushed a commit that referenced this pull request Oct 24, 2024
#43298)

* Fix edge-case when conflicting constraints prevent k8s env creation (#43276)

The #36930 added constraints to creation of k8s environment, but it
had a side effect - the constraints could not be created if source
of airflow had dependencies conflicting with constraints (which
might happen for example when we upgrade FAB - because locally
pinned FAB might be different than the one in constraints).

Also the constraints were "hard-coded" - the python version,
branch and github repository were hard-coded.

This PR fixes both problems:

* constraints URL is dynamically generated based on current
  branch, repo and python version
* in case attempts to create the venv with constraints fails,
  we attempt to install it again without constraints

(cherry picked from commit 274b6e1)

* Update k8s_requirements.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants