You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current state of error handling has a mixture of swallowed exceptions and exceptions that are not propagated up through the execution. While simply using logging is sufficient when running using CLI as a github action, it is problematic when running as a service at scale. It is difficult to answer and monitor "did my PR review execution work" as there is no single point of control for error management.
Error handling needs to be revamped and made consistent. When running using the CLI the application should terminate with a non-zero exit code if a fatal error occurred. When running as a server it can return a failed response (if run synchronously) or log a single clear message at the end of execution that it failed (if run asynchronously).
Errors would fall into 3 categories: Ignore, Warning, and Fatal. Examples:
.pr_agent is missing. This is a "nominal workflow" error that can be logged as debug and ignored
A file is too large to review. This could be a warning but processing can continue
AI parsing error. This is a deal breaker and should always get raised up to the root control logic.
The current state of error handling has a mixture of swallowed exceptions and exceptions that are not propagated up through the execution. While simply using logging is sufficient when running using CLI as a github action, it is problematic when running as a service at scale. It is difficult to answer and monitor "did my PR review execution work" as there is no single point of control for error management.
Error handling needs to be revamped and made consistent. When running using the CLI the application should terminate with a non-zero exit code if a fatal error occurred. When running as a server it can return a failed response (if run synchronously) or log a single clear message at the end of execution that it failed (if run asynchronously).
Errors would fall into 3 categories: Ignore, Warning, and Fatal. Examples:
Here is an incomplete list of things that should result in an overall failure:
AI prediction Failures -
https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/tools/pr_description.py#L95
https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/algo/utils.py#L435
https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/algo/utils.py#L564
PR suggestion - https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/tools/pr_code_suggestions.py#L399
Update comment - https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/tools/pr_code_suggestions.py#L264
File encoding - https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/algo/git_patch_processing.py#L29
The text was updated successfully, but these errors were encountered: