Paginate execution history with cursors, indexed in the logging service - #826
Open
bugy wants to merge 1 commit into
Open
Paginate execution history with cursors, indexed in the logging service#826bugy wants to merge 1 commit into
bugy wants to merge 1 commit into
Conversation
Alternative to #824. History and admin logs no longer load every entry at once, but the paging happens inside ExecutionLoggingService rather than in the request handler, and it is cursor-based rather than offset-based. _renew_files_cache already parsed every log file exactly once and discarded the result, while get_history_entries re-opened and re-parsed all of them on every request. Keeping what was already computed removes that re-parse: _ids_to_file_map (id -> filename) becomes _logs_by_id (id -> filename + summary), so there is one index rather than two. The summary omits command and output_format - command is the one unbounded field in a log header, and both are only needed by the detail view, which reads that single file anyway. The index is populated in start_logging, where those values are already in hand, so executions started in the current process are visible in history immediately. Paging uses a (sort value, id) cursor, which is stable while new executions are being appended; total is still returned, since it is just a counter on the filter pass. Search and sorting moved to the server along with paging - once only one page is shipped, a client-side search box silently searches the visible page only. GET history/execution_log/short now accepts limit, after, search, sort and order, and always answers {records, total, nextCursor}. The Status column is no longer sortable: it depends on live "is running" state, which the index does not hold.
Owner
Author
|
Hi @cpadlab inspired by your PR, I propse the similar functionality but implemented slightly differently It also moves search/sort functionality to BE, so we don't have to load everything on the FE. |
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.
No description provided.