Migrations: change how resource revisions are exported #6628

Merged
merged 4 commits into from Nov 29, 2016

Conversation

Projects
None yet
3 participants
Contributor

mjs commented Nov 29, 2016

Practical testing has shown that exporting resource revisions in a normalised way, as was being done, isn't always going to work. Due to the ability for users to upload resources locally, the details for a given resource revision can vary between charmstore, application and unit.

Charmstore, application and unit resource revisions are now stored separately (much like they are in state). This change touches the model description format and the model export code in state.

QA

Deployed resource using models and manually verified the output of juju dump-model.

mjs added some commits Nov 29, 2016

core/description: Separate resource revisions
It turns out in practice that the details for the same resource revision
number can be different between the charmstore and application revision,
particularly because of local resource uploads.

Instead of storing a shared map of revisions, which are referenced by
revision number, store each revision separately. This is closer to how
they're stored in Juju's state.
core/description: Separate unit resource revs
It turns out in practice that unit resource revisions can have different
details to the same revision numbers in applications and the
charmstore (primarily due to local resource uploads).
state: Update resource export
Resource revisions are now stored in a more denormalised way.
Contributor

mjs commented Nov 29, 2016

$$merge$$

Contributor

jujubot commented Nov 29, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit db9d167 into juju:develop Nov 29, 2016

1 check passed

github-check-merge-juju Built PR, ran unit tests, and tested LXD deploy. Use !!.*!! to request another build. IE, !!build!!, !!retry!!
Details

@mjs mjs deleted the mjs:MM-resource-format-tweak branch Nov 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment