fix: Ingestion of buckets not working right after connection is tested - CPD #75506#1942
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The defaults query returns the first S3/COS connection regardless of active status. Only pre-select saved bucket_names when the defaults connection_id matches the current connector.connectionId to avoid seeding the wrong buckets if a stale connection exists alongside the active one. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two issues in the initial-selection effect: 1. hasAppliedInitial was only set when valid buckets were found, leaving the effect live across bucket refreshes and allowing stale defaults to overwrite selections made after a refetch. 2. No guard against the async race where buckets loads before initialSelectedBuckets: user clicks buckets, defaults arrive later and silently overwrite them. Fix: mark hasAppliedInitial unconditionally on first evaluation, and only apply defaults when selectedBuckets is still empty (user hasn't acted yet). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This pull request updates the S3 and IBM Cloud Object Storage (IBMCOS) settings and upload flows to improve clarity for users and to support initializing the bucket selection with default values. The main changes include updating user-facing labels and messages for better clarity, and adding logic to pre-select default buckets when presenting the bucket selection UI.
User interface and messaging improvements:
Bucket selection initialization enhancements:
initialSelectedBucketsprop to theBucketViewcomponent, and logic to pre-select these buckets if they are valid for the current connector. (frontend/app/upload/[provider]/page.tsxR54, frontend/app/upload/[provider]/page.tsxR66-R94)useS3DefaultsQueryanduseIBMCOSDefaultsQueryhooks to fetch default bucket selections for S3 and IBMCOS, respectively, and passed these defaults to the bucket selection UI. (frontend/app/upload/[provider]/page.tsxL12-R20, frontend/app/upload/[provider]/page.tsxR342, frontend/app/upload/[provider]/page.tsxR354, frontend/app/upload/[provider]/page.tsxR382, frontend/app/upload/[provider]/page.tsxR395)Summary by CodeRabbit
New Features
Improvements