yehoshuadimarsky commented on issue #37785:
URL: https://github.com/apache/airflow/issues/37785#issuecomment-1975007794

   Tried it now also in my GH Codespaces env, appears to be the same error.
   
   Setup:
   ```bash
    ~/Documents/GitHub/airflow-upstream/ [use-uv-for-prod-image] gh codespace 
ssh
   ? Choose codespace: apache/airflow (use-uv-for-prod-image): fictional orbit
   Linux 53324cd94090 6.2.0-1019-azure #19~22.04.1-Ubuntu SMP Wed Jan 10 
22:57:03 UTC 2024 x86_64
   
   The programs included with the Debian GNU/Linux system are free software;
   the exact distribution terms for each program are described in the
   individual files in /usr/share/doc/*/copyright.
   
   Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
   permitted by applicable law.
   root@53324cd94090:/workspaces/airflow# git status
   On branch use-uv-for-prod-image
   Your branch is up to date with 'origin/use-uv-for-prod-image'.
   
   nothing to commit, working tree clean
   root@53324cd94090:/workspaces/airflow# git pull
   remote: Enumerating objects: 184, done.
   remote: Counting objects: 100% (182/182), done.
   remote: Compressing objects: 100% (126/126), done.
   remote: Total 184 (delta 69), reused 153 (delta 51), pack-reused 2
   Receiving objects: 100% (184/184), 340.68 KiB | 9.21 MiB/s, done.
   Resolving deltas: 100% (69/69), completed with 15 local objects.
   From https://github.com/apache/airflow
    + 8773cb8d8c...e54302f882 use-uv-for-prod-image          -> 
origin/use-uv-for-prod-image  (forced update)
      32bf0817f2..b921d4cd6f  constraints-main               -> 
origin/constraints-main
      a7691b787b..73a632a5a0  main                           -> origin/main
    * [new branch]            update-helm-check-instructions -> 
origin/update-helm-check-instructions
    * [new tag]               helm-chart/1.13.0rc1           -> 
helm-chart/1.13.0rc1
   hint: You have divergent branches and need to specify how to reconcile them.
   hint: You can do so by running one of the following commands sometime before
   hint: your next pull:
   hint:
   hint:   git config pull.rebase false  # merge
   hint:   git config pull.rebase true   # rebase
   hint:   git config pull.ff only       # fast-forward only
   hint:
   hint: You can replace "git config" with "git config --global" to set a 
default
   hint: preference for all repositories. You can also pass --rebase, 
--no-rebase,
   hint: or --ff-only on the command line to override the configured default per
   hint: invocation.
   fatal: Need to specify how to reconcile divergent branches.
   root@53324cd94090:/workspaces/airflow# git pull --rebase
   Successfully rebased and updated refs/heads/use-uv-for-prod-image.
   root@53324cd94090:/workspaces/airflow# git pull
   Already up to date.
   root@53324cd94090:/workspaces/airflow# git status
   On branch use-uv-for-prod-image
   Your branch is up to date with 'origin/use-uv-for-prod-image'.
   
   nothing to commit, working tree clean
   root@53324cd94090:/workspaces/airflow# git remote -v
   origin       https://github.com/apache/airflow (fetch)
   origin       https://github.com/apache/airflow (push)
   root@53324cd94090:/workspaces/airflow# export AIRFLOW_VERSION=2.8.2
   root@53324cd94090:/workspaces/airflow# export DOCKER_BUILDKIT=1
   ```
   
   Command and error:
   
   <details>
   
   ```bash
   root@53324cd94090:/workspaces/airflow# docker build . \
       --build-arg PYTHON_BASE_IMAGE="python:3.8-slim-bookworm" \
       --build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}" \
       --tag "my-tag:0.0.1"
   [+] Building 70.2s (61/74)                                                   
                                                         docker:default
    => [internal] load build definition from Dockerfile                         
                                                                   0.1s
    => => transferring dockerfile: 72.05kB                                      
                                                                   0.0s
    => [internal] load .dockerignore                                            
                                                                   0.2s
    => => transferring context: 3.08kB                                          
                                                                   0.0s
    => resolve image config for docker.io/docker/dockerfile:1.4                 
                                                                   0.4s
    => [auth] docker/dockerfile:pull token for registry-1.docker.io             
                                                                   0.0s
    => CACHED 
docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ced81e24ef1a0dbc
               0.0s
    => [internal] load metadata for docker.io/library/python:3.8-slim-bookworm  
                                                                   0.3s
    => [auth] library/python:pull token for registry-1.docker.io                
                                                                   0.0s
    => CACHED [internal] preparing inline document                              
                                                                   0.0s
    => CACHED [internal] preparing inline document                              
                                                                   0.2s
    => [internal] preparing inline document                                     
                                                                   0.9s
    => [internal] preparing inline document                                     
                                                                   1.0s
    => [airflow-build-image  1/16] FROM 
docker.io/library/python:3.8-slim-bookworm@sha256:23252009f10b4af8a8c90409c54a866473a251b001b74902f04631d
  0.0s
    => [internal] preparing inline document                                     
                                                                   0.0s
    => [internal] preparing inline document                                     
                                                                   0.5s
    => [internal] preparing inline document                                     
                                                                   1.1s
    => [internal] preparing inline document                                     
                                                                   0.0s
    => [internal] preparing inline document                                     
                                                                   0.0s
    => CACHED [internal] settings cache mount permissions                       
                                                                   0.0s
    => [internal] preparing inline document                                     
                                                                   0.0s
    => CACHED [internal] preparing inline document                              
                                                                   0.0s
    => CACHED [internal] preparing inline document                              
                                                                   0.0s
    => CACHED [internal] preparing inline document                              
                                                                   0.0s
    => [internal] preparing inline document                                     
                                                                   1.1s
    => [internal] load build context                                            
                                                                   0.1s
    => => transferring context: 72.05kB                                         
                                                                   0.0s
    => [internal] preparing inline document                                     
                                                                   1.0s
    => [internal] preparing inline document                                     
                                                                   0.3s
    => CACHED [scripts  1/17] COPY <<EOF /install_os_dependencies.sh            
                                                                   0.0s
    => CACHED [scripts  2/17] COPY <<EOF /install_mysql.sh                      
                                                                   0.0s
    => CACHED [scripts  3/17] COPY <<EOF /install_mssql.sh                      
                                                                   0.0s
    => CACHED [scripts  4/17] COPY <<EOF /install_postgres.sh                   
                                                                   0.0s
    => [scripts  5/17] COPY <<EOF /install_packaging_tools.sh                   
                                                                   0.8s
    => [scripts  6/17] COPY <<EOF 
/install_airflow_dependencies_from_branch_tip.sh                                
                                 0.3s
    => [scripts  7/17] COPY <<EOF /common.sh                                    
                                                                   0.3s
    => [scripts  8/17] COPY <<EOF /pip                                          
                                                                   0.3s
    => [scripts  9/17] COPY <<EOF /install_from_docker_context_files.sh         
                                                                   0.3s
    => [scripts 10/17] COPY <<EOF /get_package_specs.py                         
                                                                   0.3s
    => [scripts 11/17] COPY <<EOF /install_airflow.sh                           
                                                                   0.3s
    => [scripts 12/17] COPY <<EOF /install_additional_dependencies.sh           
                                                                   0.3s
    => [scripts 13/17] COPY <<EOF /create_prod_venv.sh                          
                                                                   0.3s
    => [scripts 14/17] COPY <<EOF /create_prod_venv.sh                          
                                                                   0.3s
    => [scripts 15/17] COPY <<EOF /entrypoint_prod.sh                           
                                                                   0.3s
    => [scripts 16/17] COPY <<EOF /clean-logs.sh                                
                                                                   0.3s
    => [scripts 17/17] COPY <<EOF /airflow-scheduler-autorestart.sh             
                                                                   0.3s
    => CACHED [airflow-build-image  2/16] COPY --from=scripts 
install_os_dependencies.sh /scripts/docker/                                     
     0.0s
    => CACHED [airflow-build-image  3/16] RUN bash 
/scripts/docker/install_os_dependencies.sh dev                                  
                0.0s
    => [airflow-build-image  4/16] COPY --from=scripts common.sh 
/scripts/docker/                                                                
  0.5s
    => CACHED [main  3/18] RUN bash /scripts/docker/install_os_dependencies.sh 
runtime                                                             0.0s
    => [main  4/18] COPY --from=scripts common.sh /scripts/docker/              
                                                                   0.6s
    => [airflow-build-image  5/16] COPY --from=scripts install_mysql.sh 
install_mssql.sh install_postgres.sh /scripts/docker/                      0.5s
    => [main  5/18] COPY --from=scripts install_mysql.sh install_mssql.sh 
install_postgres.sh /scripts/docker/                                     0.6s
    => [airflow-build-image  6/16] RUN bash /scripts/docker/install_mysql.sh 
dev &&     bash /scripts/docker/install_mssql.sh dev &&     bash /s  40.7s
    => [main  6/18] RUN bash /scripts/docker/install_mysql.sh prod     && bash 
/scripts/docker/install_mssql.sh prod     && bash /scripts/docker  40.6s
    => [airflow-build-image  7/16] RUN adduser --gecos "First 
Last,RoomNumber,WorkPhone,HomePhone" --disabled-password        --quiet 
"airflow" -  1.3s
    => [airflow-build-image  8/16] COPY --chown=50000:0 Dockerfile 
/docker-context-files                                                           
0.3s
    => [airflow-build-image  9/16] RUN if [[ -f /docker-context-files/pip.conf 
]]; then         mkdir -p /home/airflow/.config/pip;         cp /d  0.6s
    => [airflow-build-image 10/16] COPY --from=scripts common.sh 
install_packaging_tools.sh      install_airflow_dependencies_from_branch_tip.sh 
  0.5s
    => [airflow-build-image 11/16] RUN bash 
/scripts/docker/install_packaging_tools.sh;     bash 
/scripts/docker/create_prod_venv.sh;     if [[   15.5s
    => [airflow-build-image 12/16] COPY --chown=airflow:0 Dockerfile 
/Dockerfile                                                                   
0.4s
    => [airflow-build-image 13/16] WORKDIR /opt/airflow                         
                                                                   0.3s
    => [airflow-build-image 14/16] COPY --from=scripts 
install_from_docker_context_files.sh install_airflow.sh      
install_additional_dependenci  0.5s
    => ERROR [airflow-build-image 15/16] RUN 
--mount=type=cache,id=python:3.8-slim-bookworm-24.0-amd64-9,target=/tmp/.cache/pip,uid=50000
     if   1.6s
   ------
    > [airflow-build-image 15/16] RUN 
--mount=type=cache,id=python:3.8-slim-bookworm-24.0-amd64-9,target=/tmp/.cache/pip,uid=50000
     if [[ false == "true" ]]; then         bash 
/scripts/docker/install_from_docker_context_files.sh;     fi;     if ! airflow 
version 2>/dev/null >/dev/null; then         bash 
/scripts/docker/install_airflow.sh;     fi;     if [[ -n "" ]]; then         
bash /scripts/docker/install_additional_dependencies.sh;     fi;     find 
"/home/airflow/.local/" -name '*.pyc' -print0 | xargs -0 rm -f || true ;     
find "/home/airflow/.local/" -type d -name '__pycache__' -print0 | xargs -0 rm 
-rf || true ;     find "/home/airflow/.local" -executable ! -type l -print0 | 
xargs --null chmod g+x;     find "/home/airflow/.local" ! -type l -print0 | 
xargs --null chmod g+rw:
   0.512
   0.512 Using 'pip' to install Airflow
   0.512
   0.546
   0.546 Downloading constraints from 
https://raw.githubusercontent.com/apache/airflow/constraints-2.8.2/constraints-3.8.txt
 to /home/airflow/constraints.txt
   0.546
   0.803 
PATH=/home/airflow/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/mssql-tools/bin
   1.428 Installed pip: pip 24.0 from 
/home/airflow/.local/lib/python3.8/site-packages/pip (python 3.8): 
/home/airflow/.local/bin/pip
   1.428 Using 'pip' to install Airflow
   1.428
   1.428 ERROR! You can only use --editable flag when installing airflow from 
sources!
   1.428        Current installation method is 'apache-airflow and should be '.'
   ------
   Dockerfile:1577
   --------------------
    1576 |     # hadolint ignore=SC2086, SC2010, DL3042
    1577 | >>> RUN 
--mount=type=cache,id=$PYTHON_BASE_IMAGE-$AIRFLOW_PIP_VERSION-$TARGETARCH-$PIP_CACHE_EPOCH,target=/tmp/.cache/pip,uid=${AIRFLOW_UID}
 \
    1578 | >>>     if [[ ${INSTALL_PACKAGES_FROM_CONTEXT} == "true" ]]; then \
    1579 | >>>         bash 
/scripts/docker/install_from_docker_context_files.sh; \
    1580 | >>>     fi; \
    1581 | >>>     if ! airflow version 2>/dev/null >/dev/null; then \
    1582 | >>>         bash /scripts/docker/install_airflow.sh; \
    1583 | >>>     fi; \
    1584 | >>>     if [[ -n "${ADDITIONAL_PYTHON_DEPS}" ]]; then \
    1585 | >>>         bash /scripts/docker/install_additional_dependencies.sh; 
\
    1586 | >>>     fi; \
    1587 | >>>     find "${AIRFLOW_USER_HOME_DIR}/.local/" -name '*.pyc' 
-print0 | xargs -0 rm -f || true ; \
    1588 | >>>     find "${AIRFLOW_USER_HOME_DIR}/.local/" -type d -name 
'__pycache__' -print0 | xargs -0 rm -rf || true ; \
    1589 | >>>     # make sure that all directories and files in .local are 
also group accessible
    1590 | >>>     find "${AIRFLOW_USER_HOME_DIR}/.local" -executable ! -type l 
-print0 | xargs --null chmod g+x; \
    1591 | >>>     find "${AIRFLOW_USER_HOME_DIR}/.local" ! -type l -print0 | 
xargs --null chmod g+rw
    1592 |
   --------------------
   ERROR: failed to solve: process "/bin/bash -o pipefail -o errexit -o nounset 
-o nolog -c if [[ ${INSTALL_PACKAGES_FROM_CONTEXT} == \"true\" ]]; then         
bash /scripts/docker/install_from_docker_context_files.sh;     fi;     if ! 
airflow version 2>/dev/null >/dev/null; then         bash 
/scripts/docker/install_airflow.sh;     fi;     if [[ -n 
\"${ADDITIONAL_PYTHON_DEPS}\" ]]; then         bash 
/scripts/docker/install_additional_dependencies.sh;     fi;     find 
\"${AIRFLOW_USER_HOME_DIR}/.local/\" -name '*.pyc' -print0 | xargs -0 rm -f || 
true ;     find \"${AIRFLOW_USER_HOME_DIR}/.local/\" -type d -name 
'__pycache__' -print0 | xargs -0 rm -rf || true ;     find 
\"${AIRFLOW_USER_HOME_DIR}/.local\" -executable ! -type l -print0 | xargs 
--null chmod g+x;     find \"${AIRFLOW_USER_HOME_DIR}/.local\" ! -type l 
-print0 | xargs --null chmod g+rw" did not complete successfully: exit code: 1
   ```
   
   </details>
   


-- 
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]

Reply via email to