Repository navigation
Conversation
|
BTW. There should be rather easy way to "start-airflow" from the container - if you run in entrypoin_ci.sh - everythint that happens when START_AIRFLOW is set to a non-empty value is what happen when you do "start-airflow" - so maybe a good idea might be to write bash function (in_container_start_airflow)- extract it in entrypoint_ci.sh and run both during entrypoint_ci.sh of That might be a good way to give "start-airflow" functionality to devcontainer users. |
|
Thanks for the suggestion — that makes sense, especially for improving the developer experience inside devcontainers. For this PR, I focused on clarifying the execution context and improving the guidance for the existing workflow, since the current error message can be misleading in Codespaces. I agree that supporting a "start-airflow" flow directly inside the container (via something like Let me know if that sounds reasonable. |
There was a problem hiding this comment.
Pull request overview
This PR improves the GitHub Codespaces onboarding experience for Breeze by clarifying the correct execution context for Docker-dependent Breeze commands and by enhancing Breeze’s Docker-not-running guidance when executed inside containerized/devcontainer-like shells.
Changes:
- Added containerized-development-environment detection and printed more targeted guidance when Docker checks fail in that context.
- Added unit tests covering the containerized-environment guidance path and the generic non-containerized path.
- Updated Codespaces and beginner quick-start docs to clarify where
breeze start-airflowshould be run to avoid misleading Docker errors.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
dev/breeze/src/airflow_breeze/utils/docker_command_utils.py |
Adds containerized environment detection and prints additional context-specific troubleshooting guidance on Docker failures. |
dev/breeze/tests/test_docker_command_utils.py |
Adds unit tests verifying the new guidance behavior (containerized vs non-containerized). |
contributing-docs/quick-start-ide/contributors_quick_start_codespaces.rst |
Clarifies Codespaces terminal context and adds more precise Docker troubleshooting instructions. |
contributing-docs/03a_contributors_quick_start_beginners.rst |
Updates beginner Codespaces steps to emphasize running breeze start-airflow from the initial Codespaces terminal (not nested shells). |
| "[warning]`breeze start-airflow` should be run from the outer Docker-accessible shell for " | ||
| "your environment, not from inside an already-entered Breeze/devcontainer shell unless the " | ||
| "documentation explicitly says to do so.[/]\n" | ||
| "[info]In GitHub Codespaces, run it from the initial Codespaces terminal opened on the " | ||
| "repository workspace.[/]\n" | ||
| "[info]Running the command from a nested container shell can produce a misleading " | ||
| "`Docker is not running` error.[/]" |
There was a problem hiding this comment.
The containerized-environment hint hard-codes breeze start-airflow, but check_docker_is_running() is invoked by perform_environment_checks() across many Breeze commands. This can lead to confusing guidance when the user was running a different command. Consider rephrasing to be command-agnostic (or describe it as an example), e.g. “Breeze commands that need Docker (such as start-airflow) should be run from the outer Docker-accessible shell …”
| "[warning]`breeze start-airflow` should be run from the outer Docker-accessible shell for " | |
| "your environment, not from inside an already-entered Breeze/devcontainer shell unless the " | |
| "documentation explicitly says to do so.[/]\n" | |
| "[info]In GitHub Codespaces, run it from the initial Codespaces terminal opened on the " | |
| "repository workspace.[/]\n" | |
| "[info]Running the command from a nested container shell can produce a misleading " | |
| "`Docker is not running` error.[/]" | |
| "[warning]Breeze commands that need Docker (such as `breeze start-airflow`) should be run " | |
| "from the outer Docker-accessible shell for your environment, not from inside an " | |
| "already-entered Breeze/devcontainer shell unless the documentation explicitly says to do " | |
| "so.[/]\n" | |
| "[info]In GitHub Codespaces, for example, run such commands from the initial Codespaces " | |
| "terminal opened on the repository workspace, not from within a nested container shell.[/]\n" | |
| "[info]Running Docker-dependent Breeze commands from a nested container shell can produce " | |
| "misleading errors like `Docker is not running`.[/]" |
| assert mock_console_print.call_args_list[0] == call( | ||
| "[error]Docker is not running.[/]\n[warning]Please make sure Docker is installed and running.[/]" | ||
| ) | ||
| assert "containerized development shell" in mock_console_print.call_args_list[1].args[0] | ||
| assert "initial Codespaces terminal" in mock_console_print.call_args_list[1].args[0] | ||
| assert "Docker error output" in mock_console_print.call_args_list[3].args[0] | ||
| assert "GitHub Codespace" in mock_console_print.call_args_list[4].args[0] |
There was a problem hiding this comment.
These assertions depend on specific console_print call indices (e.g. [1], [3], [4]), which makes the test brittle if output ordering changes or an extra line is added. Consider asserting with assert_has_calls for the ordered subset you care about and using assert_any_call/substring checks without relying on exact positions.
| assert mock_console_print.call_args_list[0] == call( | |
| "[error]Docker is not running.[/]\n[warning]Please make sure Docker is installed and running.[/]" | |
| ) | |
| assert "containerized development shell" in mock_console_print.call_args_list[1].args[0] | |
| assert "initial Codespaces terminal" in mock_console_print.call_args_list[1].args[0] | |
| assert "Docker error output" in mock_console_print.call_args_list[3].args[0] | |
| assert "GitHub Codespace" in mock_console_print.call_args_list[4].args[0] | |
| mock_console_print.assert_any_call( | |
| "[error]Docker is not running.[/]\n[warning]Please make sure Docker is installed and running.[/]" | |
| ) | |
| messages = [c.args[0] for c in mock_console_print.call_args_list] | |
| assert any("containerized development shell" in msg for msg in messages) | |
| assert any("initial Codespaces terminal" in msg for msg in messages) | |
| assert any("Docker error output" in msg for msg in messages) | |
| assert any("GitHub Codespace" in msg for msg in messages) |
|
@linxi507 This draft PR has not had author activity for 21 days. Before anyone can review it, it needs to meet our Pull Request quality criteria. Here is a summary of what still needs work; once those items are addressed, mark the PR ready for review. Issues found:
What to do next:
There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack. |
|
@linxi507 This draft PR has been inactive for 12 days since the last triage comment and no response from the author. Closing to keep the queue clean. You are welcome to reopen this PR when you resume work, or to open a new one addressing the issues previously raised. There is no rush — take your time. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
This PR improves GitHub Codespaces onboarding for Breeze and makes the related Docker guidance less misleading.
It updates the beginner quick start and the dedicated Codespaces guide to clarify that:
breeze start-airflowshould be run from the initial Codespaces terminal / outer shell with Docker accessbreeze shellor nested container shell can lead to misleading Docker-related errorsIt also improves the Breeze error guidance shown when Docker checks fail in a container/devcontainer/Codespaces-like environment. Instead of only showing the generic "Docker is not running" message, Breeze now adds a more targeted explanation about the execution context.
Tests:
Closes: #62405
Was generative AI tooling used to co-author this PR?
Generated-by: Chat GPT-5 following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions