Skip to content

fix: Use non-blocking IO in StorageObject - #651

Merged
adam-rl merged 1 commit into
mainfrom
adam/add-object-tar
Nov 19, 2025
Merged

fix: Use non-blocking IO in StorageObject#651
adam-rl merged 1 commit into
mainfrom
adam/add-object-tar

Conversation

@adam-rl

@adam-rl adam-rl commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

User description

Description

Uses the fsPromises nodejs API for file IO. fsPromises was added in Nodejs v10, so it is available everywhere.

Motivation

This would halt the node process inside an async method.

Testing

  • Existing tests pass

Checklist

  • PR title follows Conventional Commits format (feat: or feat(scope):)
  • Documentation updated (if needed)
  • Breaking changes documented (if applicable)

CodeAnt-AI Description

Prevent file uploads from blocking event loop

What Changed

  • File uploads now check file stats and read contents with asynchronous APIs so the process keeps handling other work while waiting for disk I/O
  • Failure messages still report why a file could not be accessed, matching prior behavior but without pausing the event loop

Impact

✅ Fewer blocked uploads
✅ Shorter upload stalls under load
✅ Clearer file access failure messages

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@adam-rl
adam-rl requested a review from dines-rl November 19, 2025 20:44
@codeant-ai

codeant-ai Bot commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Nov 19, 2025
@codeant-ai

codeant-ai Bot commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

CodeAnt AI finished reviewing your PR.

@github-actions

Copy link
Copy Markdown

✅ Object Smoke Tests & Coverage Report

Test Results

✅ All smoke tests passed

Coverage Results

Metric Coverage Required Status
Functions 100% 100%
Lines 87.27% - ℹ️
Branches 57.3% - ℹ️
Statements 86.74% - ℹ️

Coverage Requirement: 100% function coverage (all public methods must be called in smoke tests)

✅ All tests passed and all object methods are covered!

View detailed coverage report

Coverage reports are available in the workflow artifacts. Lines/branches/statements coverage is tracked but not required to be 100%.

📋 View workflow run

@adam-rl
adam-rl force-pushed the adam/add-object-tar branch from bed0f4b to 48a486d Compare November 19, 2025 20:52
@github-actions

Copy link
Copy Markdown

✅ Object Smoke Tests & Coverage Report

Test Results

✅ All smoke tests passed

Coverage Results

Metric Coverage Required Status
Functions 100% 100%
Lines 87.27% - ℹ️
Branches 57.3% - ℹ️
Statements 86.74% - ℹ️

Coverage Requirement: 100% function coverage (all public methods must be called in smoke tests)

✅ All tests passed and all object methods are covered!

View detailed coverage report

Coverage reports are available in the workflow artifacts. Lines/branches/statements coverage is tracked but not required to be 100%.

📋 View workflow run

@adam-rl
adam-rl merged commit 58ac02b into main Nov 19, 2025
8 checks passed
@adam-rl
adam-rl deleted the adam/add-object-tar branch November 19, 2025 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants