feat(logging): improve error visibility and logging across application#96
Open
bencap wants to merge 1 commit intobugfix/bencap/protein-layer-generated-unnecessarilyfrom
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 introduces several improvements to error handling and logging throughout the codebase, especially for network/resource acquisition and alignment/mapping operations. It provides more detailed exception messages, standardized error reporting, and improved debugging information, making failures easier to diagnose and trace. Additionally, it introduces a custom database connection class with a longer timeout for UTA queries to reduce failures on long-running operations.
Error handling and logging improvements:
Added detailed logging with exception tracebacks to all major failure points, including BLAT parsing, external resource checks (UTA, SeqRepo, Gene Normalizer), and transcript/protein accession lookups, using
_logger.exceptionand improved error messages for better traceability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Standardized error message formatting in
ScoresetMappingandMappedScoreobjects to include both the exception type and message, improving output clarity for downstream consumers. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Resource/network acquisition robustness:
request_with_backoffutility to log transient failures and server errors at each retry, and to raise a customResourceAcquisitionError(with the last exception as the cause) after exhausting all retries. [1] [2] [3] [4] [5]Database connection improvements:
_TimeoutUtaDatabaseclass that increases the command timeout for UTA database queries from 60 seconds to 5 minutes, reducing failures on long-running range queries. Updated the main lookup code to use this subclass. [1] [2]Exception propagation and critical error logging:
These changes collectively make the codebase more robust, easier to debug, and more transparent in the face of errors and operational issues.