listSuite.TestListJSON got null (showSuite too)

Bug #1576527 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Critical
Eric Snow

Bug Description

As seen in
    http://reports.vapour.ws/releases/issue/5722e2c8749a5614d6efca0c

listSuite.TestListJSON got null (showSuite too)

[LOG] 0:00.003 WARNING juju.cmd.juju.cloud cloud "localhost" not available on this platform
list_test.go:76:
    // Just check a snippet of the output to make sure it looks ok.
    c.Assert(out, gc.Matches, `.*{"aws":{"defined":"public","type":"ec2","auth-types":\["access-key"\].*`)
... value string = "null"
... regex string = ".*{\"aws\":{\"defined\":\"public\",\"type\":\"ec2\",\"auth-types\":\\[\"access-key\"\\].*"

Related failures
    listSuite.TestListJSON
    listSuite.TestListYAML
    showSuite.TestListPreservesRegionOrder
    showSuite.TestShow

Curtis Hovey (sinzui)
tags: added: blocker
Curtis Hovey (sinzui)
tags: added: go1.6
Revision history for this message
Katherine Cox-Buday (cox-katherine-e) wrote :

Suspected ordering issue.

Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Eric Snow (ericsnowcurrently)
Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

I suspect the problem is due to how we set the Juju home directory and the fact that we've been ignoring any errors that happen when we do so. If we fail to set the Juju home directory properly, it may end up re-using an existing directory, one which may have data that invalidates our test conditions.

I suspect that is what is happening here. That is because we look for the public clouds YAML file in the home directory and fall back to some hard-coded data otherwise. These 4 failing tests are acting like that YAML file (a blank one) actually exists, even though it shouldn't. The only way that (blank) file would exist is if we were re-using an existing directory that had that blank file in it.

Revision history for this message
Eric Snow (ericsnowcurrently) wrote :
Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

That patch has merged so now we just need to see what errors show up.

Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

I'm not seeing any related failures in subsequent test runs.

I'm going to mark this as fix-committed. Since I expect we won't see again the specific failures reported here, any fallout can be handled in a separate bug report.

Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
affects: juju-core → juju
Changed in juju:
milestone: 2.0-beta7 → none
milestone: none → 2.0-beta7
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.