Maintenance updates and API version enhancements and enhanced error handling for the Blob and Queue services - #2675
Maintenance updates and API version enhancements and enhanced error handling for the Blob and Queue services#2675jainakanksha-msft wants to merge 18 commits into
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
ChangeLog.md:9
- Changelog entry is grammatically awkward (“Applied npm audit fix to updates…”). Consider rephrasing so the sentence reads clearly.
- Applied npm audit fix to updates across multiple dependencies to address security vulnerabilities and maintenance updates.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 7 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
ChangeLog.md:9
- Wording/grammar: “Applied npm audit fix to updates…” is awkward and reads like a partial sentence. Consider rephrasing to make the changelog entry clearer.
- Applied npm audit fix to updates across multiple dependencies to address security vulnerabilities and maintenance updates.
Fixes race condition where GC error during startup would attempt to close server while still in 'Starting' state, resulting in 'Cannot close server in status Starting' error. Changes: - Modified BlobServer and QueueServer error handlers to wait for server to reach 'Running' state before attempting close - Added timeout logic (up to 5 seconds) to wait for server startup completion - Gracefully handles case where server cannot transition to Running state - Allows Azurite to recover when encountering errors processing legacy persisted data from previous versions Fixes: #2672
- Added 4 test files with 10 total test cases covering: * Unit tests for GC error handler state machine (3 tests) * Blob server startup error recovery scenarios (3 tests) * Upgrade regression tests (3.35.0 to 3.36.0+) (2 tests) * Queue server startup error recovery scenarios (2 tests) - Tests validate: * Fresh start scenarios without persisted data * Graceful error handling during GC initialization in Starting state * Concurrent startup operations * Data persistence across upgrade scenarios * Multi-container and multi-blob scenarios * Recovery from timeout conditions - All 777 tests passing (including 10 new tests) - No regressions in existing tests - Full TypeScript compilation clean
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 19 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (3)
tests/blob/startupErrorRecovery.test.ts:97
- This test uses a fixed port (11001) which is heavily reused across the queue/blob test suites. Since Promise.race() doesn't cancel server.start(), late startup after the timeout can cause flaky port collisions. Prefer port 0 (ephemeral) here.
11001,
tests/blob/startupErrorRecovery.test.ts:156
- This test uses a fixed port (11002) which is also used by other test suites. If server.start() continues after a Promise.race() timeout, it can start listening later and collide with other tests. Prefer port 0 (ephemeral) here.
11002,
tests/queue/startupErrorRecovery.test.ts:89
- Even though 11003 is less commonly used, using a fixed port here still risks collisions if tests are ever run concurrently or if a timed-out server.start() continues in the background. Prefer port 0 (ephemeral) for stability.
11003,
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 20 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/blob/SqlBlobServer.ts:116
- In the GC critical error handler,
JSON.stringify(error)will usually log{}whenerroris anErrorinstance, losing the message/stack in Azurite logs (console gets it, but logger output becomes unhelpful). Log the error message + stack explicitly (and keep the console output if desired).
(error) => {
// tslint:disable-next-line:no-console
console.log(BEFORE_CLOSE_MESSAGE_GC_ERROR, error);
logger.info(BEFORE_CLOSE_MESSAGE_GC_ERROR + JSON.stringify(error));
This pull request introduces several dependency updates, service API version bumps, and important fixes for startup and shutdown reliability, as well as refactors to improve error handling and maintainability. The most significant changes are grouped below:
Dependency and API Version Updates:
npm audit fixand updated dependencies such asaxios,morgan, andesbuildto address security vulnerabilities and maintenance issues (package.json). [1] [2]2026-06-06, and added support for2026-04-06and2026-02-06for these endpoints (ChangeLog.md).Startup and Shutdown Reliability:
contentMD5formats and avoiding GC-triggeredclose()calls during server startup (ChangeLog.md).src/azurite.ts).Garbage Collection (GC) Critical Error Handling:
handleGCCriticalErrorClosehelper, providing more informative logs and robust shutdown on GC failures (src/blob/BlobServer.ts,src/blob/SqlBlobServer.ts). [1] [2]Code Quality and Maintainability:
LokiBlobMetadataStorefor improved readability and maintainability, including better async handling, consistent formatting, and clearer error conditions (src/blob/persistence/LokiBlobMetadataStore.ts). [1] [2] [3] [4]Documentation:
ChangeLog.mdto clearly document all major changes, fixes, and enhancements for this release. [1] [2]