Fixes #30466: ingest S3 bucket-level and root-level object tags#30467
Fixes #30466: ingest S3 bucket-level and root-level object tags#30467akashverma0786 wants to merge 5 commits into
Conversation
- _get_bucket_name_and_key: >2 -> >=2 so root-level files (s3://bucket/file.csv) no longer skip their object tags - add get_bucket_tagging for the bucket container via _fetch_s3_tags; set container_fqn on the bucket container so its tags can attach - nested-object tagging and all other behavior unchanged; unit tests updated
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Adds TestFetchS3Tags (bucket vs object routing, empty tagsets, None path, leaf-at-root fallback, multi-tag) and TestYieldContainerTags (missing container_fqn guard, S3 exception swallowed) for the new bucket-tag path.
🔴 Playwright Results — workflow failedValidated commit ✅ 104 passed · ❌ 2 failed · 🟡 1 flaky · ⏭️ 3 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ❌ unmet · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 50m 50s ⏱️ Max setup 3m 7s · max shard execution 14m 47s · max shard-job elapsed before upload 22m 22s · reporting 7s 🌐 200.90 requests/attempt · 1.76 app boots/UI scenario · 0.00% common-shard skew Optimization targets still in progress:
Genuine Failures (failed on all attempts)❌
|
Code Review ✅ Approved 1 resolved / 1 findingsAdds S3 bucket-level and root-level object tag ingestion with associated routing and FQN fixes, addressing the untested new bucket-tag branch finding. No issues found. ✅ 1 resolved✅ Quality: New bucket-tag branch of _fetch_s3_tags is untested
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|



Fixes #30466
What
The S3 connector was dropping two categories of S3 tags. This adds both.
_get_bucket_name_and_keyusedlen(parts) > 2, so a file at the bucket root (s3://bucket/file.csv, 2 segments) returned(None, None)and its object tags were skipped. Changed to>= 2.get_bucket_taggingfor the bucket container (routed via a new_fetch_s3_tagshelper: object tags for leaf files, bucket tags for the bucket). The bucket container was also missing itscontainer_fqn, which is now set so its tags can attach.Both confirmed against DataHub's S3 source (
get_key_prefix,use_s3_bucket_tags).Not changed
Nested-object tagging, folder containers (no tag leak), exception handling, and the
includeTags=falsedefault are all byte-identical to before.Testing
293 passed(added root-level path test + bucketcontainer_fqnassertions)24 passedintests/integration/s3/includeTags: truerequired.Greptile Summary
Adds S3 bucket-level and root-object tag ingestion.
Confidence Score: 5/5
The PR appears safe to merge with no blocking failures remaining.
No blocking failures remain.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[S3 container details] --> B{Leaf container with bucket and key?} B -->|Yes| C[Fetch object tags] B -->|No| D{Bucket-root path?} D -->|Yes| E[Fetch bucket tags] D -->|No| F[Return no tags] C --> G[Associate tags using container FQN] E --> GReviews (4): Last reviewed commit: "Merge branch 'main' into fix/s3-connecto..." | Re-trigger Greptile