Skip to content

Commit 78a389f

Browse files
PR review feedback
1 parent b99970e commit 78a389f

File tree

1 file changed

+5
-0
lines changed
  • src/dstack/_internal/server/services/logs

1 file changed

+5
-0
lines changed

src/dstack/_internal/server/services/logs/aws.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ def _get_log_events_with_retry(
141141
stream,
142142
self.MAX_RETRIES,
143143
)
144+
# Only return the next token after exhausting retries if going descending—
145+
# AWS CloudWatch guarantees more logs in that case. In ascending mode,
146+
# next token is always returned, even if no logs remain.
147+
# So descending works reliably; ascending has limits if gaps are too large.
148+
# In the future, UI/CLI should handle retries, and we can return next token for ascending too.
144149
return [], next_token if request.descending else None
145150

146151
def _get_log_events(

0 commit comments

Comments
 (0)