Conversation
Wrap the blob upload in a using block so the provider disposes BinaryFile.ContentStream after saving, matching the Database and FileSystem providers. Callers that assign a FileStream and then delete the temp file (SignatureDocumentTemplateService.UpdateDocumentStatus) were hitting IOException because the handle was still open, which broke the Process Signature Documents job. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Disposes Azure Blob Storage content streams after upload, preventing temporary-file locks during signature document processing.
Changes:
- Wraps upload and file-size retrieval in a
usingblock. - Aligns Azure behavior with other storage providers.
| File | Description |
|---|---|
Rock/Storage/Provider/AzureBlobStorage.cs |
Disposes ContentStream after Azure upload. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Sep 28, 2026
Author
|
Not merging to the fork branch. This commit is applied at build time instead via the Azure DevOps pipeline cherry-pick script, pinned to tag |
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.
Summary
Fork patch for ROCK-9041. After migrating file types to Rock core's
AzureBlobStorageprovider, the Process Signature Documents job failed with:UpdateLegacyProviderDocumentStatusassigns aFileStreamtoBinaryFile.ContentStream, saves, then callsFile.Delete()on the temp file. The Database and FileSystem providers disposeContentStreaminsideSaveContent, butAzureBlobStorage.SaveContentdid not, so the file handle stayed open and the delete threw.Change
Rock/Storage/Provider/AzureBlobStorage.cs→SaveContent(BinaryFile, out long?): wrap the upload inusing ( var stream = binaryFile.ContentStream )so the stream is disposed after upload, matching the contract of the other two providers.fileSizeis read inside the block before dispose.Testing
Rock.csprojbuilds clean (0 errors).App_Data\Cache\SignNoware removed, and regular uploads / profile photos / contribution statement PDFs still save to Azure.Follow-ups (not in this PR)
org.secc.SignNowWorkflowSignNowDownload(separate RockPlugins PR).🤖 Generated with Claude Code