Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Conversation

@shua
Copy link

@shua shua commented Jul 20, 2021

What I did
Add check for 0 length containers list, and remove explicit error return for no running services (this is expected).

I'm not familiar enough with the internals of this program to know what far-reaching consequences changing updateProject and startService in this way will have, but I hope the automated tests in CI will catch anything untoward.

Related issue
fixes #1909

(not mandatory) A picture of a cute animal, if possible in relation with what you did
scaly snake in shape of 0

@shua
Copy link
Author

shua commented Jul 22, 2021

pinging @ndeloof @lorenrh @ulyssessouza @mat007 just because I see yous reviewed some other PRs recently. Is there anything I can do to make this easier to review?

Copy link
Collaborator

@ndeloof ndeloof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a explicit check on expected scale==0 to avoid silently ignore a potential error

// updateProject updates project after service converged, so dependent services relying on `service:xx` can refer to actual containers.
func (c *convergence) updateProject(project *types.Project, service string) {
containers := c.getObservedState(service)
if len(containers) == 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Signed-off-by: JD Lloret <[email protected]>
@shua shua requested a review from ndeloof July 23, 2021 15:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"panic: runtime error" when deploying a service with 0 replicas

2 participants