-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Prevent deployment status string accumulation #5707
Conversation
Unit test forthcoming |
if errors.IsNotFound(err) { | ||
details = fmt.Sprintf("The image trigger for image stream tag %q will have no effect because image stream %q does not exist.", istag, name) | ||
if !errors.IsNotFound(err) { | ||
return "", existingDeployments, latestDeploymentExists, fmt.Errorf("Error while trying to get image stream %q: %v", name, err) |
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.
your capitalization is wrong on your errors
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.
Already fixed with my unit test commit
Rebuild the deployment config status from scratch each time to prevent accumulating the string with old messages. Separate the algorithm into two parts: one which builds up the context for the details, and one which renders the context into a string.
1cd20af
to
22e4597
Compare
Actually, hold on the merge - will this fetch all build configs every time there is an error now? |
In a loop? |
It USED to load build configs for every trigger every time it handled the config. Now it does it just once per handle, which is still too much. Hence the switch to a store in #5530 |
Introduced by #4941 |
Rebuild the deployment config status from scratch each time to prevent
accumulating the string with old messages. Separate the algorithm into
two parts: one which builds up the context for the details, and one which
renders the context into a string.
Fixes #5706