Skip to content

RE1-T115 S3 fixes#353

Merged
ucswift merged 1 commit intomasterfrom
develop
May 2, 2026
Merged

RE1-T115 S3 fixes#353
ucswift merged 1 commit intomasterfrom
develop

Conversation

@ucswift
Copy link
Copy Markdown
Member

@ucswift ucswift commented May 2, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of malformed S3 metadata responses with automatic fallback to alternative upload method
  • Tests

    • Added test coverage for S3 metadata response parsing failure scenarios

@request-info
Copy link
Copy Markdown

request-info Bot commented May 2, 2026

Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details?

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 476d205d-a392-4082-b6d9-0f6e3ba9e8fb

📥 Commits

Reviewing files that changed from the base of the PR and between 0214160 and 6b17067.

📒 Files selected for processing (2)
  • Tests/Resgrid.Tests/Web/Tts/S3StorageServiceTests.cs
  • Web/Resgrid.Web.Tts/Services/S3StorageService.cs

📝 Walkthrough

Walkthrough

A new test case validates that S3StorageService falls back to presigned PUT upload when S3 metadata response parsing fails with FormatException. A corresponding catch block was added to handle FormatException during metadata retrieval in the upload verification flow.

Changes

S3 Malformed Metadata Fallback Handling

Layer / File(s) Summary
Core Exception Handling
Web/Resgrid.Web.Tts/Services/S3StorageService.cs
WasUploadPersistedAsync adds a catch (FormatException ex) block to log a warning when metadata response parsing fails and fallback to presigned PUT by returning false.
Test Coverage
Tests/Resgrid.Tests/Web/Tts/S3StorageServiceTests.cs
New test upload_async_should_fall_back_to_presigned_put_when_metadata_response_is_malformed verifies that UploadAsync executes a presigned PUT with correct payload and headers when GetObjectMetadataAsync throws FormatException.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • RE1-T115 S3 api fix #352 — Modifies S3StorageService's malformed metadata/PUT response handling to implement presigned PUT fallback, directly aligned with this PR's error handling and test validation.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'RE1-T115 S3 fixes' references a ticket identifier and uses vague terminology ('fixes') that does not clearly communicate the specific nature of the changes. Consider revising to a more descriptive title such as 'Handle malformed S3 metadata responses by falling back to presigned PUT' to clearly communicate the technical change being made.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@ucswift
Copy link
Copy Markdown
Member Author

ucswift commented May 2, 2026

Approve

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

This PR is approved.

@ucswift ucswift merged commit b4b9e37 into master May 2, 2026
18 of 19 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request May 3, 2026
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.

1 participant