Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix pubsub/poll race on provisioner job logs #2783

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

Merged
merged 3 commits into from
Jul 1, 2022

Conversation

spikecurtis
Copy link
Contributor

Fixes #2603

@spikecurtis spikecurtis requested a review from a team July 1, 2022 18:26
Signed-off-by: Spike Curtis <[email protected]>
Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

I like this EOF type thing 👍

Copy link
Contributor

@dwahler dwahler left a comment

Choose a reason for hiding this comment

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

Nice fix!

Signed-off-by: spikecurtis <[email protected]>
@spikecurtis spikecurtis merged commit b1e4cfe into main Jul 1, 2022
@spikecurtis spikecurtis deleted the spike/provisioner_job_logs_stream branch July 1, 2022 21:07

// provisionerJobLogsMessage is the message type published on the provisionerJobLogsChannel() channel
type provisionerJobLogsMessage struct {
EndOfLogs bool `json:"end_of_logs,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

This can be End instead for naming redundancy. Final may be more apt, chefs choice.

ketang pushed a commit that referenced this pull request Jul 3, 2022
* fix pubsub/poll race on provisioner job logs

Signed-off-by: Spike Curtis <[email protected]>

* only cancel on non-error

Signed-off-by: Spike Curtis <[email protected]>

* Improve logging & comments

Signed-off-by: spikecurtis <[email protected]>
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.

streaming job logs race condition means not all logs are returned / TestDelete flake
4 participants