Thread overview | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
May 14, 2011 [phobos] bad git usage? | ||||
---|---|---|---|---|
| ||||
I don't know who's done what to piss off git, but 2 builds in the last 4 days have failed due to bad interactions with github. The auto-tester maintains a pristine tree that it just pulls into each cycle to get current code. It _should_ be a simple fast-forward merge update every single time. But twice it hasn't been: Just now: >From git://github.com/D-Programming-Language/phobos + d30bfde...c5cd017 HEAD -> origin/HEAD (forced update) error: Ref refs/remotes/origin/master is at c5cd017921bb78644f8d130dc19c0df9e5b03bb5 but expected d30bfdea40e768519aaa77170ee9e9697cbf685e ! d30bfde..fc5f620 master -> origin/master (unable to update local ref) The last time: >From git://github.com/D-Programming-Language/phobos + b64d9f2...c5cd017 HEAD -> origin/HEAD (forced update) error: Ref refs/remotes/origin/master is at c5cd017921bb78644f8d130dc19c0df9e5b03bb5 but expected b64d9f27c23dec08865d9eb624bf0d22b18e5637 ! b64d9f2..d30bfde master -> origin/master (unable to update local ref) It looks like HEAD and master are out of sync, and from what I understand, that shouldn't happen. The problematic commit: https://github.com/D-Programming-Language/phobos/commit/c5cd017921bb78644f8d130dc19c0df9e5b03bb5 But I'm not sure what's problematic about it. Thoughts? Thanks, Brad |
May 14, 2011 [phobos] bad git usage? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts |
On 5/14/2011 5:26 PM, Brad Roberts wrote:
> Thoughts?
>
I keep trying to think, but nothing's happening.
|
May 14, 2011 [phobos] bad git usage? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | Le 2011-05-14 ? 20:26, Brad Roberts a ?crit : > I don't know who's done what to piss off git, but 2 builds in the last 4 days have failed due to bad interactions with github. The auto-tester maintains a pristine tree that it just pulls into each cycle to get current code. It _should_ be a simple fast-forward merge update every single time. But twice it hasn't been: > > Just now: > > From git://github.com/D-Programming-Language/phobos > + d30bfde...c5cd017 HEAD -> origin/HEAD (forced update) > error: Ref refs/remotes/origin/master is at c5cd017921bb78644f8d130dc19c0df9e5b03bb5 but expected > d30bfdea40e768519aaa77170ee9e9697cbf685e > ! d30bfde..fc5f620 master -> origin/master (unable to update local ref) > > The last time: > > From git://github.com/D-Programming-Language/phobos > + b64d9f2...c5cd017 HEAD -> origin/HEAD (forced update) > error: Ref refs/remotes/origin/master is at c5cd017921bb78644f8d130dc19c0df9e5b03bb5 but expected > b64d9f27c23dec08865d9eb624bf0d22b18e5637 > ! b64d9f2..d30bfde master -> origin/master (unable to update local ref) > > It looks like HEAD and master are out of sync, and from what I understand, that shouldn't happen. > > The problematic commit: > https://github.com/D-Programming-Language/phobos/commit/c5cd017921bb78644f8d130dc19c0df9e5b03bb5 > > But I'm not sure what's problematic about it. > > Thoughts? Generally this kind of message happen when someone pushed a history rewrite (pushing a commit that is not a child of the existing commit, which requires the push command to have a -f (force) switch). Now, perhaps the autotester should do a "git reset --hard origin/master" instead of doing a pull (which implicitly does a merge). It would avoid this kind of issue, although it's still not a very good thing to rewrite history in a public repository. -- Michel Fortin michel.fortin at michelf.com http://michelf.com/ |
May 14, 2011 [phobos] bad git usage? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Michel Fortin | On 5/14/2011 5:59 PM, Michel Fortin wrote:
> Le 2011-05-14 ? 20:26, Brad Roberts a ?crit :
>
>> I don't know who's done what to piss off git, but 2 builds in the last 4 days have failed due to bad interactions with github. The auto-tester maintains a pristine tree that it just pulls into each cycle to get current code. It _should_ be a simple fast-forward merge update every single time. But twice it hasn't been:
>>
>> Just now:
>>
>> From git://github.com/D-Programming-Language/phobos
>> + d30bfde...c5cd017 HEAD -> origin/HEAD (forced update)
>> error: Ref refs/remotes/origin/master is at c5cd017921bb78644f8d130dc19c0df9e5b03bb5 but expected
>> d30bfdea40e768519aaa77170ee9e9697cbf685e
>> ! d30bfde..fc5f620 master -> origin/master (unable to update local ref)
>>
>> The last time:
>>
>> From git://github.com/D-Programming-Language/phobos
>> + b64d9f2...c5cd017 HEAD -> origin/HEAD (forced update)
>> error: Ref refs/remotes/origin/master is at c5cd017921bb78644f8d130dc19c0df9e5b03bb5 but expected
>> b64d9f27c23dec08865d9eb624bf0d22b18e5637
>> ! b64d9f2..d30bfde master -> origin/master (unable to update local ref)
>>
>> It looks like HEAD and master are out of sync, and from what I understand, that shouldn't happen.
>>
>> The problematic commit:
>> https://github.com/D-Programming-Language/phobos/commit/c5cd017921bb78644f8d130dc19c0df9e5b03bb5
>>
>> But I'm not sure what's problematic about it.
>>
>> Thoughts?
>
> Generally this kind of message happen when someone pushed a history rewrite (pushing a commit that is not a child of the existing commit, which requires the push command to have a -f (force) switch).
>
> Now, perhaps the autotester should do a "git reset --hard origin/master" instead of doing a pull (which implicitly does a merge). It would avoid this kind of issue, although it's still not a very good thing to rewrite history in a public repository.
>
I went to each auto-tester and did:
git reset --hard origin/master
git pull origin
That seems to have brought them all up to the current commit. We'll see if the problem crops up again.
Looking at the phobos network on github, I see that HEAD is specifically tagged to a specific, non-most-recent, commit, and is listed as a branch. Neither druntime nor dmd have those properties.
|
May 14, 2011 [phobos] bad git usage? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | Le 2011-05-14 ? 21:09, Brad Roberts a ?crit : > I went to each auto-tester and did: > > git reset --hard origin/master > git pull origin > > That seems to have brought them all up to the current commit. We'll see if the problem crops up again. If you don't want to see it ever again, replace the pull in the autotester with: git fetch origin git reset --hard origin/master This way you'll have no merge and therefore no conflict. > Looking at the phobos network on github, I see that HEAD is specifically tagged to a specific, non-most-recent, commit, and is listed as a branch. Neither druntime nor dmd have those properties. HEAD is not a branch (normally). Has someone created and pushed a branch called HEAD to mess with our brains? I don't think it causes any problem (the real HEAD and the HEAD branch are distinct), but it's rather misleading. Someone with commit access to the shared repository should do "git push origin :HEAD" to remove that branch. -- Michel Fortin michel.fortin at michelf.com http://michelf.com/ |
May 14, 2011 [phobos] bad git usage? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Michel Fortin | On 2011-05-14 17:59, Michel Fortin wrote:
> Le 2011-05-14 ? 20:26, Brad Roberts a ?crit :
> > I don't know who's done what to piss off git, but 2 builds in the last 4 days have failed due to bad interactions with github. The auto-tester maintains a pristine tree that it just pulls into each cycle to get current code. It _should_ be a simple fast-forward merge update every single time. But twice it hasn't been:
> >
> > Just now:
> >
> > From git://github.com/D-Programming-Language/phobos
> > + d30bfde...c5cd017 HEAD -> origin/HEAD (forced update)
> > error: Ref refs/remotes/origin/master is at
> > c5cd017921bb78644f8d130dc19c0df9e5b03bb5 but expected
> > d30bfdea40e768519aaa77170ee9e9697cbf685e
> > ! d30bfde..fc5f620 master -> origin/master (unable to update local
> > ref)
> >
> > The last time:
> >
> > From git://github.com/D-Programming-Language/phobos
> > + b64d9f2...c5cd017 HEAD -> origin/HEAD (forced update)
> > error: Ref refs/remotes/origin/master is at
> > c5cd017921bb78644f8d130dc19c0df9e5b03bb5 but expected
> > b64d9f27c23dec08865d9eb624bf0d22b18e5637
> > ! b64d9f2..d30bfde master -> origin/master (unable to update local
> > ref)
> >
> > It looks like HEAD and master are out of sync, and from what I understand, that shouldn't happen.
> >
> > The problematic commit:
> > https://github.com/D-Programming-Language/phobos/commit/c5cd017921bb786
> > 44f8d130dc19c0df9e5b03bb5
> >
> > But I'm not sure what's problematic about it.
> >
> > Thoughts?
>
> Generally this kind of message happen when someone pushed a history rewrite
> (pushing a commit that is not a child of the existing commit, which
> requires the push command to have a -f (force) switch).
>
> Now, perhaps the autotester should do a "git reset --hard origin/master" instead of doing a pull (which implicitly does a merge). It would avoid this kind of issue, although it's still not a very good thing to rewrite history in a public repository.
It's extremely _bad_ to rewrite the history in a public repository. I've done it for my personal branches, and at least some of the time that sort of thing should be okay, since they're generally intended for pull requests and probably aren't being pulled by other people very often, but when you're dealing with an official repository for a project which who knows how many people are pulling from, you should never rewrite history without a _very_ good reason. The auto tester shouldn't have to be doing a hard reset to function properly. Now, that may be necessary to get it back in a valid state to continue forward, but a pull should always be sufficient to get the latest update from the master repository.
- Jonathan M Davis
|
May 14, 2011 [phobos] bad git usage? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | On 5/14/2011 6:09 PM, Brad Roberts wrote: > On 5/14/2011 5:59 PM, Michel Fortin wrote: >> Le 2011-05-14 ? 20:26, Brad Roberts a ?crit : >> >>> I don't know who's done what to piss off git, but 2 builds in the last 4 days have failed due to bad interactions with github. The auto-tester maintains a pristine tree that it just pulls into each cycle to get current code. It _should_ be a simple fast-forward merge update every single time. But twice it hasn't been: >>> >>> Just now: >>> >>> From git://github.com/D-Programming-Language/phobos >>> + d30bfde...c5cd017 HEAD -> origin/HEAD (forced update) >>> error: Ref refs/remotes/origin/master is at c5cd017921bb78644f8d130dc19c0df9e5b03bb5 but expected >>> d30bfdea40e768519aaa77170ee9e9697cbf685e >>> ! d30bfde..fc5f620 master -> origin/master (unable to update local ref) >>> >>> The last time: >>> >>> From git://github.com/D-Programming-Language/phobos >>> + b64d9f2...c5cd017 HEAD -> origin/HEAD (forced update) >>> error: Ref refs/remotes/origin/master is at c5cd017921bb78644f8d130dc19c0df9e5b03bb5 but expected >>> b64d9f27c23dec08865d9eb624bf0d22b18e5637 >>> ! b64d9f2..d30bfde master -> origin/master (unable to update local ref) >>> >>> It looks like HEAD and master are out of sync, and from what I understand, that shouldn't happen. >>> >>> The problematic commit: >>> https://github.com/D-Programming-Language/phobos/commit/c5cd017921bb78644f8d130dc19c0df9e5b03bb5 >>> >>> But I'm not sure what's problematic about it. >>> >>> Thoughts? >> >> Generally this kind of message happen when someone pushed a history rewrite (pushing a commit that is not a child of the existing commit, which requires the push command to have a -f (force) switch). >> >> Now, perhaps the autotester should do a "git reset --hard origin/master" instead of doing a pull (which implicitly does a merge). It would avoid this kind of issue, although it's still not a very good thing to rewrite history in a public repository. >> > > I went to each auto-tester and did: > > git reset --hard origin/master > git pull origin > > That seems to have brought them all up to the current commit. We'll see if the problem crops up again. > > Looking at the phobos network on github, I see that HEAD is specifically tagged to a specific, non-most-recent, commit, and is listed as a branch. Neither druntime nor dmd have those properties. Hrm.. the next pull after the above: >From git://github.com/D-Programming-Language/phobos + fc5f620...c5cd017 HEAD -> origin/HEAD (forced update) Already up-to-date. It looks like the checked out source stayed with the current code, fc5f620, but continues to complain about the state of HEAD. And a git status shows a lack of happiness still: $ git status # On branch master # Your branch is ahead of 'origin/master' by 7 commits. # nothing to commit (working directory clean) Seems like we need to fix something in the github repository. |
May 14, 2011 [phobos] bad git usage? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Michel Fortin | On 2011-05-14 18:19, Michel Fortin wrote:
> Le 2011-05-14 ? 21:09, Brad Roberts a ?crit :
> > I went to each auto-tester and did:
> > git reset --hard origin/master
> > git pull origin
> >
> > That seems to have brought them all up to the current commit. We'll see if the problem crops up again.
>
> If you don't want to see it ever again, replace the pull in the autotester with:
>
> git fetch origin
> git reset --hard origin/master
>
> This way you'll have no merge and therefore no conflict.
>
> > Looking at the phobos network on github, I see that HEAD is specifically tagged to a specific, non-most-recent, commit, and is listed as a branch. Neither druntime nor dmd have those properties.
>
> HEAD is not a branch (normally). Has someone created and pushed a branch called HEAD to mess with our brains?
>
> I don't think it causes any problem (the real HEAD and the HEAD branch are distinct), but it's rather misleading. Someone with commit access to the shared repository should do "git push origin :HEAD" to remove that branch.
Done. The HEAD branch is now gone. I do worry about how it got there in the first place though.
- Jonathan M Davis
|
May 14, 2011 [phobos] bad git usage? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Michel Fortin | On 5/14/2011 6:19 PM, Michel Fortin wrote:
> Le 2011-05-14 ? 21:09, Brad Roberts a ?crit :
>
>> I went to each auto-tester and did:
>>
>> git reset --hard origin/master
>> git pull origin
>>
>> That seems to have brought them all up to the current commit. We'll see if the problem crops up again.
>
> If you don't want to see it ever again, replace the pull in the autotester with:
>
> git fetch origin
> git reset --hard origin/master
>
> This way you'll have no merge and therefore no conflict.
I manually did this once rather than changing the pull script. I'd rather find out that someone's messed up again next time it happens. Though if it becomes a habit, I'll do that. It does look like that's satisfied at least the one build that's started since I did it. If this doesn't do it.. it's also easy enough to just blow away the source tree and pull totally fresh copies.
Looks like jm did the branch delete. Took me a bit to figure out why it wasn't working for me. Too many cooks syndrome at play.
Later,
Brad
|
May 14, 2011 [phobos] bad git usage? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On 5/14/2011 6:31 PM, Jonathan M Davis wrote: > On 2011-05-14 18:19, Michel Fortin wrote: >> I don't think it causes any problem (the real HEAD and the HEAD branch are distinct), but it's rather misleading. Someone with commit access to the shared repository should do "git push origin :HEAD" to remove that branch. > > Done. The HEAD branch is now gone. I do worry about how it got there in the first place though. > > - Jonathan M Davis >From the news feed: andralex created branch HEAD at D-Programming-Language/phobos 3 days ago New branch is at /D-Programming-Language/phobos/tree/HEAD Compare HEAD branch with master ? Looks like Andrei was fumbling around.. something better done in a personal tree rather than the master one. Oh well. Damage fixed up now. Later, Brad |
Copyright © 1999-2021 by the D Language Foundation