-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: truncate long action messages to avoid overflow #2773
Conversation
Code Climate has analyzed commit 178068d and detected 0 issues on this pull request. View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving the PR since it's respecting the request, let's just directly truncate and avoid unnecessary body
re-attribution as a performance tweak.
More complex review
This solution may work sometimes but do not fix the CookieOverflow
problem. We're storing the messages on flash hash and the default cookie_store
has a limit of 4kb. When that limit is exceeded CookieOverflow
is raised.
def handle(**args)
succeed "🥑"*1600
warn "🥑"*1600
inform "🥑"*1600
error "🥑"*1600
return
end
With this truncate solution the above code snippet still breaking because the sum of the 4 truncated messages exceed the 4kb limit.
Sources:
Co-authored-by: Paul Bob <69730720+Paul-Bob@users.noreply.github.com>
This PR has been merged into Please check the release guide for more information. |
Description
Implement message truncation to 320 characters on action.
Fixes #2707
Checklist:
Screenshots & recording
Manual review steps
Manual reviewer: please leave a comment with output from the test if that's the case.