potiuk commented on code in PR #45266:
URL: https://github.com/apache/airflow/pull/45266#discussion_r1899155906
##########
Dockerfile.ci:
##########
@@ -1372,31 +1269,33 @@ ARG AIRFLOW_PRE_COMMIT_UV_VERSION="4.1.4"
ENV AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION} \
AIRFLOW_UV_VERSION=${AIRFLOW_UV_VERSION} \
+ # This is needed since we are using cache mounted from the host
+ UV_LINK_MODE=copy \
AIRFLOW_PRE_COMMIT_VERSION=${AIRFLOW_PRE_COMMIT_VERSION}
# The PATH is needed for PIPX to find the tools installed
ENV PATH="/root/.local/bin:${PATH}"
+# Useful for creating a cache id based on the underlying architecture,
preventing the use of cached python packages from
+# an incorrect architecture.
+ARG TARGETARCH
+# Value to be able to easily change cache id and therefore use a bare new cache
+ARG DEPENDENCY_CACHE_EPOCH="0"
+
# Install useful command line tools in their own virtualenv so that they do
not clash with
# dependencies installed in Airflow also reinstall PIP and UV to make sure
they are installed
# in the version specified above
-RUN bash /scripts/docker/install_packaging_tools.sh
-
-# Airflow sources change frequently but dependency configuration won't change
that often
-# We copy pyproject.toml and other files needed to perform setup of
dependencies
-# So in case pyproject.toml changes we can install latest dependencies
required.
-COPY pyproject.toml ${AIRFLOW_SOURCES}/pyproject.toml
-COPY providers/pyproject.toml ${AIRFLOW_SOURCES}/providers/pyproject.toml
-COPY task_sdk/pyproject.toml ${AIRFLOW_SOURCES}/task_sdk/pyproject.toml
-COPY task_sdk/README.md ${AIRFLOW_SOURCES}/task_sdk/README.md
-COPY airflow/__init__.py ${AIRFLOW_SOURCES}/airflow/
-COPY tests_common/ ${AIRFLOW_SOURCES}/tests_common/
-COPY generated/* ${AIRFLOW_SOURCES}/generated/
-COPY constraints/* ${AIRFLOW_SOURCES}/constraints/
-COPY LICENSE ${AIRFLOW_SOURCES}/LICENSE
-COPY hatch_build.py ${AIRFLOW_SOURCES}/
Review Comment:
We are skipping this optimisation step now. UV install - especially when
cache is mounted from local cache mount file, is enouhg to be able to reinstall
airflow when rebuilding the image even if only source files changed, so we are
fine with invalidating the layers after even if single file changed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]