New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove direct model cmr #7097
Remove direct model cmr #7097
Conversation
apiserver/application/application.go
Outdated
} | ||
|
||
var st *state.State | ||
fail := func(err error) ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to the top of the method, and use it everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
apiserver/application/application.go
Outdated
} | ||
// Get the backend state for the source model so we can lookup the application. | ||
st, err := api.backend.ForModel(sourceModelTag) | ||
st, err = api.backend.ForModel(sourceModelTag) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we be using the StatePool provided to apiserver facades?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes we should, was old code that i missed
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
Build failed: Tests failed |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
Description of change
Please see the first commit.
The second commit is a drive by rename of service->application in the test suite.
We remove the ability to relate to other applications without first having that application offered in the remote model. Essentially we add a juju offer step to the workflow.
The work is essentially refactoring existing code and removing some now obsolete methods.
Note: there's still work required to fix the URL format and until that is done, juju offer is clumsy and requires a full URL to be specified even though it's not used.
QA steps
juju bootstrap
juju deploy mysql
juju offer mysql:db local:/u/me/hosted-mysql
juju switch controller
juju deploy mediawiki
juju relate mediawiki:db default.hosted-mysql