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

Support canary tags for services in Consul #4200

Merged
merged 3 commits into from
Apr 26, 2018

Conversation

schmichael
Copy link
Member

@schmichael schmichael commented Apr 23, 2018

Also refactor Consul ServiceClient to take a struct instead of a massive
set of arguments. Meant updating a lot of code but it should be far
easier to extend in the future as you will only need to update a single
struct instead of every single call site.

Adds an e2e test for canary tags.

Fixes #2920

@schmichael schmichael requested a review from dadgar April 23, 2018 23:39
@schmichael schmichael force-pushed the f-canary-tags branch 4 times, most recently from e357d1e to 6347cee Compare April 24, 2018 00:31
Also refactor Consul ServiceClient to take a struct instead of a massive
set of arguments. Meant updating a lot of code but it should be far
easier to extend in the future as you will only need to update a single
struct instead of every single call site.

Adds an e2e test for canary tags.
Guard against Canary being set to false at the same time as an
allocation is being stopped: this could cause RemoveTask to be called
with the wrong Canary value and leaking a service.

Deleting both Canary values is the safest route.
@@ -3814,6 +3814,11 @@ func (s *Service) Hash(allocID, taskName string) string {
io.WriteString(h, tag)
}

// Vary ID on whether or not CanaryTags will be used
if canary {
h.Write([]byte{'1'})
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about writing "Canary"?

@schmichael schmichael merged commit eca22be into f-deployment-improvements Apr 26, 2018
@schmichael schmichael deleted the f-canary-tags branch April 26, 2018 17:43
@github-actions
Copy link

github-actions bot commented Mar 5, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 5, 2023
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.

2 participants