-
Notifications
You must be signed in to change notification settings - Fork 656
Add a log message to add_crate background job #2231
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
Conversation
See rust-lang#2226. This commit simply adds a log message before carrying out the final commit_and_push operation, which could fail if the Git host is experiencing an outage. Signed-off-by: Kristofer Rye <[email protected]> Tested-by: Kristofer Rye <[email protected]>
r? @jtgeibel (rust_highfive has picked a reviewer for you, use r? to override) |
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.
Would you mind tweaking the implementation as described below? It would be great to do the same thing with the yank/unyank message.
Finally, I suggest renaming commit_and_push
to commit_and_push_inner
, and replacing it with a wrapper function that prints a success message, or the error string. That way we will have a start and end timestamp in our logs for all index operations.
I think I may just try moving the |
This is passed directly into the commit_and_push method in the second case, but this aligns the practices between the two primary background job operations associated with the Git repository. Signed-off-by: Kristofer Rye <[email protected]>
One of the nice things about doing it this way is that it'll be possible to e.g. time the push operations now, allowing to figure out how much time is spent either preparing (adding/committing) or pushing, and to diagnose if operations are timing out or not. Signed-off-by: Kristofer Rye <[email protected]>
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.
Just a few more suggestions. Thanks for the updates so far @rye.
I liked having it for timing purposes, but it's a bit superfluous and (understandably) adds a lot of complexity, given the number of times that this callback will be run. Signed-off-by: Kristofer Rye <[email protected]>
Now, the wrapper prints the message before the commit and push begins, and proceeds to either print a success message or eprint the error before yielding it back. Signed-off-by: Kristofer Rye <[email protected]>
Signed-off-by: Kristofer Rye <[email protected]>
LGTM, thanks! @bors r+ |
📌 Commit c74d657 has been approved by |
☀️ Test successful - checks-travis |
Per #2226; is this sufficient to resolve that issue?
This PR simply adds a log message (
println!
) right before carrying out the finalcommit_and_push
operation, which could otherwise fail silently if the Git host is experiencing an outage.