Skip to content

Fixes 37593: Keep bucket metrics off GCS child containers - #37957

Merged
IceS2 merged 1 commit into
mainfrom
fix-gcs-storage
Nov 17, 2026
Merged

IceS2 merged 1 commit into
mainfrom
fix-gcs-storage

Conversation

@IceS2

@IceS2 IceS2 commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

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

S3 already leaves both fields unset for structured children, so the change stays in GCS.

Type of change:

  • Bug fix

High-level design:

Not applicable — small connector fix using the existing optional fields.

Tests:

Use cases covered

  • Structured children have unknown object count and size.
  • Depth-expanded children preserve their schema and parent while leaving both metrics unknown, including in the container request.
  • Bucket containers retain their totals.

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_check passed. 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:

  • PR title follows Fixes <issue-number>: <short explanation>.
  • Linked issue via Fixes #37593.
  • Added regression coverage and listed local results.
  • Self-review against REVIEW.md on 65dfe73e466282ec70f286959c7527186b2da6cb: no blocking findings. gcs/metadata.py is covered by StorageUnitTest.test_generate_structured_container and test_generate_unstructured_container.
  • Comments: not applicable — the assignments need no additional explanation.
  • Schema migrations: not applicable — no schema changes.
  • Decision record: not applicable — correction of bucket metrics being applied to child containers.

RetriggerView in GreptileConfidence 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.

  • GCS structured folders now leave bucket-wide metrics off child containers.

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

@IceS2
IceS2 requested a review from a team as a code owner November 17, 2026 08:40
@IceS2
IceS2 requested review from Khairajani and a balanced review from Copilot November 17, 2026 08:40

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 insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This 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 skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Setting 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 (None), while bucket totals are preserved. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@IceS2
IceS2 merged commit f9e86dc into main Nov 17, 2026
52 of 54 checks passed
@IceS2
IceS2 deleted the fix-gcs-storage branch November 17, 2026 10:05
IceS2 added a commit that referenced this pull request Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GCS storage connector: child containers inherit the bucket-level numberOfObjects

3 participants