Copilot commented on code in PR #63981:
URL: https://github.com/apache/airflow/pull/63981#discussion_r2964872811
##########
AGENTS.md:
##########
@@ -15,10 +15,17 @@
`<PROJECT>` is folder where pyproject.toml of the package you want to test is
located. For example, `airflow-core` or `providers/amazon`.
`<target_branch>` is the branch the PR will be merged into — usually `main`,
but could be `v3-1-test` when creating a PR for the 3.1 branch.
-- **Run a single test:** `uv run --project <PROJECT> pytest
path/to/test.py::TestClass::test_method -xvs`
-- **Run a test file:** `uv run --project <PROJECT> pytest path/to/test.py -xvs`
-- **Run all tests in package:** `uv run --project <PROJECT> pytest
path/to/package -xvs`
-- **If uv tests fail with missing system dependencies, run the tests with
breeze**: `breeze run pytest <tests> -xvs`
+
+> [!IMPORTANT]
+> **Host vs. Container:** `uv run` commands work **only on the host** (outside
Breeze).
+> If a test requires system-level dependencies (databases, service containers,
etc.)
+> or you are unsure, always use `breeze run pytest <tests>` instead.
Review Comment:
The new IMPORTANT block states that `uv run` commands work on the host, but
this conflicts with the earlier “Never run pytest, python, or airflow commands
directly on the host — always use breeze.” guidance. Please reconcile these
instructions (e.g., narrow the “never” rule or explicitly carve out host-only
`uv run` cases) so agents/humans don’t get contradictory directions.
##########
AGENTS.md:
##########
@@ -15,10 +15,17 @@
`<PROJECT>` is folder where pyproject.toml of the package you want to test is
located. For example, `airflow-core` or `providers/amazon`.
`<target_branch>` is the branch the PR will be merged into — usually `main`,
but could be `v3-1-test` when creating a PR for the 3.1 branch.
-- **Run a single test:** `uv run --project <PROJECT> pytest
path/to/test.py::TestClass::test_method -xvs`
-- **Run a test file:** `uv run --project <PROJECT> pytest path/to/test.py -xvs`
-- **Run all tests in package:** `uv run --project <PROJECT> pytest
path/to/package -xvs`
-- **If uv tests fail with missing system dependencies, run the tests with
breeze**: `breeze run pytest <tests> -xvs`
+
+> [!IMPORTANT]
+> **Host vs. Container:** `uv run` commands work **only on the host** (outside
Breeze).
+> If a test requires system-level dependencies (databases, service containers,
etc.)
+> or you are unsure, always use `breeze run pytest <tests>` instead.
+> To detect your context: the file `/.dockerenv` exists inside the Breeze
container;
+> the env var `AIRFLOW_CI_IMAGE_NAME` is set in CI; and `BREEZE`
+> is set inside a running container.
+- **Run a single test (host, no system deps):** `uv run --project <PROJECT>
pytest path/to/test.py::TestClass::test_method -xvs`
+**Run a single test (inside Breeze or with system deps):** `breeze run pytest
path/to/test.py::TestClass::test_method -xvs`
Review Comment:
Markdown list formatting looks broken here: the Breeze command line is
missing the leading `-` bullet, so it will fall out of the list (and may render
inconsistently). Make it a list item like the surrounding commands.
##########
AGENTS.md:
##########
@@ -15,10 +15,17 @@
`<PROJECT>` is folder where pyproject.toml of the package you want to test is
located. For example, `airflow-core` or `providers/amazon`.
`<target_branch>` is the branch the PR will be merged into — usually `main`,
but could be `v3-1-test` when creating a PR for the 3.1 branch.
-- **Run a single test:** `uv run --project <PROJECT> pytest
path/to/test.py::TestClass::test_method -xvs`
-- **Run a test file:** `uv run --project <PROJECT> pytest path/to/test.py -xvs`
-- **Run all tests in package:** `uv run --project <PROJECT> pytest
path/to/package -xvs`
-- **If uv tests fail with missing system dependencies, run the tests with
breeze**: `breeze run pytest <tests> -xvs`
+
+> [!IMPORTANT]
+> **Host vs. Container:** `uv run` commands work **only on the host** (outside
Breeze).
+> If a test requires system-level dependencies (databases, service containers,
etc.)
+> or you are unsure, always use `breeze run pytest <tests>` instead.
+> To detect your context: the file `/.dockerenv` exists inside the Breeze
container;
+> the env var `AIRFLOW_CI_IMAGE_NAME` is set in CI; and `BREEZE`
+> is set inside a running container.
Review Comment:
The context detection guidance mentions `AIRFLOW_CI_IMAGE_NAME`, but this
variable does not appear to be set or referenced anywhere else in the repo.
This makes the instruction unreliable for programmatic detection; consider
replacing it with an actually-used CI marker (e.g. `GITHUB_ACTIONS`/`CI`)
and/or specify the expected value for `BREEZE` (it is set to `"true"` in
Breeze).
```suggestion
> CI environments typically set standard env vars such as `CI` or
`GITHUB_ACTIONS`; and `BREEZE="true"`
> is set inside a running Breeze container.
```
##########
AGENTS.md:
##########
@@ -31,7 +38,7 @@
- **Run scripts tests:** `uv run --project scripts pytest scripts/tests/ -xvs`
- **Run Airflow CLI:** `breeze run airflow dags list`
- **Type-check:** `breeze run mypy path/to/code`
-- **Lint with ruff only:** `prek run ruff --from-ref <target_branch>`
+- **Lint with ruff only:** `prek run ruff --from-ref <target_branch>`If uv
tests fail with missing system dependencies
Review Comment:
This line appears to have an accidental trailing fragment ("If uv tests fail
with missing system dependencies") appended after the command, which will
render incorrectly and is confusing. It should likely be removed or moved into
the earlier IMPORTANT block / its own bullet.
--
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]