[UI] Query logs using descending#2915
Merged
peterschmidt85 merged 12 commits intomasterfrom Jul 21, 2025
Merged
Conversation
- [x] Allowed `descending` in `PollLogsRequest` - [x] Supported `descending` in `FileLogStorage` (implemented an algorithm that reads lines from the end of t he file) - [x] Updated `CloudWatchLogStorage` to support `MAX_RETRIES` (to skip empty pages)
Contributor
Author
|
Pending changes from @olgenn:
|
olgenn
approved these changes
Jul 19, 2025
r4victor
reviewed
Jul 21, 2025
r4victor
reviewed
Jul 21, 2025
r4victor
reviewed
Jul 21, 2025
r4victor
reviewed
Jul 21, 2025
Collaborator
You mean not used by the UI? Still used by the CLI and the API default t. |
Re-implemented to make `_read_lines_reversed` fast regardless of `start_offset`
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.
Fixes #2892
This includes:
descendingin pull log requestsdescendinginFileLogStorage(this implements reading of lines from a file in a reversed order)FileLogStorage._read_lines_reversedfast regardless ofstart_offsetPlus, in addition to #2892, this PR updates
CloudWatchLogStorageto implement retrying when it fetches empty log pages. The maximum number of retries is set to10. In caseascendingis used, after hitting the limitCloudWatchLogStoragesetsnext_tokentoNone(meaning no more logs). This is not ideal but given that ascending mode is not going to be used anymore, we can live with that for now. Ifdescendingis used,CloudWatchLogStoragereturnsnext_tokenproperly. (allowing the UI or CLI implement the logic of trying again).Out of the scope:
dstack logto usedescendingand support--start