{"action":"created","issue":{"url":"https://api.github.com/repos/juju/juju/issues/8038","repository_url":"https://api.github.com/repos/juju/juju","labels_url":"https://api.github.com/repos/juju/juju/issues/8038/labels{/name}","comments_url":"https://api.github.com/repos/juju/juju/issues/8038/comments","events_url":"https://api.github.com/repos/juju/juju/issues/8038/events","html_url":"https://github.com/juju/juju/pull/8038","id":272200972,"number":8038,"title":"[RFC] rpc: optional context.Context in methods","user":{"login":"axw","id":843579,"avatar_url":"https://avatars2.githubusercontent.com/u/843579?v=4","gravatar_id":"","url":"https://api.github.com/users/axw","html_url":"https://github.com/axw","followers_url":"https://api.github.com/users/axw/followers","following_url":"https://api.github.com/users/axw/following{/other_user}","gists_url":"https://api.github.com/users/axw/gists{/gist_id}","starred_url":"https://api.github.com/users/axw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axw/subscriptions","organizations_url":"https://api.github.com/users/axw/orgs","repos_url":"https://api.github.com/users/axw/repos","events_url":"https://api.github.com/users/axw/events{/privacy}","received_events_url":"https://api.github.com/users/axw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-08T13:38:07Z","updated_at":"2017-11-08T13:42:01Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/8038","html_url":"https://github.com/juju/juju/pull/8038","diff_url":"https://github.com/juju/juju/pull/8038.diff","patch_url":"https://github.com/juju/juju/pull/8038.patch"},"body":"## Description of change\r\n\r\nThis PR adds the capability to include a context.Context parameter in methods exposed via a juju/rpc connection. When the connection is closed or the request completes normally, the context will be cancelled.\r\n\r\nThe singular/leadership API calls are updated to use the context to cancel lease/leadership claims, rather than relying on the lease managers in state being killed. State.KillWorkers is removed. This change paves the way for moving the API server to the dependency engine, reducing the number of active MongoDB connections we maintain, and simplifying how we thread the state pool through to the introspection worker.\r\n\r\nThis change will also enable us to introduce OpenTracing calls to the API server, and later the API client.\r\n\r\n## QA steps\r\n\r\n1. juju bootstrap localhost\r\n2. juju enable-ha\r\n(wait)\r\n3. juju upgrade-juju -m controller --build-agent (forces agents to restart gracefully, exercising server shutdown code)\r\n\r\n## Documentation changes\r\n\r\nNone.\r\n\r\n## Bug reference\r\n\r\nNone."},"comment":{"url":"https://api.github.com/repos/juju/juju/issues/comments/342820613","html_url":"https://github.com/juju/juju/pull/8038#issuecomment-342820613","issue_url":"https://api.github.com/repos/juju/juju/issues/8038","id":342820613,"user":{"login":"axw","id":843579,"avatar_url":"https://avatars2.githubusercontent.com/u/843579?v=4","gravatar_id":"","url":"https://api.github.com/users/axw","html_url":"https://github.com/axw","followers_url":"https://api.github.com/users/axw/followers","following_url":"https://api.github.com/users/axw/following{/other_user}","gists_url":"https://api.github.com/users/axw/gists{/gist_id}","starred_url":"https://api.github.com/users/axw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axw/subscriptions","organizations_url":"https://api.github.com/users/axw/orgs","repos_url":"https://api.github.com/users/axw/repos","events_url":"https://api.github.com/users/axw/events{/privacy}","received_events_url":"https://api.github.com/users/axw/received_events","type":"User","site_admin":false},"created_at":"2017-11-08T13:42:01Z","updated_at":"2017-11-08T13:42:01Z","author_association":"MEMBER","body":"NOTE: this will not be landing until after we branch for 2.3. I'm not concerned about breakage, but it's an unnecessary risk and can wait."}}
{"actor":{"display_login":"axw"}}