Conversation
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.
This pull request refactors the
ActivityLoggerclass to improve the reliability and concurrency safety of bot activity logging. The main change is switching from a single log file to a per-run sidecar file approach, ensuring that concurrent workflow jobs do not overwrite each other's entries. The combined log is now rebuilt from all sidecars and historical entries, with robust deduplication and error handling. Several new methods have been introduced, and the logging workflow has been updated accordingly.Logging architecture overhaul:
ActivityLoggerclass and docstring,__init__,log_fix) [1] [2] [3]ActivityLoggerfor sidecar file prefixes and URIs, and updated initialization to support the new architecture. (__init__) [1] [2]New GCS utility methods:
_gcs_upload,_gcs_read_json,_write_entry_sidecar,_list_entry_sidecars, and_rebuild_combined_logmethods for handling file uploads, downloads, listing, and rebuilding the combined log from sidecars.Logging workflow update:
log_fixto write activity to a sidecar file first, then rebuild the combined log from all sidecars. The method now returns success if the sidecar write succeeds, regardless of combined log rebuild status. [1] [2] [3]Error handling improvements: