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

building care-o-bot 79867c8 #262

Closed
hsd-dev opened this issue Mar 13, 2019 · 35 comments
Closed

building care-o-bot 79867c8 #262

hsd-dev opened this issue Mar 13, 2019 · 35 comments

Comments

@hsd-dev
Copy link
Contributor

hsd-dev commented Mar 13, 2019

While building the bug, I get the following error:

Updating local rosdistro index.yaml to use cache from the past ..
Invoking: rosinstall_generator --rosdistro=indigo cob_android --deps --tar --deps-only
Using ROS_DISTRO: indigo
The following not released packages/stacks will be ignored: cob_android
No packages/stacks left after ignoring not released
Traceback (most recent call last):
  File "scripts/build-rosinstall.py", line 57, in _time_machine
    stdout=subprocess.PIPE)
  File "/usr/lib/python3.5/subprocess.py", line 708, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['rosinstall_generator_tm.sh', '2015-08-03T08:03:34Z', 'indigo', 'cob_android', '--deps', '--tar', '--deps-only']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "scripts/build-rosinstall.py", line 173, in <module>
    main()
  File "scripts/build-rosinstall.py", line 166, in main
    build_file(fn_or_dir, overwrite=args.overwrite)
  File "scripts/build-rosinstall.py", line 118, in build_file
    deps.update(_time_machine(ros_pkgs, dt, distro, deps_only=True))
  File "scripts/build-rosinstall.py", line 61, in _time_machine
    err.returncode, fn_bug_desc)
NameError: name 'fn_bug_desc' is not defined

The issue was created at 2015-08-03T08:03:34Z and the package was first released on Aug 29, 2015. So basically, there is no entry of this package for the requested {TIMEPOINT} in rosdistro.

How can we solve this?

@git-afsantos
Copy link
Member

I think I ran into a similar issue once or twice before, and I think there is no alternative other than using the release date of the package. But perhaps, someone else has a better solution.

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 15, 2019

The issue was already fixed before the 1st release.

@gavanderhoorn
Copy link
Member

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 20, 2019

Should I close this, since it is being tracked elsewhere?

@gavanderhoorn
Copy link
Member

gavanderhoorn commented Mar 20, 2019

Well, the issue of repositories using source builds and reporting bugs in those is tracked in other issues.

But your problem reproducing 79867c8 is not.

What I would suggest is the following: generate a .rosinstall file using the first released version (to get all the dependencies in place) and then continue with the commit hash of the unfixed version (ie: the one that was not released).

That should work.

We should make a note about this (ie: not using the "correct" timepoint).

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 20, 2019

I was able to generate deps.rosinstall from the following command:

rosinstall_generator_tm.sh 2015-08-30T08:03:34Z indigo cob_android --deps --deps-only --tar > deps.rosinstall

I guess now I have to modify the cob_android package entries manually to 79867c8.

@gavanderhoorn
Copy link
Member

gavanderhoorn commented Mar 20, 2019

I guess now I have to modify the cob_android package entries manually to 79867c8.

yes, if that is the hash for the buggy state, then that would be the idea :)

Wait: since we use --deps-only, the PUT itself (cob_android in this case) will not appear in the .rosinstall file. I don't believe you need to do anything special now: the .bug should already contain the real hash.

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 20, 2019

These are the cob_android package entries in the deps.rosinstall:

- tar:
    local-name: cob_android/cob_android_msgs
    uri: https://github.com/ipa320/cob_android-release/archive/release/indigo/cob_android_msgs/0.1.1-0.tar.gz
    version: cob_android-release-release-indigo-cob_android_msgs-0.1.1-0
- tar:
    local-name: cob_android/cob_android_resource_server
    uri: https://github.com/ipa320/cob_android-release/archive/release/indigo/cob_android_resource_server/0.1.1-0.tar.gz
    version: cob_android-release-release-indigo-cob_android_resource_server-0.1.1-0
- tar:
    local-name: cob_android/cob_android_script_server
    uri: https://github.com/ipa320/cob_android-release/archive/release/indigo/cob_android_script_server/0.1.1-0.tar.gz
    version: cob_android-release-release-indigo-cob_android_script_server-0.1.1-0
- tar:
    local-name: cob_android/cob_android_settings
    uri: https://github.com/ipa320/cob_android-release/archive/release/indigo/cob_android_settings/0.1.1-0.tar.gz
    version: cob_android-release-release-indigo-cob_android_settings-0.1.1-0

@gavanderhoorn
Copy link
Member

cob_android is a metapackage, so cannot actually be the package any bug with install(..) statements is in.

Looking at the bug description, it would appear the affected packages are cob_android_msgs and cob_android_script_server (here). Those packages should be passed to the time machine, not the metapackage.

@gavanderhoorn
Copy link
Member

Note: the bug description would seem to be incorrect. The bug is not in cob_android, but in those other packages. This line should probably be updated.

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 21, 2019

Can someone give me permissions to fork repositories to this organization?

@gavanderhoorn
Copy link
Member

No (as it's not a permission we can give to individual users), but we can invite you to the robust-rosin organisation. Which I just did.

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 21, 2019

I don't remember if @ChrisTimperley said if bugzoo can handle multiple PUTs yesterday, but the bug file looks like this:

bug:
  package: cob_android_msgs cob_android_script_server
  issue: https://github.com/ipa320/cob_android/issues/7
  time-reported: 2015-08-03 (10:09)
time-machine:
  ros_distro: indigo
  ros_pkgs:
    - cob_android_msgs
    - cob_android_script_server
  issue: https://github.com/ipa320/cob_android/issues/7
bugzoo:
  fork-urls: https://github.com/robust-rosin/cob_android
  bug-commit: 21126f5e3d2e15ae8c93705dc3e8e999707da48e
  fix-commit: 79867c88acc64342f061e6324ed6b84ca7e0773d

And the output of

 python build-bugzoo.py

is

generating manifest for bug file [care-o-bot/79867c8/79867c8.bug]
build-bugzoo.py:71: UserWarning: BugZoo file does not currently support multiple PUTs
  warnings.warn('BugZoo file does not currently support multiple PUTs')

@gavanderhoorn
Copy link
Member

IIRC, BugZoo: not tested (probably not). The .rosinstall script: most likely yes.

@ChrisTimperley
Copy link
Member

generating manifest for bug file [care-o-bot/79867c8/79867c8.bug]
build-bugzoo.py:71: UserWarning: BugZoo file does not currently support multiple PUTs
  warnings.warn('BugZoo file does not currently support multiple PUTs')

#264 should add multiple PUT support to `build-bugzoo.py.

Also, fork-urls should be a list:

bugzoo:
  fork-urls:
    - https://github.com/robust-rosin/cob_android

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 28, 2019

@ChrisTimperley I am able to build the manifest with #264. Thanks!

Now facing #69

@gavanderhoorn
Copy link
Member

Now facing #69

#69? Can you show the build log for your bug?

Has the care-o-bot repository been renamed? Renames of geometry_experimental should be automatically handled.

Could it be that you're running into vcstools/vcstools#147?

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 28, 2019

@gavanderhoorn : Sorry that was a hasty reply as I didn't dig into the error.

I am getting similar errors for tf2 related packages:

ERROR [vcstools] Tarball download unpack failed: u"geometry_experimental-release-release-indigo-tf2-0.5.12-0 is not a subdirectory with contents in members [u'geometry2-release-release-indigo-tf2-0.5.12-0']"[/vcstools]
ERROR in config: Error processing 'geometry_experimental/tf2' : [geometry_experimental/tf2] Checkout of https://github.com/ros-gbp/geometry_experimental-release/archive/release/indigo/tf2/0.5.12-0.tar.gz version geometry_experimental-release-release-indigo-tf2-0.5.12-0 into /ros_ws/src/geometry_experimental/tf2 failed.

@gavanderhoorn
Copy link
Member

That would seem to be #69, but afaik we're already handling that with automatic renames of entries in .rosinstall files.

Can you clarify which versions of things you are using, and which commands lead to this error?

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 28, 2019

I pulled #264 in a new branch and working on it.

These are the tars in deps.rosinstall which fail:

- tar:
    local-name: geometry_experimental/tf2
    uri: https://github.com/ros-gbp/geometry_experimental-release/archive/release/indigo/tf2/0.5.12-0.tar.gz
    version: geometry_experimental-release-release-indigo-tf2-0.5.12-0
- tar:
    local-name: geometry_experimental/tf2_msgs
    uri: https://github.com/ros-gbp/geometry_experimental-release/archive/release/indigo/tf2_msgs/0.5.12-0.tar.gz
    version: geometry_experimental-release-release-indigo-tf2_msgs-0.5.12-0
- tar:
    local-name: geometry_experimental/tf2_py
    uri: https://github.com/ros-gbp/geometry_experimental-release/archive/release/indigo/tf2_py/0.5.12-0.tar.gz
    version: geometry_experimental-release-release-indigo-tf2_py-0.5.12-0
- tar:
    local-name: geometry_experimental/tf2_ros
    uri: https://github.com/ros-gbp/geometry_experimental-release/archive/release/indigo/tf2_ros/0.5.12-0.tar.gz
    version: geometry_experimental-release-release-indigo-tf2_ros-0.5.12-0

The following command lead to the error:

bugzoo bug build --force robust:79867c8

@gavanderhoorn
Copy link
Member

gavanderhoorn commented Mar 28, 2019

Renaming happens when the .rosinstall file is generated (here), but only if you actually used scripts/build-rosinstall.py.

Did you run the time machine manually?


Ah, just saw that you did: #262 (comment).

That would explain it then.

Either rename the entries yourself (to geometry2) or use scripts/build-rosinstall.py.

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 28, 2019

Ah, just saw that you did: #262 (comment).

Was about to comment that :)

Can I use scripts/build-rosinstall.py when I am selecting the {TIMEPOINT} manually?

@gavanderhoorn
Copy link
Member

gavanderhoorn commented Mar 28, 2019

Can I use scripts/build-rosinstall.py when I am selecting the {TIMEPOINT} manually?

Well .. no, not really (if I understand you correctly).

scripts/build-rosinstall.py will use the time-machine/datetime key in the .bug description to drive the time machine. In this case I would just manually replace geometry_experimental with geometry2 and commit the updated .rosinstall.

Note that you may still run into vcstools/vcstools#147 unfortunately.

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 28, 2019

Manually replacing geometry_experimental with geometry2 helps.

But docker build in

bugzoo bug build --force robust:79867c8

still fails with

/ros_ws/src/cob_driver/cob_sound/ros/src/sound.cpp:9:32: fatal error: cob_srvs/SetString.h: No such file or directory
 #include <cob_srvs/SetString.h>
                                ^
compilation terminated.

make[2]: *** [CMakeFiles/sound.dir/ros/src/sound.cpp.o] Error 1

make[1]: *** [CMakeFiles/sound.dir/all] Error 2

make: *** [all] Error 2

Command failed, exiting.

Looks like cob_sound-0.6.4 (which is currently listed in deps.rosintall) did not include cob_common as its dependency. It was done in cob_sound-0.6.5

@gavanderhoorn
Copy link
Member

gavanderhoorn commented Mar 28, 2019

That would be a candidate for missing-dependencies then. See #150.


Edit: example:

missing-dependencies:
- mavros_extras

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 28, 2019

But don't I have to use scripts/build-rosinstall.py for missing-dependencies as well?
I might have to manually change the release version in this case.

@gavanderhoorn
Copy link
Member

gavanderhoorn commented Mar 28, 2019

But don't I have to use scripts/build-rosinstall.py for missing-dependencies as well?

If you want to have everything done automatically: yes.

But in the end all it does is run the time machine twice. Once for the actual PUT(s) (and with --deps-only) and once for the missing dependencies (without --deps-only). See also #150 #254.

I might have to manually change the release version in this case.

Don't believe that's needed in this case.

As this is a special case (bug in unreleased pkg) I'd just run the time machine manually, as you're already doing.


Edit: this part may be clearer. #254 is a bit difficult to follow.

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 28, 2019

in scripts/build-rosinstall.py

        deps.update(_time_machine(ros_pkgs, dt, distro, deps_only=True))
        if missing_deps:
            deps.update(_time_machine(missing_deps, dt, distro, deps_only=False))

Makes sense.

Ran the command

rosinstall_generator_tm.sh 2015-09-01T08:03:34Z indigo cob_common --deps --tar > deps.rosinstall

deps.rosintall looks file now.

But #264 (comment)

EDIT: Sorry my bad! All good now :)

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Apr 3, 2019

Guess I was unclear, but I am able to build the image now.

@hsd-dev hsd-dev closed this as completed Apr 3, 2019
@gavanderhoorn
Copy link
Member

@ipa-hsd: with #270 merged, you should be able to set the timestamp you used for the .rosinstall files (ie: the one after the first release) in the .bug file, and Bugzoo should make the time machine use that instead of the timestamp of the issue (which would be too early).

It would be great if you could test whether that actually works.

@hsd-dev hsd-dev reopened this Apr 3, 2019
@hsd-dev
Copy link
Contributor Author

hsd-dev commented Apr 3, 2019

I merged the master branch (which should include #270) and rebased #264

I am able to build the image normally now.

@gavanderhoorn
Copy link
Member

Which timestamp did you configure for the time machine to use?

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Apr 3, 2019

2015-08-30T08:03:34Z, which is 1 date after the 1st release of cob_android

@hsd-dev hsd-dev closed this as completed Apr 4, 2019
@gavanderhoorn
Copy link
Member

@ipa-hsd: perhaps you've already done so, but could I ask you to add a comment to the .bug file explaining that timestamp (ie: that it's a datetime later than the original reporting time of the issue, due to the package not being released, etc)?

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Apr 4, 2019

I hadn't, will do so 👍

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