Merge lp://qastaging/~doanac/uci-engine/restish-migrate-fix into lp://qastaging/uci-engine

Proposed by Andy Doan
Status: Merged
Approved by: Andy Doan
Approved revision: 594
Merged at revision: 595
Proposed branch: lp://qastaging/~doanac/uci-engine/restish-migrate-fix
Merge into: lp://qastaging/uci-engine
Diff against target: 47 lines (+10/-3)
3 files modified
charms/precise/restish/Makefile (+3/-0)
charms/precise/restish/hooks/hooks.py (+6/-2)
charms/precise/restish/unit_tests/test_hooks.py (+1/-1)
To merge this branch: bzr merge lp://qastaging/~doanac/uci-engine/restish-migrate-fix
Reviewer Review Type Date Requested Status
Francis Ginther Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+223477@code.qastaging.launchpad.net

Commit message

restish charm: fix db-migrate bug

the pgsql relation join/change doesn't always include all the data
required to make a db connection. This ensures we only call the
migration method once all data is ready.

Description of the change

fixes a db migration bug thomi discovered.

Also adds back the "make check" logic that revno 585 removed

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:594
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/883/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/883/rebuild

review: Approve (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

I was confused for the longest time until I saw that pgsql_relation_joined_changed() is handling both the joined and changed hooks. Given the juju relation sequence, I'm assuming that the user/host data is missing for the joined hook, but is present by the time changed is executed. The only way I can see to easily handle this db migration issue is to split the hook into a joined and changed hook, and I really can't make a strong argument for doing it differently.

review: Approve
Revision history for this message
Andy Doan (doanac) wrote :

On 06/17/2014 04:25 PM, Francis Ginther wrote:
> but is present by the time changed is executed

I thought so as well, and initially tried to split them up. Turns out
the "changed" function is called a couple of times before it is really
ready.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches