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

update Consul vendor code so that catalog.ServiceMultipleTags can be #5151

Merged
merged 5 commits into from
Mar 12, 2019
Merged

update Consul vendor code so that catalog.ServiceMultipleTags can be #5151

merged 5 commits into from
Mar 12, 2019

Conversation

cstyan
Copy link
Member

@cstyan cstyan commented Jan 29, 2019

Fixes #4786

cc: @tariq1890 you've touched this code recently also @simonpasquier

Signed-off-by: Callum Styan [email protected]

@tariq1890
Copy link
Contributor

Hi @cstyan thanks for letting me know about this PR. I don't remember working on consul SD and If any of my changes caused a bug, I apologize. Could you let me know where exactly I made changes?

In any case, always happy to help review ^__^

@cstyan
Copy link
Member Author

cstyan commented Jan 29, 2019

🤦‍♂️ my bad @tariq1890, wrong person

cc: @iksaif

@iksaif
Copy link
Contributor

iksaif commented Jan 30, 2019

Good to know that consul now supports this :). Do we really want to break compatibility with the old config here?

@simonpasquier
Copy link
Member

I agree with @iksaif that although this SD mechanism isn't covered by the stability guarantees, it would be nicer to not break users immediately. Maybe support both tag: <string> and tags: [ <string>, ... ] (tags taking precedence), advertise tag as deprecated and remove it after a couple of releases.

@brian-brazil
Copy link
Contributor

I'd prefer to avoid cruft building up in the code. This is a fairly new feature, and should only be in use by advanced users.

@cstyan
Copy link
Member Author

cstyan commented Jan 31, 2019

@iksaif @simonpasquier good point

@brian-brazil it's unclear whether you're saying we shouldn't support searching for services with multiple tags, or just to not include tags and tag in the config

@brian-brazil
Copy link
Contributor

I'm saying don't include both.

@cstyan
Copy link
Member Author

cstyan commented Jan 31, 2019

Any opinions on how to proceed? I don't see a way to not break peoples old config for this change. We can't marshal a single string into an array of strings with go-yaml.

go-yaml/yaml#100

@brian-brazil
Copy link
Contributor

I'd suggest breaking it, as new features come along in SDs I'm not sure we should be spending too much effort on avoiding breakage. Particularly for more advanced features.

@cstyan
Copy link
Member Author

cstyan commented Feb 1, 2019

Fine by me. It's a pretty minor change required in users config files anyways.

@cstyan
Copy link
Member Author

cstyan commented Feb 6, 2019

Do we want to move ahead with these changes as is?

@simonpasquier
Copy link
Member

👍 as @brian-brazil is ok with the breaking change.

@cstyan
Copy link
Member Author

cstyan commented Feb 18, 2019

okay, seems no one is opposed

@cstyan
Copy link
Member Author

cstyan commented Feb 19, 2019

@brian-brazil bump

@cstyan
Copy link
Member Author

cstyan commented Feb 20, 2019

@brian-brazil @iksaif updated, a service must now contain all tags we're watching to be added to watched services.

cc: @ashepelev

discovery/consul/consul.go Outdated Show resolved Hide resolved
discovery/consul/consul_test.go Show resolved Hide resolved
@brian-brazil
Copy link
Contributor

👍

You've conflicts

@cstyan
Copy link
Member Author

cstyan commented Feb 28, 2019

@brian-brazil thanks, fixed.

I really need to check if there's a way to have GH notify me when there's a merge conflict.

Copy link
Member

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

LGTM. Re conflict notifications, I don't know of something like this but Prow (which we already use for prombench) has a needs-rebase plugin that puts a label on PRs with conflicts. This won't get you notified though.

@cstyan
Copy link
Member Author

cstyan commented Mar 11, 2019

@brian-brazil PTAL :)

@brian-brazil brian-brazil merged commit 83c46fd into prometheus:master Mar 12, 2019
@brian-brazil
Copy link
Contributor

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.

5 participants