function-uitest-gui github.com/juju/juju Not a git repository

Bug #1646161 reported by Curtis Hovey
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-ci-tools
Fix Released
Critical
Christopher Lee

Bug Description

As seen in
    http://reports.vapour.ws/releases/issue/583ee393749a5649ae893d28

The uitest fails because it cannot checkout the tree we build in the workspace. It implies the .git was lost.

Before we fix this, we need to merge the lxd into juju-ci-tools.

Related branches

Curtis Hovey (sinzui)
Changed in juju-ci-tools:
status: Triaged → In Progress
Revision history for this message
Curtis Hovey (sinzui) wrote :

I see out script is doing
JUJU_ARCHIVE=$($SCRIPTS/s3ci.py get --config $S3_CONFIG $REVISION_BUILD build-revision juju-core_.*.tar.gz)
tar -xf $JUJU_ARCHIVE

So this is not a git repo. But note the uitest is trying to checkout master...which is rarely the branch we are testing. So we cannot let uitest do this. It needs to use the code we placed on disk or accept arguments to co a specific revision.

description: updated
Revision history for this message
Curtis Hovey (sinzui) wrote :

The problem is that the test wants to checkout the juju branch and change it. This is WRONG. We don't release branches, we release tarfiles that are not like the branches. A recent change to juju-uitest is forcing an update when it is both wrong and impossible.

uitest/suite/juju.py:56: in setUpClass
    'bootstrap', cloud_name, cls.controller_name)
uitest/suite/commands.py:85: in juju
    branch=os.getenv('JUJU_BRANCH', None))
uitest/gocommand.py:71: in build
    _update_project(src_path, repo, branch)
uitest/gocommand.py:129: in _update_project
    git.checkout(src_path, branch)

I see os.getenv('JUJU_BRANCH', None). I want to set this to 'tarfile' and have _update_project() exit early before it calls git.

Revision history for this message
Curtis Hovey (sinzui) wrote :

My hack to skip the update failed:

I hacked the gocomand to exit early with the branch is tarfile
--- a/uitest/gocommand.py
+++ b/uitest/gocommand.py
@@ -123,6 +123,8 @@ def _update_project(src_path, repo, branch):
     """
     if not branch:
         branch = 'master'
+ if branch == 'tarfile':
+ return
     with git.home():
         git.checkout(src_path, branch)
         git.pull(src_path, branch)

Then
export JUJU_BRANCH="tarfile"
before running the test. I wonder if the call to
os.getenv('JUJU_BRANCH', None)
is busted.

Curtis Hovey (sinzui)
Changed in juju-ci-tools:
assignee: Curtis Hovey (sinzui) → Nicholas Skaggs (nskaggs)
Revision history for this message
Christopher Lee (veebers) wrote :

We have had a change made in the ui-tests code for us (as per https://github.com/CanonicalLtd/juju-uitest/issues/90).

Now in the process of updating our infrastructure to make use of this.

Curtis Hovey (sinzui)
Changed in juju-ci-tools:
assignee: Nicholas Skaggs (nskaggs) → Christopher Lee (veebers)
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.