chore: batch example #38419#38474
Merged
Merged
Conversation
Contributor
Pyrefly Type Coverage
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the backend summary indexing service to disable DocumentSegmentSummary rows using a bulk SQLAlchemy UPDATE, aligning with the linked issue’s goal of improving ORM update performance for batch operations.
Changes:
- Replaces per-row ORM attribute updates with a single bulk
UPDATEstatement when disabling summaries. - Adds the SQLAlchemy
updateimport to support the new bulk operation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-07-08 15:24:09.372046527 +0000
+++ /tmp/pyrefly_pr.txt 2026-07-08 15:24:00.154981076 +0000
@@ -8085,19 +8085,25 @@
ERROR Argument `SimpleNamespace` is not assignable to parameter `snippet` with type `CustomizedSnippet` in function `services.snippet_service.SnippetService.increment_use_count` [bad-argument-type]
--> tests/unit_tests/services/test_snippet_service.py:678:65
ERROR Missing required key `enable` for TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
- --> tests/unit_tests/services/test_summary_index_service.py:98:93
+ --> tests/unit_tests/services/test_summary_index_service.py:101:93
ERROR Key `a` is not defined in TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
- --> tests/unit_tests/services/test_summary_index_service.py:98:94
+ --> tests/unit_tests/services/test_summary_index_service.py:101:94
ERROR Missing required key `enable` for TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
- --> tests/unit_tests/services/test_summary_index_service.py:118:82
+ --> tests/unit_tests/services/test_summary_index_service.py:121:82
ERROR Key `a` is not defined in TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
- --> tests/unit_tests/services/test_summary_index_service.py:118:83
+ --> tests/unit_tests/services/test_summary_index_service.py:121:83
+ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
+ --> tests/unit_tests/services/test_summary_index_service.py:662:5
+ERROR Object of class `FromClause` has no attribute `insert` [missing-attribute]
+ --> tests/unit_tests/services/test_summary_index_service.py:686:28
+ERROR Argument `SimpleNamespace` is not assignable to parameter `dataset` with type `Dataset` in function `services.summary_index_service.SummaryIndexService.disable_summaries_for_segments` [bad-argument-type]
+ --> tests/unit_tests/services/test_summary_index_service.py:691:56
ERROR Object of class `NoneType` has no attribute `status` [missing-attribute]
- --> tests/unit_tests/services/test_summary_index_service.py:1024:12
+ --> tests/unit_tests/services/test_summary_index_service.py:1043:12
ERROR Object of class `NoneType` has no attribute `error` [missing-attribute]
- --> tests/unit_tests/services/test_summary_index_service.py:1025:39
+ --> tests/unit_tests/services/test_summary_index_service.py:1044:39
ERROR Object of class `NoneType` has no attribute `endswith` [missing-attribute]
- --> tests/unit_tests/services/test_summary_index_service.py:1086:12
+ --> tests/unit_tests/services/test_summary_index_service.py:1105:12
ERROR Cannot set item in `dict[str, int]` [unsupported-operation]
--> tests/unit_tests/services/test_variable_truncator.py:142:31
ERROR Argument `dict[str, dict[Unknown, Unknown]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
|
wylswz
previously approved these changes
Jul 8, 2026
wylswz
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Fixes #<issue number>.Summary
#38419
Screenshots
Checklist
make lint && make type-check(backend) andcd web && pnpm exec vp staged(frontend) to appease the lint gods