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

autoproj versions fails if remote has no master branch #321

Open
planthaber opened this issue Mar 19, 2021 · 11 comments
Open

autoproj versions fails if remote has no master branch #321

planthaber opened this issue Mar 19, 2021 · 11 comments

Comments

@planthaber
Copy link
Member

Hi,

I tired to use autoproj versions to generate a list of compatible package versions after a successful compile, but in case of ompl this leads to an error (full message below).

Is this possibly related to rock-core/autobuild#96?

Ompl doesn't have a master branch, it is using "main" instead

planning/ompl(/opt/workspace/planning/ompl): failed in import phase
�[0m�[91m    'git --git-dir /opt/workspace/planning/ompl/.git fetch https://github.com/ompl/ompl.git --tags refs/heads/master HEAD refs/heads/0.14.0 refs/heads/0.14.1 refs/heads/0.14.2 refs/heads/1.1.1 refs/heads/1.2.0 refs/heads/1.2.1 refs/heads/1.2.2 refs/heads/1.3.0 refs/heads/1.3.1 refs/heads/1.4.2 refs/heads/TrajOpt refs/heads/c++11 refs/heads/kinetic-devel refs/heads/main refs/heads/pr-cmake-fixes refs/heads/symbol_visibility refs/heads/v1.1.1 refs/pull/1/head refs/pull/10/head refs/pull/100/head refs/pull/101/head refs/pull/102/head refs/pull/102/merge refs/pull/103/head refs/pull/104/head refs/pull/105/head refs/pull/106/head refs/pull/107/head refs/pull/108/head refs/pull/109/head refs/pull/11/head refs/pull/110/head refs/pull/111/head refs/pull/112/head refs/pull/113/head refs/pull/114/head refs/pull/115/head refs/pull/116/head refs/pull/117/head refs/pull/118/head refs/pull/119/head refs/pull/12/head refs/pull/13/head refs/pull/14/head refs/pull/15/head refs/pull/16/head refs/pull/17/head refs/pull/18/head refs/pull/19/head refs/pull/19/merge refs/pull/2/head refs/pull/20/head refs/pull/20/merge refs/pull/21/head refs/pull/22/head refs/pull/23/head refs/pull/24/head refs/pull/24/merge refs/pull/25/head refs/pull/25/merge refs/pull/26/head refs/pull/27/head refs/pull/28/head refs/pull/29/head refs/pull/3/head refs/pull/30/head refs/pull/31/head refs/pull/31/merge refs/pull/32/head refs/pull/33/head refs/pull/34/head refs/pull/34/merge refs/pull/35/head refs/pull/36/head refs/pull/36/merge refs/pull/37/head refs/pull/38/head refs/pull/38/merge refs/pull/39/head refs/pull/4/head refs/pull/40/head refs/pull/41/head refs/pull/42/head refs/pull/42/merge refs/pull/43/head refs/pull/44/head refs/pull/45/head refs/pull/45/merge refs/pull/46/head refs/pull/46/merge refs/pull/47/head refs/pull/48/head refs/pull/49/head refs/pull/5/head refs/pull/50/head refs/pull/51/head refs/pull/52/head refs/pull/53/head refs/pull/53/merge refs/pull/54/head refs/pull/55/head refs/pull/56/head refs/pull/57/head refs/pull/57/merge refs/pull/58/head refs/pull/59/head refs/pull/6/head refs/pull/6/merge refs/pull/60/head refs/pull/60/merge refs/pull/61/head refs/pull/62/head refs/pull/63/head refs/pull/64/head refs/pull/65/head refs/pull/66/head refs/pull/66/merge refs/pull/67/head refs/pull/68/head refs/pull/682/head refs/pull/683/head refs/pull/686/head refs/pull/69/head refs/pull/690/head refs/pull/694/head refs/pull/695/head refs/pull/696/head refs/pull/697/head refs/pull/7/head refs/pull/70/head refs/pull/701/head refs/pull/71/head refs/pull/710/head refs/pull/711/head refs/pull/715/head refs/pull/718/head refs/pull/719/head refs/pull/72/head refs/pull/721/head refs/pull/722/head refs/pull/723/head refs/pull/724/head refs/pull/726/head refs/pull/727/head refs/pull/727/merge refs/pull/73/head refs/pull/73/merge refs/pull/735/head refs/pull/739/head refs/pull/74/head refs/pull/743/head refs/pull/743/merge refs/pull/75/head refs/pull/75/merge refs/pull/754/head refs/pull/757/head refs/pull/759/head refs/pull/76/head refs/pull/760/head refs/pull/760/merge refs/pull/762/head refs/pull/763/head refs/pull/764/head refs/pull/766/head refs/pull/77/head refs/pull/777/head refs/pull/778/head refs/pull/78/head refs/pull/78/merge refs/pull/780/head refs/pull/783/head refs/pull/783/merge refs/pull/784/head refs/pull/789/head refs/pull/79/head refs/pull/79/merge refs/pull/8/head refs/pull/80/head refs/pull/81/head refs/pull/82/head refs/pull/83/head refs/pull/84/head refs/pull/84/merge refs/pull/85/head refs/pull/86/head refs/pull/87/head refs/pull/87/merge refs/pull/88/head refs/pull/89/head refs/pull/9/head refs/pull/90/head refs/pull/91/head refs/pull/92/head refs/pull/92/merge refs/pull/93/head refs/pull/94/head refs/pull/95/head refs/pull/95/merge refs/pull/96/head refs/pull/97/head refs/pull/98/head refs/pull/98/merge refs/pull/99/head refs/pull/99/merge refs/tags/0.10.0 refs/tags/0.10.1 refs/tags/0.10.2 refs/tags/0.11.0 refs/tags/0.11.1 refs/tags/0.12.0 refs/tags/0.12.1 refs/tags/0.12.2 refs/tags/0.13.0 refs/tags/0.14.0 refs/tags/0.14.1 refs/tags/0.14.2 refs/tags/0.9.0 refs/tags/0.9.1 refs/tags/0.9.2 refs/tags/0.9.3 refs/tags/0.9.4 refs/tags/0.9.5 refs/tags/1.0.0 refs/tags/1.1.0 refs/tags/1.1.1 refs/tags/1.2.0 refs/tags/1.2.1 refs/tags/1.2.2 refs/tags/1.2.3 refs/tags/1.3.0 refs/tags/1.3.1 refs/tags/1.3.2 refs/tags/1.4.0 refs/tags/1.4.0beta refs/tags/1.4.1 refs/tags/1.4.2 refs/tags/1.5.0 refs/tags/1.5.1 refs/tags/1.5.2 refs/tags/comp450-fall-2010 refs/tags/default refs/tags/plannerarena' returned status 128
    see /opt/workspace/install/planning/ompl/log/planning/ompl-import.log for details
    last 1 lines are:

�[0m�[91m    fatal: Couldn't find remote ref refs/heads/master
@ivan1993br
Copy link
Contributor

ivan1993br commented Mar 19, 2021

Hi @planthaber,

This PR should have solved these problems.... I will check this weekend to see what I missed.

Just to understand what happened:

  • You were able to update the packages (autoproj update)
  • However, the generation of the versions (autoproj version) returned an error

Is this right? I am trying to understand so I can reproduce the error

@planthaber
Copy link
Member Author

Yes exactly, it happend for planning/ompl (rock-core/rock-package_set):

Steps to reproduce on a fresh rock-core bootstrap:

autoproj versions <- works
add planning/ompl to layout in autobuild/manifest
autoproj versions <- fails

@ivan1993br
Copy link
Contributor

ivan1993br commented Mar 20, 2021

Hi @planthaber ,

I reproduced your error with the rock environment, I think that the key "*" to get all the packages in the planning namespace here is setting it to master due to here, and when you override it here you do not override the branch, so it stays on master, causing the problem to try finding the heads/master.

Just to confirm, can you send the output of yours autoproj show ompl?

Thanks!

@planthaber
Copy link
Member Author

source package planning/ompl
  source definition
    type: git
    url: https://github.com/ompl/ompl.git
    branch: master
    interactive: false
    patches: ["/opt/workspace/autoproj/remotes/rock/patches/ompl.patch"]
    push_to: [email protected]:/rock-planning/planning-ompl.git
    repository_id: github:/rock-planning/planning-ompl.git
    retry_count: 10
    tag: 1.2.1
    first match: in rock (/opt/workspace/autoproj/remotes/rock/source.yml)
      branch: $ROCK_BRANCH
      github: rock-planning/planning-$PACKAGE_BASENAME
    overriden in rock (/opt/workspace/autoproj/remotes/rock/source.yml)
      type: git
      url: https://github.com/ompl/ompl.git
      patches: ["$AUTOPROJ_SOURCE_DIR/patches/ompl.patch"]
      tag: 1.2.1
  is not directly selected by the manifest
  no reverse dependencies
  directly depends on: 
  optionally depends on: flann
  dependencies on OS packages: boost, cmake, flann, ode

@planthaber
Copy link
Member Author

But then I don't get why the normal checkout works, even worked before rock-core/autobuild#96.

The issue only comes with using autoproj versions. I don't really see why versions needs to contact the remote repository at all.

Nevertheless, deleting the branch setting in the override solves this issue:

rock-core/rock-package_set#236

@ivan1993br
Copy link
Contributor

But then I don't get why the normal checkout works, even worked before rock-core/autobuild#96.

I agree that this is strange, but they maybe moved to the main branch recently, I've just saw that they moved the badge to main recently.

Also, when I did the checkout here it already rose an error.

The issue only comes with using autoproj versions. I don't really see why versions needs to contact the remote repository at all.

I think that when you don't set to local, it checks if the commit you want exists on remote before it snapshots, see here and here.

Nevertheless, deleting the branch setting in the override solves this issue:
rock-core/rock-package_set#236

Nice!

@ivan1993br
Copy link
Contributor

@planthaber, Can we close this issue?

@g-arjones
Copy link
Contributor

g-arjones commented Mar 28, 2021

I have the feeling that fixing this in the importer is better than the workaround from rock-core/rock-package_set#23. Just removing :branch from the options hash when either :commit or :tag are set would do it.

What do you think?

@ivan1993br
Copy link
Contributor

I have the feeling that fixing this in the importer is better than the workaround from rock-core/rock-package_set#23. Just removing :branch from the options hash when either :commit or :tag are set would do it.

What do you think?

I agree, It makes sense

@doudou
Copy link
Member

doudou commented Mar 29, 2021

  • a commit needs a reference to pull, you can't just pull a commit
  • in the tag case, we could ignore the remote branch
  • we do need a local branch in all cases

@g-arjones
Copy link
Contributor

Yep, what I meant was:

We do in Autobuild::Git what was done here: rock-core/rock-package_set#236

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

4 participants