juju-solutions / matrix

Automatic testing of big software deployments under various failure conditions
Other
8 stars 9 forks source link

Matrix no longer works w/ bundles from the store #36

Closed pengale closed 7 years ago

pengale commented 7 years ago

The following invocation of matrix no longer works:

matrix tests/test_2.matrix

It fails with the following error:

Task(command='matrix.tasks.deploy', args={'version': 'current', 'entity': 'cs:bundle/wiki-simple'})
Traceback (most recent call last):
  File "/home/petevg/Code/matrix/matrix/model.py", line 163, in execute
    result = await self.execute_plugin(context, cmd, rule)
  File "/home/petevg/Code/matrix/matrix/model.py", line 180, in execute_plugin
    result = await cmd(context, rule, self, event)
  File "/home/petevg/Code/matrix/matrix/tasks/deploy.py", line 6, in deploy
    new_apps = await context.juju_model.deploy(str(context.config.path))
  File "/home/petevg/Code/matrix/.tox/py35/lib/python3.5/site-packages/juju/model.py", line 897, in deploy
    await client_facade.AddCharm(channel, entity_id)
  File "/home/petevg/Code/matrix/.tox/py35/lib/python3.5/site-packages/juju/client/facade.py", line 317, in wrapper
    reply = await f(*args, **kwargs)
  File "/home/petevg/Code/matrix/.tox/py35/lib/python3.5/site-packages/juju/client/_client.py", line 9371, in AddCharm
    reply = await self.rpc(msg)
  File "/home/petevg/Code/matrix/.tox/py35/lib/python3.5/site-packages/juju/client/facade.py", line 436, in rpc
    result = await self.connection.rpc(msg, encoder=TypeEncoder)
  File "/home/petevg/Code/matrix/.tox/py35/lib/python3.5/site-packages/juju/client/connection.py", line 93, in rpc
    raise JujuAPIError(result)
juju.errors.JujuAPIError: charm or bundle URL has invalid form: "/home/petevg/Code/matrix"

This is related to the refactor that allows us to skip specifying a bundle in a .matrix test. If intentional, this is fine, but we need to revise that test, and possibly allow a user to pass in a bundle name from the store as an arg (close if I'm just missing the arg).

johnsca commented 7 years ago

The entity param to the deploy command has been dropped entirely, as Matrix now only ever deploys local bundles. In this case, it's defaulting to the current directory, which is not a bundle. So, a different path should be passed in via the --path (-p) arg, or matrix be run from a different directory.