Repository navigation
Fixes 37593: Keep bucket metrics off GCS child containers - #37957
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🟡 Medium riskSetting object counts and sizes to unknown for structured GCS child containers corrects misleading bucket-wide metrics, with impact limited to connector metadata. Fixes GCS structured child containers that inherited bucket-wide object counts and sizes by setting both metrics to unknown ( VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #37593
Structured GCS child containers currently receive bucket-wide object counts and sizes. Set both fields to unknown (
None) for these children while preserving bucket totals. This also covers children expanded through manifestdepth.S3 already leaves both fields unset for structured children, so the change stays in GCS.
Type of change:
High-level design:
Not applicable — small connector fix using the existing optional fields.
Tests:
Use cases covered
Unit tests
Updated
ingestion/tests/unit/topology/storage/test_gcs_storage.py.python -m pytest ingestion/tests/unit/topology/storage/ ingestion/tests/unit/source/storage/gcs/ -q— 389 passed.Before the fix, the corrected structured-child expectation failed with bucket totals of 100; the bucket test passed. After the fix, both pass.
make -C ingestion py_format_checkpassed. Basedpyright passed with 0 errors and 150 existing warnings. Commit hooks passed. Coverage percentage was not measured.Backend integration tests
Not applicable — no backend, schema, or API changes.
Ingestion integration tests
Not run. No GCS integration tests import the changed module; live GCS ingestion and clearing previously stored child metrics remain unverified. Local tests cover the generated container details and request payloads.
Playwright (UI) tests
Not applicable — no UI code changes.
Visual regression baselines
Not applicable — no UI code changes.
Manual testing performed
No live cloud or UI run performed; validation used the local automated checks above.
UI screen recording:
Not applicable — connector bug fix without UI code changes.
Checklist:
Fixes <issue-number>: <short explanation>.Fixes #37593.REVIEW.mdon65dfe73e466282ec70f286959c7527186b2da6cb: no blocking findings.gcs/metadata.pyis covered byStorageUnitTest.test_generate_structured_containerandtest_generate_unstructured_container.

Confidence Score: 5/5
The PR appears safe to merge.Summary
GCS structured children now leave object count and size unknown instead of copying bucket totals.
No actionable issues found. Tests were not run during this review.
Reviews (1) · Last reviewed commit: "Fix GCS structured child container metri..." · Reviewed by Greptile