Skip to content

fix: missing ingest settings for individual files (backport of #2066)#2095

Merged
edwinjosechittilappilly merged 5 commits into
mainfrom
backport/2066-missing-ingest-settings
Jul 15, 2026
Merged

fix: missing ingest settings for individual files (backport of #2066)#2095
edwinjosechittilappilly merged 5 commits into
mainfrom
backport/2066-missing-ingest-settings

Conversation

@edwinjosechittilappilly

@edwinjosechittilappilly edwinjosechittilappilly commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Backports #2066 from release-saas-ga-0.6.2 to main.

Depends on #2094 (backport of #2050), #2093 (#2035), #2092 (#2025) — stacked because it touches shared-bucket-view.tsx/file-browser-dialog.tsx in the same regions. Merge order: #2092#2093#2094 → this PR.

Note: cherry-pick had conflicts in frontend/components/file-browser-dialog.tsx and frontend/components/connectors/shared-bucket-view.tsx against an unrelated onIngestSuccess feature already on main; resolved by keeping both additive changes (verified with tsc --noEmit, no errors in either file).

Test plan

  • CI passes
  • Manually verify ingest settings are applied when ingesting individual files via the file browser dialog

Summary by CodeRabbit

  • New Features

    • Added IBM Cloud Object Storage connector configuration and local-development enablement options.
    • Added support for shared/private document visibility during bucket uploads and synchronization.
    • Added a configurable shared-upload toggle in settings.
    • Added controls to show or hide advanced ingestion options.
    • Updated existing documents when their shared/private visibility changes.
  • Bug Fixes

    • Ensured shared-upload settings are consistently applied to new, changed, and existing files.
  • Tests

    • Added coverage for IBM COS availability, shared uploads, visibility reconciliation, and configuration toggles.

edwinjosechittilappilly and others added 4 commits July 14, 2026 14:38
…hare all" toggle (#2025)

* feature Flag Share all

* style: apply biome auto-fixes [skip ci]

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: COS shared-toggle owner not propagated on bucket sync + stale on dedupe skip

Two related bugs kept "Make documents available to all users" from actually
sharing documents:

1. connector_sync's bucket_filter branch (the path the COS connector UI's
   "Ingest N Buckets" button always hits) never forwarded body.shared to
   either of its two sync_specific_files calls (new files / changed files),
   so newly-ingested files always ended up privately owned regardless of the
   toggle.

2. ConnectorFileProcessor.process_item's duplicate-filename and
   unchanged-hash skip branches returned before resolve_shared_owner_fields()
   ever ran, so re-syncing a bucket whose files were already indexed left
   their ownership exactly as it was on the prior sync.

Fix (2) via _reconcile_shared_owner(): a metadata-only update_by_query
scoped to owner==self OR ownerless (same boundary as
delete_document_by_filename), called from both skip paths instead of
silently leaving stale ownership in place.

Also fixes two pre-existing test_shared_flag.py tests that had drifted from
connector_sync's current signature (missing request/session/rbac args).

* test: guard is_dev_ibm_cos_enabled's default against re-regressing to enabled

Found during review: is_dev_ibm_cos_enabled() previously defaulted
OPENRAG_DEV_IBM_COS to "true" when unset (now fixed to "false", matching
is_dev_azure_blob_enabled's pattern), which made the Enterprise/SaaS-only
IBM COS connector available in every deployment by default. The existing
tests only monkeypatched the function away, so they wouldn't have caught
this. Add a test asserting the unset-env-var default.

* style: ruff autofix (auto)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Root cause: FileBrowserDialog (the "Browse Files" individual-file picker) never read the "Make documents available to all users" toggle or ingest settings — it built its sync request with only selected_files, so shared silently defaulted to false on the backend. The whole-bucket ("folder") ingest path in SharedBucketView already did this correctly.

Changes (frontend-only, no backend changes needed — it already threads shared uniformly):
- frontend/components/file-browser-dialog.tsx: added showShared/ingestSettings props, and now includes settings and shared in the sync request body, mirroring the bucket-ingest path.
- frontend/components/connectors/shared-bucket-view.tsx: passes its existing showSharedToggle/ingestSettings state down into FileBrowserDialog.
@github-actions github-actions Bot added frontend 🟨 Issues related to the UI/UX backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) tests bug 🔴 Something isn't working. labels Jul 14, 2026
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds IBM COS development gating, exposes a shared-upload visibility setting, propagates shared ingest configuration through frontend and backend flows, and reconciles ownership metadata for existing indexed documents.

Changes

IBM COS shared upload

Layer / File(s) Summary
IBM COS availability configuration
.env.example, src/config/settings.py, enhancements/connectors/ibm_cos/connector.py, frontend/lib/brand.ts, tests/unit/connectors/test_ibm_cos_connector.py
Documents IBM COS credentials and adds development-only backend and frontend availability overrides with tests.
Shared-upload settings visibility
src/api/settings/*, frontend/app/api/queries/useGetSettingsQuery.ts, frontend/components/cloud-picker/ingest-settings.tsx, frontend/components/connectors/shared-bucket-view.tsx, tests/unit/config/test_show_shared_upload_toggle.py
Adds the shared-upload visibility setting and separates the shared toggle from advanced ingest controls.
Shared ingestion propagation
frontend/components/file-browser-dialog.tsx, frontend/components/connectors/shared-bucket-view.tsx, src/api/connectors.py, tests/unit/test_connector_sync_bucket_filter_shared.py, tests/unit/test_shared_flag.py
Passes ingest settings and the shared flag through file-browser and bucket-filter synchronization paths.
Existing document ownership reconciliation
src/models/processors.py, tests/unit/test_reconcile_shared_owner.py
Reconciles indexed owner fields for duplicate or unchanged connector files when shared state changes, while handling unavailable or failing OpenSearch clients.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SharedBucketView
  participant FileBrowserDialog
  participant connector_sync
  participant ConnectorFileProcessor
  participant OpenSearch
  SharedBucketView->>FileBrowserDialog: pass ingestSettings and shared
  FileBrowserDialog->>connector_sync: submit ingestion request
  connector_sync->>ConnectorFileProcessor: sync new and changed files with shared
  ConnectorFileProcessor->>OpenSearch: reconcile owner fields for duplicate or unchanged files
Loading

Possibly related issues

Possibly related PRs

Suggested labels: bug

Suggested reviewers: ricofurtado, mpawlow, lucaseduoli, phact

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 41.38% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing missing ingest settings for individual file uploads via the file browser dialog.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch backport/2066-missing-ingest-settings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 5e33c04.

@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 14, 2026

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
frontend/components/cloud-picker/ingest-settings.tsx (1)

232-246: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove commented-out code.

This Table Structure settings block is commented out. If this feature is no longer needed or is tracked elsewhere, consider removing the dead code to keep the file clean.

♻️ Proposed refactor
-            {/* <div className="flex gap-2 items-center justify-between">
-              <div>
-                <div className="text-sm font-semibold pb-2">Table Structure</div>
-                <div className="text-sm text-muted-foreground">
-                  Capture table structure during ingest.
-                </div>
-              </div>
-              <Switch
-                id="table-structure"
-                checked={currentSettings.tableStructure}
-                onCheckedChange={(checked) =>
-                  handleSettingsChange({ tableStructure: checked })
-                }
-              />
-            </div> */}
🤖 Prompt for 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.

In `@frontend/components/cloud-picker/ingest-settings.tsx` around lines 232 - 246,
Remove the commented-out Table Structure settings block from the component,
including its unused Switch and handler code, while leaving the surrounding
ingest settings UI unchanged.
🤖 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.

Nitpick comments:
In `@frontend/components/cloud-picker/ingest-settings.tsx`:
- Around line 232-246: Remove the commented-out Table Structure settings block
from the component, including its unused Switch and handler code, while leaving
the surrounding ingest settings UI unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d715287a-9278-4519-a6f6-3dff5d4c5aac

📥 Commits

Reviewing files that changed from the base of the PR and between 7fb88fd and cac63e5.

📒 Files selected for processing (17)
  • .env.example
  • enhancements/connectors/ibm_cos/connector.py
  • frontend/app/api/queries/useGetSettingsQuery.ts
  • frontend/components/cloud-picker/ingest-settings.tsx
  • frontend/components/connectors/shared-bucket-view.tsx
  • frontend/components/file-browser-dialog.tsx
  • frontend/lib/brand.ts
  • src/api/connectors.py
  • src/api/settings/endpoints.py
  • src/api/settings/models.py
  • src/config/settings.py
  • src/models/processors.py
  • tests/unit/config/test_show_shared_upload_toggle.py
  • tests/unit/connectors/test_ibm_cos_connector.py
  • tests/unit/test_connector_sync_bucket_filter_shared.py
  • tests/unit/test_reconcile_shared_owner.py
  • tests/unit/test_shared_flag.py

@mpawlow mpawlow left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review 1

  • ✅ Approved / LGTM 🚀
  • ℹ️ Verified: Cherry-pick conflict resolution: Confirmed onIngestSuccess is fully intact and coexists correctly alongside the new showShared/ingestSettings props in both the prop interface and the SharedBucketView call site (shared-bucket-view.tsx:346-364)

@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 15, 2026
@edwinjosechittilappilly
edwinjosechittilappilly merged commit 9e16a48 into main Jul 15, 2026
30 checks passed
@github-actions
github-actions Bot deleted the backport/2066-missing-ingest-settings branch July 15, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. frontend 🟨 Issues related to the UI/UX tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants