Conversation
Contributor
Author
|
Closing in favor of #215 |
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.
get_job_log wasn't returned AWS CloudWatch logs. There were a few issues identified by Claude:
Performance Issues
Synchronous Blocking I/O
The get_log_events() function makes synchronous boto3 calls to CloudWatch Logs, which blocks the entire request thread while waiting for AWS responses.
Fetching All Logs at Once
Lines 219-234 in services.py fetch ALL log events in a while loop until exhausted. For large jobs with millions of log lines, this causes:
Memory accumulation (all logs stored in events list)
Extended processing time (multiple AWS API calls in sequence)
Gateway timeout before response can be sent
Inefficient boto3 Client Creation
Line 221-224 creates a new boto3 client inside the while loop on every iteration, adding unnecessary overhead.
No Pagination Support
The API endpoint doesn't support pagination - clients must wait for the entire log file, even if they only need recent entries.
No Caching
Logs for completed jobs never change, but they're fetched from CloudWatch every time.
@EricSDavis - I ended up implementing a StreamingResponse which seems to be the best solution here, however the FrontEnd still isn't displaying anything.