This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 23ac06a4a66 Generate constraints from uv.lock instead of skipping
constraints download (#63675)
23ac06a4a66 is described below
commit 23ac06a4a66b01d5d17638146846b636b4ffa0e1
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sun Mar 15 22:39:45 2026 +0100
Generate constraints from uv.lock instead of skipping constraints download
(#63675)
When installing from sources, the constraints file was not being
generated, which meant downstream steps had no constraints.txt to
reference. Now we use `uv export` to generate constraints from the
lock file, consistent with the pattern already used in entrypoint_ci.sh.
---
Dockerfile | 7 ++++---
Dockerfile.ci | 7 ++++---
scripts/docker/common.sh | 7 ++++---
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 2dc684e61c8..e074e6321c5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -734,12 +734,13 @@ function common::get_airflow_version_specification() {
}
function common::get_constraints_location() {
- # When installing from sources without upgrade, uv sync --frozen uses
uv.lock directly
- # so we don't need to download constraints
+ # When installing from sources without upgrade, generate constraints from
uv.lock
if [[ ${AIRFLOW_INSTALLATION_METHOD=} == "." && -z
"${UPGRADE_RANDOM_INDICATOR_STRING=}" ]]; then
echo
- echo "${COLOR_BLUE}Installing from sources with uv.lock - skipping
constraints download${COLOR_RESET}"
+ echo "${COLOR_BLUE}Installing from sources with uv.lock - generating
constraints from uv.lock${COLOR_RESET}"
echo
+ uv export --frozen --no-hashes --no-emit-project --no-editable
--no-header \
+ --no-annotate > "${HOME}/constraints.txt" 2>/dev/null || true
return
fi
diff --git a/Dockerfile.ci b/Dockerfile.ci
index 8184a329c8a..0cf6fafd967 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -674,12 +674,13 @@ function common::get_airflow_version_specification() {
}
function common::get_constraints_location() {
- # When installing from sources without upgrade, uv sync --frozen uses
uv.lock directly
- # so we don't need to download constraints
+ # When installing from sources without upgrade, generate constraints from
uv.lock
if [[ ${AIRFLOW_INSTALLATION_METHOD=} == "." && -z
"${UPGRADE_RANDOM_INDICATOR_STRING=}" ]]; then
echo
- echo "${COLOR_BLUE}Installing from sources with uv.lock - skipping
constraints download${COLOR_RESET}"
+ echo "${COLOR_BLUE}Installing from sources with uv.lock - generating
constraints from uv.lock${COLOR_RESET}"
echo
+ uv export --frozen --no-hashes --no-emit-project --no-editable
--no-header \
+ --no-annotate > "${HOME}/constraints.txt" 2>/dev/null || true
return
fi
diff --git a/scripts/docker/common.sh b/scripts/docker/common.sh
index a5d4c5ed9f5..66a3b61e865 100644
--- a/scripts/docker/common.sh
+++ b/scripts/docker/common.sh
@@ -87,12 +87,13 @@ function common::get_airflow_version_specification() {
}
function common::get_constraints_location() {
- # When installing from sources without upgrade, uv sync --frozen uses
uv.lock directly
- # so we don't need to download constraints
+ # When installing from sources without upgrade, generate constraints from
uv.lock
if [[ ${AIRFLOW_INSTALLATION_METHOD=} == "." && -z
"${UPGRADE_RANDOM_INDICATOR_STRING=}" ]]; then
echo
- echo "${COLOR_BLUE}Installing from sources with uv.lock - skipping
constraints download${COLOR_RESET}"
+ echo "${COLOR_BLUE}Installing from sources with uv.lock - generating
constraints from uv.lock${COLOR_RESET}"
echo
+ uv export --frozen --no-hashes --no-emit-project --no-editable
--no-header \
+ --no-annotate > "${HOME}/constraints.txt" 2>/dev/null || true
return
fi