fix(tail-log): reconnect stream after EOF so CLI survives log rotation#725
Merged
angi-acs merged 1 commit intoJun 16, 2026
Merged
Conversation
001d34e to
36e75d9
Compare
…fixes adobe#724 Replaces the single executeWithRetries call with a while(true) reconnect loop. When the log stream ends at midnight UTC (daily log rotation), the CLI now waits 2 seconds and reconnects instead of exiting silently. Transient errors without error.code (404, network drops, Azure SAS expiry) are swallowed and retried. Fatal CLI-coded errors (MAX_RETRY_REACHED, NO_IMS_CONTEXT) are still re-thrown immediately. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
36e75d9 to
240d070
Compare
angi-acs
approved these changes
Jun 16, 2026
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
aio cloudmanager:tail-logwas exiting silently at midnight UTC when AEM Cloud Manager rotates its daily log files. The stream ends with a normal EOF — no error — so the CLI interpreted it as success and terminated.Root cause:
executeWithRetriesonly retried on HTTP 401/403. A normal stream EOF resolved the promise with no error, so the process exited.Fix: A
while(true)reconnect loop inTailLog.tailLog():error.code(404, Azure SAS expiry, network drop) → swallow, wait 2 s, reconnectMAX_RETRY_REACHED,NO_IMS_CONTEXT) → re-throw immediatelyCloses: #724
🤖 Generated with Claude Code