This repository was archived by the owner on Jan 11, 2023. It is now read-only.
rollout: Publish rollout events to PubSub#109
Open
gvso wants to merge 4 commits intoGoogleCloudPlatform:mainfrom
gvso:pubsub-implementation
Open
rollout: Publish rollout events to PubSub#109gvso wants to merge 4 commits intoGoogleCloudPlatform:mainfrom gvso:pubsub-implementation
gvso wants to merge 4 commits intoGoogleCloudPlatform:mainfrom
gvso:pubsub-implementation
Conversation
This integrates the rollout package with the pubsub package to publish events after rollouts/rollbacks occur. It also adds a new flag `--notify-pubsub` to specify the PubSub topic. Signed-off-by: Getulio Valentin Sánchez <gvso@google.com>
gvso
commented
Aug 26, 2020
internal/rollout/rollout.go
Outdated
| } | ||
|
|
||
| // Wait for all messages to be sent (or to fail). | ||
| r.pubsubClient.Stop() |
Contributor
Author
There was a problem hiding this comment.
Since we're publishing one event per go routine (in each rollout process), we might just wait for the event to be published using PublishResult.Get. In this way, we can abstract the synchronous publishing from the user of the pubsub package
Contributor
There was a problem hiding this comment.
yeah that's a decent idea. I think that could be done with
waitFn, err := PublishMessage()
Signed-off-by: Getulio Valentin Sánchez <gvso@google.com>
ahmetb
reviewed
Aug 26, 2020
internal/rollout/rollout.go
Outdated
| return d, errors.Wrap(err, "failed to diagnose candidate's health") | ||
| } | ||
|
|
||
| func (r *Rollout) publish(svc *run.Service, diagnosis health.DiagnosisResult) error { |
Contributor
There was a problem hiding this comment.
better name like publishEvent
added 2 commits
August 26, 2020 15:13
Signed-off-by: Getulio Valentin Sánchez <gvso@google.com>
Signed-off-by: Getulio Valentin Sánchez <gvso@google.com>
This was
linked to
issues
Aug 26, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This integrates the rollout package with the pubsub package to publish events after rollouts/rollbacks occur. It also adds a new flag
--notify-pubsubto specify the PubSub topic.