Skip to content

Commit

Permalink
Get rid of lowest-direct resolution in no-constraint upgrades with uv (
Browse files Browse the repository at this point in the history
…#38109)

When we fall-back to no-constraint mode in uv, we used so far
lowest-direct resolution - but it could cause a really old set of
versions to be installed with some strange pyproject.toml errors
(for example zenpy==2.0.32 had a buggy pyproject.toml and it
caused editable local install to fail.
  • Loading branch information
potiuk authored Mar 13, 2024
1 parent 43d7f6d commit 71ef168
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ function common::get_packaging_tool() {
export EXTRA_UNINSTALL_FLAGS=""
fi
export UPGRADE_EAGERLY="--upgrade --resolution highest"
export UPGRADE_IF_NEEDED="--upgrade --resolution lowest-direct"
export UPGRADE_IF_NEEDED="--upgrade"
else
echo
echo "${COLOR_BLUE}Using 'pip' to install Airflow${COLOR_RESET}"
Expand Down Expand Up @@ -906,7 +906,7 @@ function install_airflow() {
echo
echo "${COLOR_YELLOW}Likely pyproject.toml has new dependencies conflicting with constraints.${COLOR_RESET}"
echo
echo "${COLOR_BLUE}Falling back to no-constraints, lowest-direct resolution installation.${COLOR_RESET}"
echo "${COLOR_BLUE}Falling back to no-constraints installation.${COLOR_RESET}"
echo
set -x
${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} ${UPGRADE_IF_NEEDED} ${ADDITIONAL_PIP_INSTALL_FLAGS} ${installation_command_flags}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ function common::get_packaging_tool() {
export EXTRA_UNINSTALL_FLAGS=""
fi
export UPGRADE_EAGERLY="--upgrade --resolution highest"
export UPGRADE_IF_NEEDED="--upgrade --resolution lowest-direct"
export UPGRADE_IF_NEEDED="--upgrade"
else
echo
echo "${COLOR_BLUE}Using 'pip' to install Airflow${COLOR_RESET}"
Expand Down Expand Up @@ -710,7 +710,7 @@ function install_airflow() {
echo
echo "${COLOR_YELLOW}Likely pyproject.toml has new dependencies conflicting with constraints.${COLOR_RESET}"
echo
echo "${COLOR_BLUE}Falling back to no-constraints, lowest-direct resolution installation.${COLOR_RESET}"
echo "${COLOR_BLUE}Falling back to no-constraints installation.${COLOR_RESET}"
echo
set -x
${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} ${UPGRADE_IF_NEEDED} ${ADDITIONAL_PIP_INSTALL_FLAGS} ${installation_command_flags}
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function common::get_packaging_tool() {
export EXTRA_UNINSTALL_FLAGS=""
fi
export UPGRADE_EAGERLY="--upgrade --resolution highest"
export UPGRADE_IF_NEEDED="--upgrade --resolution lowest-direct"
export UPGRADE_IF_NEEDED="--upgrade"
else
echo
echo "${COLOR_BLUE}Using 'pip' to install Airflow${COLOR_RESET}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/install_airflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function install_airflow() {
echo
echo "${COLOR_YELLOW}Likely pyproject.toml has new dependencies conflicting with constraints.${COLOR_RESET}"
echo
echo "${COLOR_BLUE}Falling back to no-constraints, lowest-direct resolution installation.${COLOR_RESET}"
echo "${COLOR_BLUE}Falling back to no-constraints installation.${COLOR_RESET}"
echo
set -x
${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} ${UPGRADE_IF_NEEDED} ${ADDITIONAL_PIP_INSTALL_FLAGS} ${installation_command_flags}
Expand Down
2 changes: 1 addition & 1 deletion scripts/in_container/_in_container_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function in_container_get_packaging_tool() {
export EXTRA_UNINSTALL_FLAGS=""
fi
export UPGRADE_EAGERLY="--upgrade --resolution highest"
export UPGRADE_IF_NEEDED="--upgrade --resolution lowest-direct"
export UPGRADE_IF_NEEDED="--upgrade"
else
echo
echo "${COLOR_BLUE}Using 'pip' to install Airflow${COLOR_RESET}"
Expand Down

0 comments on commit 71ef168

Please sign in to comment.