{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/wcf/issues/1519","repository_url":"https://api.github.com/repos/dotnet/wcf","labels_url":"https://api.github.com/repos/dotnet/wcf/issues/1519/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/wcf/issues/1519/comments","events_url":"https://api.github.com/repos/dotnet/wcf/issues/1519/events","html_url":"https://github.com/dotnet/wcf/pull/1519","id":176583108,"number":1519,"title":"Update PRService to deal with issues at merge","user":{"login":"iamjasonp","id":1616847,"avatar_url":"https://avatars.githubusercontent.com/u/1616847?v=3","gravatar_id":"","url":"https://api.github.com/users/iamjasonp","html_url":"https://github.com/iamjasonp","followers_url":"https://api.github.com/users/iamjasonp/followers","following_url":"https://api.github.com/users/iamjasonp/following{/other_user}","gists_url":"https://api.github.com/users/iamjasonp/gists{/gist_id}","starred_url":"https://api.github.com/users/iamjasonp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamjasonp/subscriptions","organizations_url":"https://api.github.com/users/iamjasonp/orgs","repos_url":"https://api.github.com/users/iamjasonp/repos","events_url":"https://api.github.com/users/iamjasonp/events{/privacy}","received_events_url":"https://api.github.com/users/iamjasonp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/wcf/labels/2%20-%20In%20Progress","name":"2 - In Progress","color":"cccccc"},{"url":"https://api.github.com/repos/dotnet/wcf/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-13T08:41:43Z","updated_at":"2016-09-13T15:49:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/wcf/pulls/1519","html_url":"https://github.com/dotnet/wcf/pull/1519","diff_url":"https://github.com/dotnet/wcf/pull/1519.diff","patch_url":"https://github.com/dotnet/wcf/pull/1519.patch"},"body":"The merge step to get master into a good state was causing an indefinite hang in\r\ncertain cases, which would result in 1) git.exe to hang and 2) the PRService to return\r\na 500 error and cause CI to fail intermittently\r\n\r\nThis change removes the merge step and replaces it with a force checkout, deletes all\r\nbranches, and then checks out to origin/master during the cleanup step. This results in\r\na clean repo as well as sidesteps the merge step causing the hang\r\n\r\nskip ci please\r\n\r\nFixes #1066"},"comment":{"url":"https://api.github.com/repos/dotnet/wcf/issues/comments/246727757","html_url":"https://github.com/dotnet/wcf/pull/1519#issuecomment-246727757","issue_url":"https://api.github.com/repos/dotnet/wcf/issues/1519","id":246727757,"user":{"login":"iamjasonp","id":1616847,"avatar_url":"https://avatars.githubusercontent.com/u/1616847?v=3","gravatar_id":"","url":"https://api.github.com/users/iamjasonp","html_url":"https://github.com/iamjasonp","followers_url":"https://api.github.com/users/iamjasonp/followers","following_url":"https://api.github.com/users/iamjasonp/following{/other_user}","gists_url":"https://api.github.com/users/iamjasonp/gists{/gist_id}","starred_url":"https://api.github.com/users/iamjasonp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamjasonp/subscriptions","organizations_url":"https://api.github.com/users/iamjasonp/orgs","repos_url":"https://api.github.com/users/iamjasonp/repos","events_url":"https://api.github.com/users/iamjasonp/events{/privacy}","received_events_url":"https://api.github.com/users/iamjasonp/received_events","type":"User","site_admin":false},"created_at":"2016-09-13T15:49:22Z","updated_at":"2016-09-13T15:49:22Z","body":"> do we know why the merge would hang periodically? Some kind of git bug? Prompting for UI? One reason I ask is that occasionally I do a merge, git complains about some kind of mismatch and recommends a reboot. It happens about once a month, and I wondered if it was a similar phenomenon.\r\n\r\nI spent a little time trying to figure this out - it's strange as it seems to only happen in the context of me launching this process via w3wp, and there seems not to be any kind of pop-up UI or other message that blocks. Basically if you observed the machine after hitting some repos (and it's different each time), then git.exe is just stuck; any subsequent requests to the same repo on a different git.exe process works fine though, which is why the problems show up as intermittent problems as CI (i.e., a retry will likely fix things)\r\n\r\nI've never seen any kind of \"inconsistency, please reboot\" message either - the worst I've ever seen in a message doing a merge is that the repo can't be fast-forwarded. \r\n\r\nRe: [comment](https://github.com/dotnet/wcf/pull/1519#discussion_r78551851):\r\n> could you help me understand exactly what git does in the new code you've added? \r\n\r\nYes, your description is correct. The advantage of this set of steps is that we end up with a pristine copy of the repo every time we run `CleanupBranches`, and all further checkouts, also run with `-f`, basically will again forcibly check out any tracked files to the correct commit in `origin` (i.e., dotnet/wcf) \r\n\r\nThe reason why we re-create a local master branch is because I've observed odd occasions where `checkout -f origin/master` followed by a bunch of commits, fetch, followed by `checkout -f origin/master` caused nothing to happen as the repo believed it's already on the correct branch. This _shouldn't_ be a problem given the `-f`, but this extra step helps us be doubly sure. \r\n\r\nAlso - I don't like using `pull` because should the local branch contain committed changes (not likely, but possible if someone is manually debugging something on said repo), a merge is automatically done and you end up with a messed up repo which no longer fast forwards. \r\n\r\n> So the very first time this runs (after someone did the first clone), it deletes the \"normal\" local master branch.\r\n\r\nActually, upon first clone, local master already tracks origin/master. Git is fairly intelligent about this - if you check out a branch which exists in your origin remote but not locally, it'll automatically set up a tracking branch. If you want to try this, make sure your local repo has no StressTests branch (git branch -D StressTests), and then `git checkout StressTests` - you'll see a message stating that the checkout created a new StressTests branch tracking origin/StressTests\r\n\r\nI spell it out in this case because, you know, scripts. Verbosity is good :smile: "}}
{"actor":{"display_login":"iamjasonp"}}