Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

From Charm documentation it says: revision is now deprecated. How charm writer maintain version information?

share|improve this question

1 Answer 1

For charms, published in the official charm store (https://jujucharms.com/), the revision number is chosen by the charm store when the charm is published (for the first time or when a new version is released). The charm store always picks an unique revision for each charm, and the contents of the "revision" file does not matter. When deploying charms from a local repository (local charms), the revision file is honored by Juju, if possible. There can only be one charm with a given name and revision number in any Juju environment (i.e. inside the mongo state database). When deploying a local charm, Juju tries to respect the revision inside the charm, but if this won't be possible (i.e. when there already is a charm in the state DB with the same name and revision), the latest known revision is incremented and stored. The user is notified of the actual revision the charm was deployed with:

  • when using juju deploy from the CLI there is a message saying Added charm "local:<series>/<name>-<revision> to the environment (e.g. "local:precise/wordpress-123");
  • when using Juju GUI there will be a similar way to notify the user (this is under development right now).

So, going back to the question: a charm author is expected to keep their charm sources into a version control system somewhere, like on launchpad, bitbucket, github, etc. This is the proper way to maintain version information and keep all the history. The revision file inside the charm source does not guarantee uniqueness and does not provide a solid way to refer to a specific charm version (inside a single environment or across multiple environments using the same charm).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.