Skip to content

Conversation

@a-klos
Copy link
Member

@a-klos a-klos commented Feb 2, 2026

This pull request extends the document deletion functionality to allow more granular control over where a document is deleted (from the key-value store and/or from file storage). It updates both the abstract and concrete implementations of the document deleter, modifies usage sites to use the new parameter, and ensures that tests reflect these changes.

API and Implementation Changes:

  • The adelete_document method in both DocumentDeleter (abstract base class) and DefaultDocumentDeleter now accepts a new remove_from_storage boolean parameter, allowing callers to specify whether to remove the document from file storage in addition to the key-value store. [1] [2]
  • Docstrings for adelete_document are updated to document the new remove_from_storage parameter. [1] [2]
  • The implementation in DefaultDocumentDeleter now only deletes from file storage if remove_from_storage is True, and the file deletion is wrapped in a try/except block to handle errors gracefully.

Usage and Test Updates:

  • Calls to adelete_document in _handle_source_upload methods in both default_file_uploader.py and default_source_uploader.py are updated to explicitly set remove_from_storage=False when only a key-value store deletion is required. [1] [2]
  • Corresponding tests are updated to assert that adelete_document is called with the new remove_from_storage parameter. [1] [2]

** issue:
#224

- Added abstract class `FileService` for handling file I/O operations.
- Created concrete implementation `S3Service` for interacting with S3 storage.
- Introduced `S3Settings` class for managing S3 configuration.
- Updated `poetry.lock` files for dependencies related to AWS SDK (boto3, botocore, jmespath, s3transfer).
- Added file service interfaces in `rag_core_lib`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants