Repository navigation
Conversation
This branch has not been deployed
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.
Description
Preserve a staged add-resource source when a queue worker is interrupted during shutdown. QueueFS keeps the unacknowledged message for restart recovery, so the processor must not delete the input required by that replay.
The same
asyncio.CancelledErroris also used for explicit user cancellation. The handler now reads the durable task state and keeps cleanup only forCANCELLINGorCANCELLEDtasks. A missing or unreadable task snapshot defaults to preserving recovery artifacts.Human Involvement
Related Issue
Fixes #5887
Type of Change
Changes Made
Testing
Commands run:
uv run --offline --with pytest --with pytest-asyncio pytest -o addopts='' -q tests/parse/test_feishu_parser_api.py tests/service/test_resource_service_reserved_target_cleanup.py tests/service/test_task_queue_middleware.py git diff --check uvx --offline ruff check openviking/storage/queuefs/add_resource_processor.py tests/parse/test_feishu_parser_api.pyResult: 81 tests passed. Ruff and
git diff --checkpassed.Checklist
Screenshots (if applicable)
Not applicable.
Additional Notes
The pre-fix regression failed because
delete_tempwas awaited once after aRUNNINGtask receivedCancelledError. The fixed regression preserves that source. The explicitCANCELLINGcontrol still deletes it.ruff format --checkreports one existing longmonkeypatch.setattrline intests/parse/test_feishu_parser_api.py; this PR does not change that line. The additions in this PR need no formatting changes.