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

Add gosimple linter #9590

Merged
merged 1 commit into from
Dec 9, 2020
Merged

Add gosimple linter #9590

merged 1 commit into from
Dec 9, 2020

Conversation

krishicks
Copy link
Contributor

No description provided.

@krishicks krishicks requested a review from tgross December 9, 2020 17:37
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

Mostly LGTM

@@ -65,14 +65,12 @@ func (m *PluginGroup) WaitForFirstFingerprint(ctx context.Context) (<-chan struc
go func() {
defer wg.Done()
logger.Debug("waiting on plugin manager initial fingerprint")
<-manager.WaitForFirstFingerprint(ctx)
Copy link
Member

Choose a reason for hiding this comment

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

Does WaitForFirstFingerprint have a side-effect? I'd have thought we'd want something more like:

select {
	case <- manager.WaitForFirstFingerprint(ctx):
		logger.Debug("finished plugin manager initial fingerprint")
	case <-ctx.Done():
		logger.Warn("timeout waiting for plugin manager to be ready")
}

Copy link
Contributor Author

@krishicks krishicks Dec 9, 2020

Choose a reason for hiding this comment

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

My goal here was not to change the behavior; are you saying you think it has changed, or that we should introduce this change?

Copy link
Member

Choose a reason for hiding this comment

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

I was saying that as long as we're touching this code we should introduce this change and fix what looks like a minor bug. But that's a good point... maybe that should be under separate PR so that it's not getting lost in this linter PR.

command/agent/http.go Show resolved Hide resolved
nomad/structs/structs.go Show resolved Hide resolved
@krishicks krishicks merged commit 85ed8dd into master Dec 9, 2020
@krishicks krishicks deleted the hicks/gosimple branch December 9, 2020 19:05
krishicks pushed a commit that referenced this pull request Dec 9, 2020
As pointed out by
[@tgross](#9590 (comment)),
prior to this change we would have been blocking until all managers
waited for first fingerprint rather than timing out as intended.
krishicks pushed a commit that referenced this pull request Dec 10, 2020
As pointed out by @tgross[1], prior to this change we would have been blocking
until all managers waited for first fingerprint rather than timing out as
intended.

1: #9590 (comment)
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

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 Dec 6, 2022
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