Troubleshooting - evansde77/cirrus GitHub Wiki

Troubleshooting

Installation

Upgrading

Build

  • Build fails with virtualenv is not compatible with this system or executable

Symptom is a failed git cirrus build, something similar to:

git cirrus build
2017-07-12;INFO;Bootstrapping virtualenv: /project/venv
2017-07-12;INFO;local(virtualenv -p python3  /project/venv)
Using base prefix '/Users/user/anaconda'
...
ERROR: The executable /project/venv/bin/python3 is not functioning
...
ERROR: virtualenv is not compatible with this system or executable
2017-07-12;ERROR;Error running command:
Encountered a bad command exit code!

Command: 'virtualenv -p python3  /project/venv'

Exit code: 100

The issue here is using a conda provided python with a non-conda installed cirrus. The options to resolve this are either:

  • Reinstall cirrus using conda-installer.sh
  • Change your default python interpreter to the same one you installed cirrus with

Cirrus decides on which method to use for build (venv or conda) based on the python it is installed with.

Test

  • git cirrus test fails with missing dependency under tox

If you add a new dependency to requirements.txt and the do git cirrus build, it will be installed in the local development environment. If you use tox to run your tests, you may see the tests fail with a missing dependency on the new package. This is because tox builds and caches its own local virtualenvs for running tests in each environment, so you need to tell it to recreate these.

You can pass the -r option to tox to trigger a recreate in two ways:

  1. On the command line to git cirrus test via --test-options
  2. Add recreate=True to the tox.ini (this will recreate each time which may make tests very slow when you have lots of dependencies)

Example Command:

git cirrus test --test-options " -r " 

Release

Duplicate release branches

If a release branch or tag already exists when you create a release, you may see conflicts or failures to create a new release.

Some troubleshooting steps:

  1. Make sure that your develop is up to date with the origin (check the version in cirrus.conf)
  2. Verify that a release is not currently building for that tag in your CI build system
  3. As a last resort, you can always edit cirrus.conf and manually bump the version on the develop branch, commit and push to origin. Then the next release will increment from that value.

Failure to merge during release

Sometimes branches can get out of sync and this may manifest during the release process as a merge failure. This usually means that a conflict is present between the release branch, master and/or develop.

Resolving conflicts is pretty well documented, for example:

The workflow for resolving a merge conflict is essentially the underlying git flow merge process that the release merge command automates:

cd repo/
# get latest develop, master and release branches
git checkout develop  && git pull 
git checkout master  && git pull 

git checkout -b release/<release> origin/release/<release>
git pull 

# verify merge to master
git checkout master 
git merge --no-ff release/<release>   # fix any conflicts that may occur
git push origin master
git tag -l  # verify tag is present, may need to add if not with git tag -a <tag> -m "tag <tag>"

# verify merge to develop
git checkout develop
git merge --no-ff release/<release>
git push origin develop
⚠️ **GitHub.com Fallback** ⚠️