[CMGR-76557] fix: reconnect tail-log stream after EOF or transient error#723
Merged
angi-acs merged 1 commit intoJun 12, 2026
Merged
Conversation
Adds a resilient while-loop in TailLog.tailLog() that re-invokes sdk.tailLog() after normal stream end (midnight UTC log rotation) or swallowable transient errors (404, network drops, Azure SAS expiry). Fatal CLI-coded errors (MAX_RETRY_REACHED, NO_IMS_CONTEXT) are re-thrown immediately. Reconnect delay is 2 seconds. Fixes: https://jira.corp.adobe.com/browse/CMGR-76557 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
angi-acs
approved these changes
Jun 12, 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
while(true)reconnect loop inTailLog.tailLog()so the CLI never exits when the log stream endserror.code: 404, network drops, Azure SAS URL expiry) and retries after a 2-second delayerror.codeset:MAX_RETRY_REACHED,NO_IMS_CONTEXT) so auth and config failures still surface correctlyJira: https://jira.corp.adobe.com/browse/CMGR-76557
Root cause:
executeWithRetriesonly retried on HTTP 401/403. EOF at midnight log rotation resolved normally — no error, no retry, silent CLI exit.Test plan
tail-log - reconnects after normal stream end— verifiessdk.tailLogcalled ≥2 times after EOFtail-log - retries silently on transient non-auth error— verifies 404 is swallowed and CLI stays alivetail-log - config— updated to not awaitrunResult(loop never terminates); all 5 assertions still passtail-log - should retry 5 times and throw error— unchanged,MAX_RETRY_REACHED(haserror.code) still re-thrown correctlyaio cloudmanager:tail-logbefore midnight UTC and confirm stream continues through rotation🤖 Generated with Claude Code