This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Trim error messages read from errors.pb to avoid spaming Etcd. and Admin #141
Merged
Conversation
This file contains 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
return original | ||
} | ||
|
||
return original[0:maxLength/2] + original[len(original)-maxLength/2:] |
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.
since this is just a string can we do + "\n...\n" +
kumare3
reviewed
May 30, 2020
// Errors can be arbitrary long since they are written by containers/potentially 3rd party plugins. This ensures | ||
// the error message length will never be big enough to cause write failures to Etcd. or spam Admin DB with huge | ||
// objects. | ||
taskErr.Message = trimErrorMessage(taskErr.Message, t.cfg.MaxErrorMessageLength) |
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 think we should trim the error code too? It is a string too right
kumare3
approved these changes
May 30, 2020
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.
LGTM
eapolinario
pushed a commit
to eapolinario/flytepropeller
that referenced
this pull request
Aug 9, 2023
…min (flyteorg#141) Co-authored-by: Ketan Umare <kumare@lyft.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
TL;DR
Containers can generate arbitrary large errors.pb files, this change protects propeller from accidentally loading a large errors.pb, saving it to etcd. and sending it to admin.
Type
Are all requirements met?
Tracking Issue
flyteorg/flyte#334