AutoGPT
AutoGPT copied to clipboard
fix: truncate large data in logging and switch info logs to debug
π Hi there! This PR was automatically generated by Autofix π€
This fix was triggered by Nicholas Tindle.
Fixes AUTOGPT-SERVER-353. The issue was that: Oversized FillTextTemplateBlock output, included in untruncated JSON log fields, exceeded Google Cloud Logging's 256KB limit, causing an InvalidArgument.
- Added a
_truncate_large_datamethod to theLogMetadataclass to truncate large data structures (dicts, lists, strings) before logging to prevent exceeding log limits. - Implemented truncation for
info,warning,error,debug, andexceptionlogging methods. - Changed
log_metadata.infocalls tolog_metadata.debuginexecute_nodeto reduce verbosity of logs.
If you have any questions or feedback for the Sentry team about this fix, please email [email protected] with the Run ID: 21640.
This PR targets the master branch but does not come from dev or a hotfix/* branch.
Automatically setting the base branch to dev.
Deploy Preview for auto-gpt-docs canceled.
| Name | Link |
|---|---|
| Latest commit | 81c1fcbd689ceea0478eabc4e42ed6f5420d3f19 |
| Latest deploy log | https://app.netlify.com/sites/auto-gpt-docs/deploys/680c8c3389074a000839ce5d |
Here's the code health analysis summary for commits 9715ea5..81c1fcb. View details on DeepSourceΒ β.
Analysis Summary
| Analyzer | Status | Summary | Link |
|---|---|---|---|
| β Β Success | View CheckΒ β | ||
| β Β Success | β 1 occurence introduced π― 1 occurence resolved | View CheckΒ β |
π‘ If youβre a repository administrator, you can configure the quality gates from the settings.
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Conflicts have been resolved! π A maintainer will review the pull request shortly.
Deploy Preview for auto-gpt-docs-dev canceled.
| Name | Link |
|---|---|
| Latest commit | 81c1fcbd689ceea0478eabc4e42ed6f5420d3f19 |
| Latest deploy log | https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/680c8c33dd07720008f9977c |
This or something like it is very much needed! I keep running into this issue, whenever you use a files worth of data in an agent it's too big to be logging the entire thing.
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here.
PR Reviewer Guide π
Here are some key observations to aid the review process:
| β±οΈΒ Estimated effort to review: 2 π΅π΅βͺβͺβͺ |
| π§ͺΒ No relevant tests |
| πΒ No security concerns identified |
β‘Β Recommended focus areas for reviewTruncation Limit
|
Reopening this as the fix is still relevant for other levels of errors. It's come up a few times.
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.