Skip to content

fix: add online_drive to DataSourceType on lts/1.13.x - #45368

Merged
wylswz merged 1 commit into
lts/1.13.xfrom
fix/eng-1399-online-drive-datasource-type-lts-1.13
Nov 3, 2026
Merged

wylswz merged 1 commit into
lts/1.13.xfrom
fix/eng-1399-online-drive-datasource-type-lts-1.13

Conversation

@zhangx1n

@zhangx1n zhangx1n commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Backport #34440 to LTS 1.13.x.

Adding files from an online_drive datasource (e.g. SharePoint, OneDrive) in a published Knowledge Pipeline fails with a 500, because DataSourceType has no ONLINE_DRIVE member and the documents.data_source_type enum check rejects the insert:

ValueError: <DatasourceProviderType.ONLINE_DRIVE: 'online_drive'> is not a valid DataSourceType

The fix was cherry-picked to the hotfix/1.13.3-fix* branches but never reached lts/1.13.x. No migration is needed; the column is VARCHAR and the enum is validated in the application layer.

Source: #34440
Source commit: 993a301

Verification

  • Cherry-pick applies cleanly on lts/1.13.x.
  • pytest tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py: 20 passed. Without the enum change, the new test fails with the error above.
  • ruff check and ruff format --check pass on the changed files.

From Amp

@zhangx1n
zhangx1n requested a review from a team November 3, 2026 02:53
@github-actions github-actions Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 39.04% 39.04% -0.00%
Strict coverage 38.43% 38.43% -0.00%
Typed symbols 19,910 19,910 0
Untyped symbols 31,581 31,583 +2
Modules 2864 2864 0

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-11-03 02:54:40.181703917 +0000
+++ /tmp/pyrefly_pr.txt	2026-11-03 02:54:33.661746925 +0000
@@ -2853,7 +2853,7 @@
 ERROR Cannot index into `str` [bad-index]
    --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generate_response_converter.py:111:12
 ERROR Class `PipelineRunner` has no class attribute `call_args` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py:340:12
+   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py:341:12
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `RagPipelineGenerateEntity` in function `core.app.apps.pipeline.pipeline_runner.PipelineRunner.__init__` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_runner.py:65:37
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `RagPipelineGenerateEntity` in function `core.app.apps.pipeline.pipeline_runner.PipelineRunner.__init__` [bad-argument-type]

@wylswz
wylswz merged commit 106e7f5 into lts/1.13.x Nov 3, 2026
6 checks passed
@wylswz
wylswz deleted the fix/eng-1399-online-drive-datasource-type-lts-1.13 branch November 3, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants