bloom-release fails 'because the working directory has changes'

asked 2018-02-11 06:03:04 -0600

updated 2018-02-12 15:07:40 -0600

Taking over the maintenance of a ROS package I'm trying to release a new version of it. The package is rosparam_handler.
I think I followed the tuto ReleaseCatkinPackage properly, running a (successful) local pre-release, generating the changelog and tagging.
Now running the bloom-release rosparam_handler --track indigo --rosdistro indigo fails with
Failed to checkout to 'master' because the working directory has local changes
followed by a git status with some of the repo's files marked 'new' and other marked 'modified'.
I should mention that there are a couple clang-format complains, but the concerned files are not one-to-one matches with those that are marked as 'modified' in the git status. This makes me doubt that it is the core issue here. Can it still be clang-format that automatically does some local changes ? It finally concludes with :

Traceback (most recent call last):
  File "/usr/bin/git-bloom-import-upstream", line 11, in <module>
    load_entry_point('bloom==0.6.2', 'console_scripts', 'git-bloom-import-upstream')()
  File "/usr/lib/python2.7/dist-packages/bloom/commands/git/import_upstream.py", line 398, in main
    args.replace)
  File "/usr/lib/python2.7/dist-packages/bloom/commands/git/import_upstream.py", line 322, in import_upstream
    import_tarball(tarball_path, 'upstream', version, name)
  File "/usr/lib/python2.7/dist-packages/bloom/commands/git/import_upstream.py", line 160, in import_tarball
    execute_command(cmd)
  File "/usr/lib/python2.7/dist-packages/bloom/util.py", line 461, in execute_command
    raise CalledProcessError(result, cmd)
CalledProcessError: Command 'git commit -m "Imported upstream version '0.1.2' of 'upstream'"' returned non-zero exit status 1

<== Error running command '['/usr/bin/git-bloom-import-upstream', '/tmp/tmpNRV4Fc/rosparam_handler-0.1.2.tar.gz', '--release-version', '0.1.2', '--replace']'
Release failed, exiting.

I'd prefer to avoid fixing those clang-format issues, re-tag and try again before being fairly certain that's the issue.

bloom-release --version
0.6.2
git --version
git version 2.13.0

Any idea ?

Thanks.

Edit

I could release the package on a different machine with Ubuntu 14 and bloom 0.5.23.

edit retag flag offensive close merge delete

Comments

Releases don't need to necessarily be made from the checkout that you work in/on (in fact, Bloom doesn't even use it). Does the same happen if you create a temporary directory (say in /tmp) and try to release from there?

gvdhoorn gravatar image gvdhoorn  ( 2018-02-11 07:34:58 -0600 )edit

I actually didn't run it from my local copy of the package but from any path as the tuto leads says.
Moreover looking at the log it seems that everything happening locally takes place in /tmp/whatever_tmp_folder_name

artivis gravatar image artivis  ( 2018-02-11 08:23:26 -0600 )edit

Well it was just something to try.

gvdhoorn gravatar image gvdhoorn  ( 2018-02-11 08:51:01 -0600 )edit

I could release the package on a different machine with Ubuntu 14 and bloom 0.5.23.

hm. If 0.5.23 works, but 0.6.2 gives you trouble, then perhaps this is a regression.

Perhaps @William knows?

gvdhoorn gravatar image gvdhoorn  ( 2018-02-13 01:52:46 -0600 )edit

Sounds like you have a pre or post commit hook that is making local changes while bloom is trying to use git for unrelated activities. Could it be that the other computer doesn't have this commit hook and that's why it works? Does it still fail if you update bloom on the 14.04 (14.10?) machine?

William gravatar image William  ( 2018-02-13 01:59:35 -0600 )edit

I do have pre-commit hooks on the first machine (16.04 & Kinetic) but they only prints warnings in the terminal (no error code return) under conditions which were all met here. I still have to do the release for newer ROS version, I'll try to update bloom on the 14.04 machine.

artivis gravatar image artivis  ( 2018-02-13 16:33:50 -0600 )edit