{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/etcd/issues/2817","labels_url":"https://api.github.com/repos/coreos/etcd/issues/2817/labels{/name}","comments_url":"https://api.github.com/repos/coreos/etcd/issues/2817/comments","events_url":"https://api.github.com/repos/coreos/etcd/issues/2817/events","html_url":"https://github.com/coreos/etcd/issues/2817","id":75703219,"number":2817,"title":"fine-grained API version control?","user":{"login":"xiang90","id":4479947,"avatar_url":"https://avatars.githubusercontent.com/u/4479947?v=3","gravatar_id":"","url":"https://api.github.com/users/xiang90","html_url":"https://github.com/xiang90","followers_url":"https://api.github.com/users/xiang90/followers","following_url":"https://api.github.com/users/xiang90/following{/other_user}","gists_url":"https://api.github.com/users/xiang90/gists{/gist_id}","starred_url":"https://api.github.com/users/xiang90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiang90/subscriptions","organizations_url":"https://api.github.com/users/xiang90/orgs","repos_url":"https://api.github.com/users/xiang90/repos","events_url":"https://api.github.com/users/xiang90/events{/privacy}","received_events_url":"https://api.github.com/users/xiang90/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-12T18:57:17Z","updated_at":"2015-05-12T19:42:28Z","closed_at":null,"body":"Currently we have the following endpoints\r\n\r\n```\r\nsecurityPrefix           = \"/v2/security\" [2.1]\r\nkeysPrefix               = \"/v2/keys\" [2.0, 2.1]\r\ndeprecatedMachinesPrefix = \"/v2/machines\" [2.0, 2.1]\r\nmembersPrefix            = \"/v2/members\" [2.0, 2.1]\r\nstatsPrefix              = \"/v2/stats\" [2.0, 2.1]\r\n```\r\n\r\nThe simplest way to control one versioned endpoint is only controlled its sub-endpoint. \r\n\r\nFor example, we can ensure that 2.0 cluster cannot access /v2/security endpoint since it is only supported in 2.1+.\r\n\r\nHowever this is quite limited since we might add new method into an existing sub-endpoint sometimes. For example we might want to introduce `/v2/security/abc` in 2.2. If we only version one sub-endpoint, then it is hard for us to control. But, in reality, this kind of sub-endpoint change does not introduce compatibility issues in most cases.\r\n\r\nAnother way to deal with it is to version the actual endpoint together with etcd cluster version. So when we change anything, we bump the version of the whole versioned endpoint. \r\n\r\nFor example, if we introduce security endpoint we need to add a full `/v2.1` endpoint (note that endpoint version does not need to be the same with etcd version).\r\n\r\n/cc @yichengq @barakmich @bakins @philips any idea?"},"comment":{"url":"https://api.github.com/repos/coreos/etcd/issues/comments/101396743","html_url":"https://github.com/coreos/etcd/issues/2817#issuecomment-101396743","issue_url":"https://api.github.com/repos/coreos/etcd/issues/2817","id":101396743,"user":{"login":"xiang90","id":4479947,"avatar_url":"https://avatars.githubusercontent.com/u/4479947?v=3","gravatar_id":"","url":"https://api.github.com/users/xiang90","html_url":"https://github.com/xiang90","followers_url":"https://api.github.com/users/xiang90/followers","following_url":"https://api.github.com/users/xiang90/following{/other_user}","gists_url":"https://api.github.com/users/xiang90/gists{/gist_id}","starred_url":"https://api.github.com/users/xiang90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiang90/subscriptions","organizations_url":"https://api.github.com/users/xiang90/orgs","repos_url":"https://api.github.com/users/xiang90/repos","events_url":"https://api.github.com/users/xiang90/events{/privacy}","received_events_url":"https://api.github.com/users/xiang90/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T19:42:28Z","updated_at":"2015-05-12T19:42:28Z","body":"4th idea is only to store the feature diffs. So 2.1 has a security feature diff, and only when the cluster version is 2.1 we enable that feature diff."}}