Skip to content

Incorrect parsing of storage constraints #1052

@luissimas

Description

@luissimas

Description

When deploying a bundle with an application that contains storage constraints the deployment fails with the following message:

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Urgency

Annoying bug in our test suite

Python-libjuju version

3.4

Juju version

3.5.0

Reproduce / Test

import asyncio
from juju.model import Model

bundle_file = "./bundle.yaml"

bundle = """
name: sample-bundle

series: jammy

machines:
  "0":
    constraints: instance-type=type1

applications:
  swift-storage:
    charm: swift-storage
    channel: yoga/stable
    num_units: 1
    to:
      - "0"
    storage:
      block-devices: cinder,1,5G
"""

async def main():
    with open(bundle_file, "w") as f:
        f.write(bundle)

    model = Model()
    await model.connect()
    await model.deploy(bundle_file)

asyncio.run(main())

Metadata

Metadata

Assignees

No one assigned

    Labels

    hint/3.xgoing on main branchkind/bugindicates a bug in the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions