Skip to content

Conversation

@aonnikov
Copy link
Member

  1. Validate uploaded file size after upload
  2. Cache uploaded files only after successful upload

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
@aonnikov aonnikov requested review from Copilot and lexiv0re August 15, 2025 05:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes issues with the datalake upload process by implementing validation of uploaded file sizes and ensuring files are only cached after successful upload. The changes address reliability concerns by verifying upload integrity before marking files as successfully stored.

  • Modified S3 bucket interface to return void instead of S3Object for put operations
  • Added post-upload validation to verify file size matches expected size
  • Moved cache operations to occur only after successful upload validation

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
services/datalake/pod-datalake/src/s3/types.ts Changed put method return type from S3Object to void
services/datalake/pod-datalake/src/s3/bucket.ts Updated put implementation to return void and removed S3Object construction
services/datalake/pod-datalake/src/handlers/blob.ts Improved error handling for file stream creation
services/datalake/pod-datalake/src/datalake/datalake.ts Added upload validation and moved caching after successful upload

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
@aonnikov aonnikov merged commit ec93872 into develop Aug 15, 2025
25 of 26 checks passed
@aonnikov aonnikov deleted the fix-datalake-verify-upload branch August 15, 2025 08:52
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