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

feat: tms readiness check bypass implementation #1920

Merged

Conversation

alexanderGalushka
Copy link
Contributor

What this PR does / why we need it:
Implements tms readiness check bypass for /ready endpoint handler

Which issue(s) this PR fixes:
Fixes #1919

Checklist

  • [ yes] Documentation added
  • [ no] Tests updated

@CLAassistant
Copy link

CLAassistant commented Apr 8, 2020

CLA assistant check
All committers have signed the CLA.

@alexanderGalushka
Copy link
Contributor Author

signed https://cla-assistant.io/grafana/loki?pullRequest=1920, status is still not signed yet

@codecov-io
Copy link

codecov-io commented Apr 8, 2020

Codecov Report

Merging #1920 into master will increase coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1920      +/-   ##
==========================================
+ Coverage   64.64%   64.75%   +0.11%     
==========================================
  Files         125      125              
  Lines        9534     9534              
==========================================
+ Hits         6163     6174      +11     
+ Misses       2939     2932       -7     
+ Partials      432      428       -4     
Impacted Files Coverage Δ
pkg/logql/evaluator.go 91.27% <0.00%> (+0.58%) ⬆️
pkg/promtail/targets/filetarget.go 70.55% <0.00%> (+1.84%) ⬆️
pkg/promtail/targets/tailer.go 78.40% <0.00%> (+6.81%) ⬆️

@alexanderGalushka
Copy link
Contributor Author

@cyriltovena can u please take a look ^^

@cyriltovena
Copy link
Contributor

cyriltovena commented Apr 8, 2020

I'm good with the approach but I don't like the current config/variable naming.

We should use something like health_check_targets which should default to true

@cyriltovena
Copy link
Contributor

Also can you try again the CLA ?

@alexanderGalushka
Copy link
Contributor Author

@cyriltovena sounds good, will make the requested changes and will try the cla again, thank you for looking into this PR that quick!

@alexanderGalushka
Copy link
Contributor Author

alexanderGalushka commented Apr 9, 2020

@cyriltovena addressed comments, for the CLA, it says "You have signed the CLA for grafana/loki" when I click Details, did it multiple times

@slim-bean
Copy link
Collaborator

hey @alexanderGalushka thanks for the PR!, usually CLA issues related to the email address used on the commits vs the email(s) you have configured in github. Your GH profile shows a gmail address however the last commit has a different email associated with it.

I think you likely need to add the other email to your GH profile, or re-author the last commit with your gmail (or push a new commit with your gmail) and the CLA will be happy!

Comment on lines 180 to 181
if s.healthCheckTarget {
if !s.tms.Ready() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry to snoop around here. You can do if s.healthCheckTarget && !s.tms.Ready(). You don't need two if statements.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@adityacs addressed

@alexanderGalushka
Copy link
Contributor Author

hey @alexanderGalushka thanks for the PR!, usually CLA issues related to the email address used on the commits vs the email(s) you have configured in github. Your GH profile shows a gmail address however the last commit has a different email associated with it.

I think you likely need to add the other email to your GH profile, or re-author the last commit with your gmail (or push a new commit with your gmail) and the CLA will be happy!

@slim-bean last commit is signed with my gmail, when you follow the link it says signed, although in the review it reports as not signed.

@slim-bean
Copy link
Collaborator

hrm, would you be able to squash your 3 commits into 1 and force push?

@alexanderGalushka
Copy link
Contributor Author

hrm, would you be able to squash your 3 commits into 1 and force push?

yeah, was thinking to do that :)

@alexanderGalushka
Copy link
Contributor Author

@slim-bean squashed and forced pushed

@slim-bean
Copy link
Collaborator

unfortunately when I look at the log for that commit it is showing the non gmail email

@alexanderGalushka
Copy link
Contributor Author

@slim-bean this half baked cla bot doesn't really spark the joy :(

@alexanderGalushka
Copy link
Contributor Author

@slim-bean is it good to be merged as is?

@slim-bean
Copy link
Collaborator

can you try ammending your last commit to fix the email to use an email address you have linked to your github account?:

git commit --amend --author="John Doe <john@doe.org>"

fix: renamed flag to health_check_target, default to true

fix: flattened nested if statements
@alexanderGalushka
Copy link
Contributor Author

@slim-bean I was doing exactly that right at the moment you've suggested to try amend, it's green now, thank you for being patient and thank you for your support :)

@slim-bean
Copy link
Collaborator

wooHooo! @alexanderGalushka thanks for your patience as well. It's not too often when the CLA bot fights back but when it does it seems to go about as well as this :/ it's annoying it wouldn't accept the added commit after you updated the email. Oh well, glad we got it sorted out!

Copy link
Collaborator

@slim-bean slim-bean left a comment

Choose a reason for hiding this comment

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

LGTM

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

Successfully merging this pull request may close these issues.

flag to bypass readiness check for target manager for /ready endpoint
6 participants