Skip to content

Add unit tests for the Cloud Datastore links - #72956

Closed
ShousenZHANG wants to merge 1 commit into
apache:mainfrom
ShousenZHANG:add-tests-datastore-links
Closed

ShousenZHANG wants to merge 1 commit into
apache:mainfrom
ShousenZHANG:add-tests-datastore-links

Conversation

@ShousenZHANG

Copy link
Copy Markdown
Contributor

providers/google/tests/unit/google/cloud/links/test_datastore.py was listed in OVERLOOKED_TESTS, so CloudDatastoreImportExportLink and CloudDatastoreEntitiesLink had no coverage.

Adds class-attribute, persist and _format_link checks for both, following the shape of test_bigquery.py in the same directory.

One thing I deliberately left out: DATASTORE_EXPORT_ENTITIES_LINK is defined in the module but no link class references it, so there is nothing to assert about it here. Flagging it in case that is an oversight worth a separate look.

The OVERLOOKED_TESTS entry is removed in this PR.

Third in the series after #72949 (bigquery_dts) and #72955 (dataprep).

related: #35442

Was generative AI tooling used to co-author this PR?

  • 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_datastore.py — 6 passed
  • pytest airflow-core/tests/unit/always/test_project_structure.py — 10 passed, 1 pre-existing xfail
  • prek run --files <both files> — 43 passed, 212 skipped, 0 failed

`providers/google/tests/unit/google/cloud/links/test_datastore.py` was listed
in `OVERLOOKED_TESTS`, so `CloudDatastoreImportExportLink` and
`CloudDatastoreEntitiesLink` had no coverage.

Adds class-attribute, `persist` and `_format_link` checks for both, following
the shape of `test_bigquery.py` in the same directory.

`DATASTORE_EXPORT_ENTITIES_LINK` is left alone: the constant is defined in the
module but no link class uses it, so there is nothing to assert about it here.

Drops the path from `OVERLOOKED_TESTS`.

related: #35442

Generated-by: Claude Code
Copilot AI lite review requested due to automatic review settings September 11, 2026 14:01
@boring-cyborg boring-cyborg Bot added area:providers provider:google Google (including GCP) related issues labels Sep 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@fat-catTW

Copy link
Copy Markdown
Contributor

Look nice! Thanks for the contribution!

@kaxil

kaxil commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

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

@kaxil kaxil added AI Spam closed because of multiple quality violations Label used to close the PRs when there are multiple quality violations labels Sep 11, 2026
@kaxil kaxil closed this Sep 11, 2026
@kaxil

kaxil commented Sep 11, 2026

Copy link
Copy Markdown
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Spam area:providers closed because of multiple quality violations Label used to close the PRs when there are multiple quality violations provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants