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

when qisrc moves a repo, it omits to update it #103

Open
sbarthelemy opened this issue Nov 22, 2016 · 2 comments
Open

when qisrc moves a repo, it omits to update it #103

sbarthelemy opened this issue Nov 22, 2016 · 2 comments

Comments

@sbarthelemy
Copy link

sbarthelemy commented Nov 22, 2016

I have a buildfarm that does reset the worktree to some branch then builds and runs the tests.

The reset part is done with:

test -d ${worktree_path}/.qi || qisrc init --worktree=${worktree_path} [email protected]:qi/manifest.git -b ${branch}
qisrc checkout --force --worktree=${worktree_path} ${branch} && qisrc sync --all --reset --worktree=${worktree_path}

I'm doing both qisrc checkout and qisrc sync because the manifest branch may change from one build to another.

When switching manifest branch, qisrc checkout may need to move a repo around.
I noticed that in such a case, it omits to update it. As a consequence, the repo stays on the wrong branch (typically another release branch), and my build fails.

The problem lies in the compute_repo_diff() function, which only adda a repo to the to_update list if it does not move.

This bug is quite bad since qibuild will never recover: running qisrc checkout && qisrc sync again won't help.

If you go and git checkout the repo to the proper branch yourself, then qisrc checkout && qisrc sync will checkout the wrong branch again.

It appears the wrong branch name persists in ${worktree_path}/.qi/git.xml
The moving rep is basicawareness. It should be on master.

$ grep basicawareness .qi/git.xml
  <project name="naoqi/basicawareness.git" review="true" src="life/basicawareness">
    <remote default="true" default_branch="master" name="origin" review="false" url="ssh://[email protected]/naoqi/basicawareness.git" />
    <remote default="false" default_branch="master" name="gerrit" review="true" url="ssh://[email protected]:29418/naoqi/basicawareness.git" />
  <project name="naoqi/basicawareness.git" review="true" src="expressivity/interactionengines/basicawareness">
    <remote default="true" default_branch="master" name="origin" review="false" url="ssh://[email protected]/naoqi/basicawareness.git" />
    <remote default="false" default_branch="master" name="gerrit" review="true" url="ssh://[email protected]:29418/naoqi/basicawareness.git" />

@wilsonantoine
Copy link

+1

1 similar comment
@sebastiendalibard
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants