This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
Added warning message to the lockfile waiting routine. #958
Merged
Conversation
This file contains 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
waiting for something, we at least print a message to stderr about it. Hopefully will make situations like what is described in golang#947 obvious.
sdboyer
suggested changes
Aug 6, 2017
internal/gps/source_manager.go
Outdated
// TODO: #534 needs to be implemented to provide a better way to log warnings, | ||
// but until then we will just use stderr. | ||
// | ||
// #947 appears to be caused by some locking issue; as this is the most likely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
internal/gps/source_manager.go
Outdated
nowtime := time.Now() | ||
duration := nowtime.Sub(lasttime) | ||
|
||
if duration > 15*time.Second { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like this will only print after each 15 second window, rather than printing once initially and then again once every 15 seconds, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update the PR, as you're right.
Added spurious comment. Modified logic to display warning initially, and then every 15 seconds, when lockfile busy.
and we close the PR! |
And then open it again ... |
sdboyer
approved these changes
Aug 7, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool 👍
thanks! 🎉 |
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.
waiting for something, we at least print a message to stderr about it.
Hopefully will make situations like what is described in #947 obvious.
What does this do / why do we need it?
If dep has to wait for the sm.lock file, currently there's no feedback that its waiting. This provides feedback.
What should your reviewer look out for in this PR?
Do you need help or clarification on anything?
Which issue(s) does this PR fix?
may address #947