Skip to content
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

sidecar: wait on ext labels before uploading #1287

Merged

Conversation

mjd95
Copy link
Contributor

@mjd95 mjd95 commented Jun 28, 2019

Addresses #1239 by adding a step that will force a wait on external labels before starting the shipper (when upload is enabled).

Note that the case of len(m.Labels()) is already checked in the sidecar when it initially syncs with Prom. However, we don't currently hard-fail if len(m.Labels())==0as we retry indefinitely. With this PR, we would now hard-fail in that case (after 2 minutes).

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Just not sure about number - otherwise perfect, thanks! 👍

At some point we will have nice healthyness checks we can control the readiness as well a bit more.

@@ -248,6 +248,17 @@ func runSidecar(
g.Add(func() error {
defer runutil.CloseWithLogOnErr(logger, bkt, "bucket client")

extLabelsTimeout := 2 * time.Minute
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if 2 min is ok, maybe worth to increase or expose via flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah fair point. I've increased it, quite a lot actually to 10 minutes. We should probably be conservative here (don't want to kill anything we shouldn't) and I'd rather avoid a flag if possible. Feel free to adjust the value though, I might be missing some context on startup times :)

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

LGTM.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants