Merge lp:~hazmat/pyjuju/formula-upgrade-removes-obsolete into lp:pyjuju
Proposed by
Kapil Thangavelu
Status: | Work in progress |
---|---|
Proposed branch: | lp:~hazmat/pyjuju/formula-upgrade-removes-obsolete |
Merge into: | lp:pyjuju |
Diff against target: |
295 lines (+141/-9) 9 files modified
ensemble/agents/tests/test_unit.py (+50/-4) ensemble/agents/unit.py (+19/-3) ensemble/formula/base.py (+7/-0) ensemble/formula/bundle.py (+7/-0) ensemble/formula/directory.py (+21/-1) ensemble/formula/tests/test_base.py (+4/-0) ensemble/formula/tests/test_bundle.py (+7/-0) ensemble/formula/tests/test_directory.py (+17/-1) ensemble/unit/tests/test_lifecycle.py (+9/-0) |
To merge this branch: | bzr merge lp:~hazmat/pyjuju/formula-upgrade-removes-obsolete |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gustavo Niemeyer | Needs Information | ||
Review via email: mp+66940@code.launchpad.net |
Description of the change
On upgrade old formula files and directories not present in the new formula are removed. Also adds a dirent manifest for formulas. In retrospect this might have been achievable more simply with just removing the old formula dir while hook execution is stopped, and extracting the new one.. i had already implemented most of this before i realized that though..
To post a comment you must log in.
Unmerged revisions
- 265. By Kapil Thangavelu
-
stale formula files are removed on formula upgrade.
- 264. By Kapil Thangavelu
-
dynamically computed manifests for formulas
[1]
25 + stale_file_path = os.path. join(formula_ dir, "old-file") file_path, "w")
26 + fh = open(stale_
27 + fh.write("hello world")
28 + fh.close()
That's not a stale file, but a file created dynamically. I'm a bit concerned
about killing arbitrary files that the formula created, as it's basically saying
that the formula directory is necessarily read-only. Is that what we want?