juju / charmstore

The charm store server.
http://gopkg.in/juju/charmstore.v5
GNU Affero General Public License v3.0
15 stars 37 forks source link

document promulgation revision semantics #865

Open rogpeppe opened 5 years ago

rogpeppe commented 5 years ago

[Original issue created by @jrwren at https://github.com/CanonicalLtd/charmstore-client/issues/219]

given promulgation's limited user base we can put it in markdown in this repo. Really, it is OK.

The first promulgated version gets a revision starting at zero. If a users charm with versions -1 and -0 were never promulgated and -2 is promulgated, then it becomes rev 0 of the promulgated charm.

e.g.

$ charm push ...
$ charm publish cs:~bob/trusty/foopress-0
$ charm push...
$ charm publish cs:~bob/trusty/foopress-1
$ charm push...
$ charm publish cs:~bob/trusty/foopress-2
$ charm promulgate cs:~bob/trusty/foopress-2
cs:trusty/foopress-0

That the charms point to the same place can been seen using the charm show command and the hash field.

charm show cs:~bob/trusty/wordpress-2 hash
1d0f284efe3edea4b9ca3bd514fa134b17eae361ccc7a1eefeff801b9bd6604e01f21f6bf249ef030599f0c218f2ba8c
charm show cs:trusty/wordpress-0 hash
1d0f284efe3edea4b9ca3bd514fa134b17eae361ccc7a1eefeff801b9bd6604e01f21f6bf249ef030599f0c218f2ba8c