Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose charm version on archive #269

Merged
merged 2 commits into from
Feb 6, 2019
Merged

Expose charm version on archive #269

merged 2 commits into from
Feb 6, 2019

Conversation

achilleasa
Copy link
Contributor

This PR is part of the work required for fixing https://bugs.launchpad.net/juju/+bug/1812227. Juju needs to retrieve the VCS version (e.g git sha) for charm archives fetched from the charmstore.

In order to avoid changing the Charm interface that would inevitably break other dependencies, the PR exposes a Version() method on the CharmArchive type. The actual juju code that fetches the archive (using the charmrepo pkg) already casts the result to a charm.CharmArchive so this change allows us to fetch the version with minimal impact to other users of the package.

Copy link
Member

@SimonRichardson SimonRichardson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@achilleasa
Copy link
Contributor Author

$$merge$$

@jujubot jujubot merged commit a53c237 into juju:v6 Feb 6, 2019
@achilleasa achilleasa deleted the expose-charm-version-on-archive branch February 6, 2019 16:21
jujubot added a commit to juju/juju that referenced this pull request Feb 11, 2019
#9722

## Description of change

When deploying local charms that contain a `version` file, the charm version details are updated with the contents of that file. This was not the case when attempting to deploy charms from the charm store which results in the version details not being included in the `juju status` output.

This PR bumps the sha for the `charm.v6` dependency (see: juju/charm#269) which provides a helper charm archive method for fetching the version of a charm and updates the relevant code to populate the charm version field prior to persisting its details to the store.

## QA steps

```console
$ juju deploy vault
$ juju status vault --format yaml | grep charm-version
 charm-version: 220f0ee
```

Note: you should get the same output when deploying a local charm that includes a `version` file.

## Bug reference
https://bugs.launchpad.net/juju/+bug/1812227
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants