Skip to content

Conversation

@jjunier
Copy link
Contributor

@jjunier jjunier commented Jul 7, 2025

Problem Description
In the docker-compose.yaml file, the airflow-init service contains an incorrect variable expansion export AIRFLOW_UID=$(id -u) which gets interpreted by Docker Compose as a template variable instead of being executed as a bash command inside the container.

Solution
Changed export AIRFLOW_UID=$(id -u) to export AIRFLOW_UID=$$(id -u) to properly escape the dollar sign, ensuring the command is executed inside the container rather than being interpreted by Docker Compose during template processing.

Changes Made

  • Fixed variable escaping in docs/apache-airflow/howto/docker-compose/docker-compose.yaml
  • The change maintains consistency with other bash command escaping patterns used throughout the same file (e.g., mem_available=$$(...), cpus_available=$$(...), disk_available=$$(...))

Testing

  • Validated docker-compose.yaml syntax with docker-compose -f docker-compose.yaml config
  • Confirmed the change aligns with existing patterns in the file where $$ escaping is used for bash commands

closes: #52959


^ 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 airflow-core/newsfragments.

@boring-cyborg
Copy link

boring-cyborg bot commented Jul 7, 2025

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@potiuk potiuk added this to the Airflow 3.0.3 milestone Jul 8, 2025
@potiuk potiuk added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Jul 8, 2025
@potiuk potiuk merged commit a30bd70 into apache:main Jul 8, 2025
57 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Jul 8, 2025

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

github-actions bot pushed a commit that referenced this pull request Jul 8, 2025
…#52988)

(cherry picked from commit a30bd70)

Co-authored-by: Jun Jeong <121210928+givemechocopy@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Jul 8, 2025

Backport successfully created: v3-0-test

Status Branch Result
v3-0-test PR Link

github-actions bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jul 8, 2025
…apache#52988)

(cherry picked from commit a30bd70)

Co-authored-by: Jun Jeong <121210928+givemechocopy@users.noreply.github.com>
potiuk pushed a commit that referenced this pull request Jul 8, 2025
…#52988) (#53007)

(cherry picked from commit a30bd70)

Co-authored-by: Jun Jeong <121210928+givemechocopy@users.noreply.github.com>
kaxil pushed a commit that referenced this pull request Jul 9, 2025
…#52988) (#53007)

(cherry picked from commit a30bd70)

Co-authored-by: Jun Jeong <121210928+givemechocopy@users.noreply.github.com>
HsiuChuanHsu pushed a commit to HsiuChuanHsu/airflow that referenced this pull request Jul 10, 2025
stephen-bracken pushed a commit to stephen-bracken/airflow that referenced this pull request Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch kind:documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid interpolation format for command section due to AIRFLOW_UID in docker-compose.yaml 3.0.x

2 participants