Surface gdrive folder status in SourceCrawler CR status - #318
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
📝 WalkthroughWalkthroughThis PR records Google Drive root-folder failures. The controller maps failures to ChangesGoogle Drive folder status tracking
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Reconciler
participant GDriveSource
participant buildGDriveStatus
participant SourceCrawlerStatus
Reconciler->>GDriveSource: synchronize configured root folders
GDriveSource-->>Reconciler: return FailedRootFolders and sync result
Reconciler->>buildGDriveStatus: map failures to folder status records
buildGDriveStatus-->>Reconciler: return GDriveFolderStatus list
Reconciler->>SourceCrawlerStatus: persist GDriveStatus
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/unstructured/source.go`:
- Around line 320-322: Update the reconciliation flow around the
FailedRootFolders check so Phase 3 garbage collection is skipped whenever any
configured root folder fails, not only when all folders fail. Preserve the
existing all-failed error return, and ensure partial failures retain prior files
and permissions until a complete crawl succeeds.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Enterprise
Run ID: dc4f760e-8f86-4a58-b59b-faa384c455b1
📒 Files selected for processing (5)
api/v1alpha1/sourcecrawler_types.goapi/v1alpha1/zz_generated.deepcopy.goconfig/crd/bases/operator.dataverse.redhat.com_sourcecrawlers.yamlinternal/controller/sourcecrawler_controller.gopkg/unstructured/source.go
ed840f3 to
56e6b34
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@config/crd/bases/operator.dataverse.redhat.com_sourcecrawlers.yaml`:
- Around line 179-189: Bound the gdriveStatus payload produced by
buildGDriveStatus: add appropriate maxItems and maxLength constraints for folder
entries, URLs, and error strings in the CRD and source configuration, and
enforce the same limits when constructing status so existing resources cannot
exceed them. Preserve the current status shape while truncating or capping
values before writing the Kubernetes object.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Enterprise
Run ID: 5867c34e-d0bb-4433-824a-8ccb318bc272
📒 Files selected for processing (3)
api/v1alpha1/sourcecrawler_types.goconfig/crd/bases/operator.dataverse.redhat.com_sourcecrawlers.yamlinternal/controller/sourcecrawler_controller.go
🚧 Files skipped from review as they are similar to previous changes (1)
- internal/controller/sourcecrawler_controller.go
41f98fe to
f3234ed
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/e2e/unstructured_test.go`:
- Around line 499-500: Update the PollUntilContextTimeout call in the polling
flow to pass the existing ctx instead of context.Background(), ensuring
assessment cancellation and deadlines stop further S3 list requests.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Enterprise
Run ID: c70227e1-81b5-498b-9c22-08055a5b081b
📒 Files selected for processing (6)
api/v1alpha1/sourcecrawler_types.goapi/v1alpha1/zz_generated.deepcopy.goconfig/crd/bases/operator.dataverse.redhat.com_sourcecrawlers.yamlinternal/controller/sourcecrawler_controller.gopkg/unstructured/source.gotest/e2e/unstructured_test.go
🚧 Files skipped from review as they are similar to previous changes (5)
- api/v1alpha1/zz_generated.deepcopy.go
- config/crd/bases/operator.dataverse.redhat.com_sourcecrawlers.yaml
- api/v1alpha1/sourcecrawler_types.go
- pkg/unstructured/source.go
- internal/controller/sourcecrawler_controller.go
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes