Skip to content

fix: show azure icon for in-progress ingestion tasks#2079

Closed
NishadA05 wants to merge 3 commits into
mainfrom
fix-azure-ingestion-icon
Closed

fix: show azure icon for in-progress ingestion tasks#2079
NishadA05 wants to merge 3 commits into
mainfrom
fix-azure-ingestion-icon

Conversation

@NishadA05

@NishadA05 NishadA05 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Fixes #2045

Summary

Fixes the Knowledge page icon shown for Azure Blob Storage files while ingestion is still in progress.

Previously, some in-progress Azure Blob Storage files showed the generic file icon until polling completed or the table/page refreshed.

This change propagates connector_type through the task flow so the frontend can resolve the correct connector icon for in-progress Knowledge table rows.

Updated flow:

  • Adds connector_type to task metadata
  • Sets connector_type when custom connector tasks are created
  • Includes connector_type in task API responses
  • Adds connector_type to the frontend task type
  • Seeds the frontend task connector map from task API data
  • Updates the Knowledge table state comment to reflect the new behavior

With this, Azure Blob Storage ingestion rows can display the Azure icon immediately instead of temporarily falling back to the generic/local icon.

Summary by CodeRabbit

  • New Features
    • Task data now includes connector type during creation and in returned task listings.
    • Newly created tasks inherit connector type from their processor; missing values default to the local connector.
  • Bug Fixes
    • Connector icons now render correctly immediately after a page refresh.
  • Other Changes
    • Prevents appending files to an existing task when the new files come from a different connector type.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5fc09bef-f8ea-4f7c-a095-cdebb3256533

📥 Commits

Reviewing files that changed from the base of the PR and between 5a8cce4 and c5b43b8.

📒 Files selected for processing (1)
  • frontend/contexts/task-context.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/contexts/task-context.tsx

Walkthrough

Task connector types now flow from backend upload tasks through task listings into frontend task state, where initial task loads seed connector metadata for connector-specific file icon inference.

Changes

Task connector type propagation

Layer / File(s) Summary
Backend connector type contract and serialization
src/models/tasks.py, src/services/task_service.py
UploadTask stores a default "local" connector type; custom task creation derives it from the processor, validates connector consistency when appending, and task listings include it in serialized task data.
Frontend task metadata seeding
frontend/app/api/queries/useGetTasksQuery.ts, frontend/contexts/task-context.tsx, frontend/lib/knowledge-table-state.ts
The frontend Task interface accepts connector_type, and initial task processing seeds connector metadata used by task file connector inference.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • langflow-ai/openrag#1887: Updates related frontend task and connector-type plumbing for knowledge-table icon selection.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main user-visible fix for Azure ingestion icons.
Linked Issues check ✅ Passed The changes propagate connector_type through backend and frontend so in-progress Azure tasks can render the Azure icon immediately.
Out of Scope Changes check ✅ Passed The diff stays focused on connector_type propagation and the Azure icon bug fix, with no clear unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 fix-azure-ingestion-icon

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 added frontend 🟨 Issues related to the UI/UX backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. labels Jul 13, 2026
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit c5b43b8.

@NishadA05
NishadA05 marked this pull request as ready for review July 14, 2026 17:31
@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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/services/task_service.py (1)

1233-1247: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Add connector_type to the legacy task serializers. get_task_status, get_task_status2, and get_all_tasks still back the live /tasks/{task_id}, /tasks, /v1/tasks/{task_id}, and /v1/tasks handlers, so callers of those endpoints still can’t derive connector-specific UI state from task metadata.

🤖 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 `@src/services/task_service.py` around lines 1233 - 1247, Update the legacy
task serializers used by get_task_status, get_task_status2, and get_all_tasks to
include the task’s connector_type in each serialized task record. Ensure the
live /tasks and /v1/tasks handlers receive this field while preserving the
existing serialization behavior for all other metadata.
🤖 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 `@src/services/task_service.py`:
- Around line 399-404: Update the existing_task_id append path in the task
service to validate the incoming processor connector_type against the existing
upload_task.connector_type before adding files. Reject mixed connector types
with the service’s established validation/error mechanism, while preserving
appends when the connector types match and ensuring the task-level metadata
cannot remain stale.

---

Outside diff comments:
In `@src/services/task_service.py`:
- Around line 1233-1247: Update the legacy task serializers used by
get_task_status, get_task_status2, and get_all_tasks to include the task’s
connector_type in each serialized task record. Ensure the live /tasks and
/v1/tasks handlers receive this field while preserving the existing
serialization behavior for all other metadata.
🪄 Autofix (Beta)

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 73661ae4-f9fa-4840-8fe5-37abdc4e2495

📥 Commits

Reviewing files that changed from the base of the PR and between 89769ff and 449f75b.

📒 Files selected for processing (5)
  • frontend/app/api/queries/useGetTasksQuery.ts
  • frontend/contexts/task-context.tsx
  • frontend/lib/knowledge-table-state.ts
  • src/models/tasks.py
  • src/services/task_service.py

Comment thread src/services/task_service.py
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 14, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 14, 2026
@NishadA05 NishadA05 closed this Jul 15, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Azure Blog Storage Connector: Icon for files currently being ingested are generic rather than Azure specific

1 participant