You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ShousenZHANG (via GitHub)" <gi...@apache.org> on 2026/09/11 15:00:29 UTC
[PR] Add unit tests for the Compute Engine links [airflow]
ShousenZHANG opened a new pull request, #72965:
URL: https://github.com/apache/airflow/pull/72965
`providers/google/tests/unit/google/cloud/links/test_compute.py` was listed in `OVERLOOKED_TESTS`, so `ComputeInstanceDetailsLink`, `ComputeInstanceTemplateDetailsLink` and `ComputeInstanceGroupManagerDetailsLink` had no coverage.
Adds the checks the sibling link tests use, for each class:
- `test_class_attributes` — `key`, `name`, `format_str`
- `test_persist` — the XCom payload pushed by `BaseGoogleLink.persist`
- `test_format_link` — the `_format_link` output
This module builds its link constants on top of `BASE_LINK`, so the formatted URL is already absolute and `_format_link` returns it instead of prefixing the console base a second time. The `_format_link` assertions pin that.
Same shape as `test_bigquery.py` (added in #68066) in the same directory, and the `OVERLOOKED_TESTS` entry is removed in this PR.
related: #35442
### Was generative AI tooling used to co-author this PR?
- [x] Yes
`Generated-by: Claude Code`
The test bodies were written by an AI assistant following the existing `test_bigquery.py` pattern in the same directory. I verified them myself:
- `pytest providers/google/tests/unit/google/cloud/links/test_compute.py` — 9 passed
- `pytest airflow-core/tests/unit/always/test_project_structure.py` — 10 passed, 1 xfailed
- `ruff check` / `ruff format --check` on the test file — clean
- `prek run --files providers/google/tests/unit/google/cloud/links/test_compute.py airflow-core/tests/unit/always/test_project_structure.py` — 43 passed, 212 skipped, 0 failed
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add unit tests for the Compute Engine links [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil closed pull request #72965: Add unit tests for the Compute Engine links
URL: https://github.com/apache/airflow/pull/72965
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add unit tests for the Compute Engine links [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on PR #72965:
URL: https://github.com/apache/airflow/pull/72965#issuecomment-5636648151
Also, one PR per module is the wrong unit: twenty PRs for one logical change is twenty reviews and twenty CI runs, when it should have been a single PR.
The tests add little on their own merits either, since `test_class_attributes` compares `format_str` against the same constant imported from the module under test, and `test_format_link` derives its expected value from the same `.format()` call the implementation makes, so a broken link string still passes.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add unit tests for the Compute Engine links [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on PR #72965:
URL: https://github.com/apache/airflow/pull/72965#issuecomment-5636561340
Closing this along with the other 19 PRs opened from this account today.
These are the first 20 PRs from this account, and 17 of them were opened inside a two-minute window, between 14:59:50Z and 15:01:43Z, about seven seconds apart. Each carries `Generated-by: Claude Code` in both the description and the commit message. The disclosure is appreciated, but a batch of 20 generated PRs arriving at once is the load the [Gen-AI assisted contributions](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) guidelines ask contributors not to create: it is 20 separate reviews, and CI has to run all of them.
Airflow is maintained by volunteers, so every PR costs reviewer time and CI capacity.
The underlying idea is fine, filling in the Google link tests listed in `OVERLOOKED_TESTS` is useful work. Please open one PR at a time, run the tests locally, and let it get reviewed before opening the next. If you think a specific change here should stand, comment with the reasoning and a maintainer can reopen it.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org