{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/orleans/pulls/comments/108475438","pull_request_review_id":29508742,"id":108475438,"diff_hunk":"@@ -215,15 +215,26 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont\n         /// </summary>\n         public Dispatcher Dispatcher { get; }\n \n-        public IList<SiloAddress> GetCompatibleSiloList(GrainId grain)\n+        public IList<SiloAddress> GetCompatibleSiloList(PlacementTarget target)\n         {\n             // For test only: if we have silos that are not yet in the Cluster TypeMap, we assume that they are compatible\n             // with the current silo\n             if (this.config.AssumeHomogenousSilosForTesting)\n                 return AllActiveSilos;\n \n-            var typeCode = grain.GetTypeCode();\n-            var compatibleSilos = GrainTypeManager.GetSupportedSilos(typeCode).Intersect(AllActiveSilos).ToList();\n+            var typeCode = target.GrainId.GetTypeCode();\n+            IReadOnlyList<SiloAddress> silos;\n+            if (target.InterfaceVersion > 0)\n+            {\n+                var versions = new[] { GrainTypeManager.GetAvailableVersions(target.InterfaceId).Max() };\n+                silos = GrainTypeManager.GetSupportedSilos(typeCode, target.InterfaceId, versions);","path":"src/OrleansRuntime/Catalog/Catalog.cs","position":28,"original_position":28,"commit_id":"2c427c6b416a403621761b14524e215333ab5d82","original_commit_id":"2c427c6b416a403621761b14524e215333ab5d82","user":{"login":"benjaminpetit","id":20427417,"avatar_url":"https://avatars3.githubusercontent.com/u/20427417?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaminpetit","html_url":"https://github.com/benjaminpetit","followers_url":"https://api.github.com/users/benjaminpetit/followers","following_url":"https://api.github.com/users/benjaminpetit/following{/other_user}","gists_url":"https://api.github.com/users/benjaminpetit/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminpetit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminpetit/subscriptions","organizations_url":"https://api.github.com/users/benjaminpetit/orgs","repos_url":"https://api.github.com/users/benjaminpetit/repos","events_url":"https://api.github.com/users/benjaminpetit/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminpetit/received_events","type":"User","site_admin":false},"body":"It will change in a next PR","created_at":"2017-03-28T16:51:42Z","updated_at":"2017-03-28T16:51:42Z","html_url":"https://github.com/dotnet/orleans/pull/2837#discussion_r108475438","pull_request_url":"https://api.github.com/repos/dotnet/orleans/pulls/2837","_links":{"self":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/comments/108475438"},"html":{"href":"https://github.com/dotnet/orleans/pull/2837#discussion_r108475438"},"pull_request":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/2837"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/orleans/pulls/2837","id":110214839,"html_url":"https://github.com/dotnet/orleans/pull/2837","diff_url":"https://github.com/dotnet/orleans/pull/2837.diff","patch_url":"https://github.com/dotnet/orleans/pull/2837.patch","issue_url":"https://api.github.com/repos/dotnet/orleans/issues/2837","number":2837,"state":"open","locked":false,"title":"Grain interface versioning","user":{"login":"benjaminpetit","id":20427417,"avatar_url":"https://avatars3.githubusercontent.com/u/20427417?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaminpetit","html_url":"https://github.com/benjaminpetit","followers_url":"https://api.github.com/users/benjaminpetit/followers","following_url":"https://api.github.com/users/benjaminpetit/following{/other_user}","gists_url":"https://api.github.com/users/benjaminpetit/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminpetit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminpetit/subscriptions","organizations_url":"https://api.github.com/users/benjaminpetit/orgs","repos_url":"https://api.github.com/users/benjaminpetit/repos","events_url":"https://api.github.com/users/benjaminpetit/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminpetit/received_events","type":"User","site_admin":false},"body":"This is a first step for rolling upgrade: enable grain versioning.\r\n\r\nIn this PR we implemented the solution 2 described in issue #2644: adding a version attribute on Grain interfaces. \r\n\r\n## Proposed changes\r\nThe developer can specify the version with the `VersionAttribute` on the grain interfaces. Currently, when sending a request to a grain, we only send the target `GrainId` along with the `InterfaceId` and the `MethodId`: now we add the interface version information to this request.\r\n\r\nIt will be the responsibility of the silo to decide if an existing activation can handle a request of a given version, and in a case of a new activation what version to use.\r\n\r\nI tried to divide the PR in logical commits, so it is easier to review:\r\n- The \"codegen part\" is in b7fc911 and b84de04: I added the `Version` atribute and the `InterfaceVersion` member in `IGrainMethodInvoker` and `GrainReference`\r\n- Then in 88562c9 I updated `GrainInterfaceMap` and `GrainTypeManager` to store/surface the version attribute\r\n- b520310 is a simple refactor of `IPlacementDirector`: to place a new grain we also need now the requested grain interface along with its version\r\n- In 37f634b and a3041d3 I implemented simple rules to always place new activations on silo with the latest version, and disable current one if a request cannot be processed by the current activation\r\n-  b27d903 is adding tests for this feature. The setup might appear complicated, but I need to start two silos with different assemblies.\r\n\r\n## Limitations\r\nFor now, we assume that all new implementations are backward compatibles, and that all new activations should be placed on silos that have the latest version of the interface. In next PR(s) we will extract this logic into “policies” and add some configurable options.\r\n","created_at":"2017-03-10T21:42:36Z","updated_at":"2017-03-28T16:51:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88125b6ac9c459832c4f12ddb3c6ffe5bf231dd4","assignee":{"login":"sergeybykov","id":8248806,"avatar_url":"https://avatars2.githubusercontent.com/u/8248806?v=3","gravatar_id":"","url":"https://api.github.com/users/sergeybykov","html_url":"https://github.com/sergeybykov","followers_url":"https://api.github.com/users/sergeybykov/followers","following_url":"https://api.github.com/users/sergeybykov/following{/other_user}","gists_url":"https://api.github.com/users/sergeybykov/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeybykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeybykov/subscriptions","organizations_url":"https://api.github.com/users/sergeybykov/orgs","repos_url":"https://api.github.com/users/sergeybykov/repos","events_url":"https://api.github.com/users/sergeybykov/events{/privacy}","received_events_url":"https://api.github.com/users/sergeybykov/received_events","type":"User","site_admin":false},"assignees":[{"login":"sergeybykov","id":8248806,"avatar_url":"https://avatars2.githubusercontent.com/u/8248806?v=3","gravatar_id":"","url":"https://api.github.com/users/sergeybykov","html_url":"https://github.com/sergeybykov","followers_url":"https://api.github.com/users/sergeybykov/followers","following_url":"https://api.github.com/users/sergeybykov/following{/other_user}","gists_url":"https://api.github.com/users/sergeybykov/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeybykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeybykov/subscriptions","organizations_url":"https://api.github.com/users/sergeybykov/orgs","repos_url":"https://api.github.com/users/sergeybykov/repos","events_url":"https://api.github.com/users/sergeybykov/events{/privacy}","received_events_url":"https://api.github.com/users/sergeybykov/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/orleans/pulls/2837/commits","review_comments_url":"https://api.github.com/repos/dotnet/orleans/pulls/2837/comments","review_comment_url":"https://api.github.com/repos/dotnet/orleans/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/orleans/issues/2837/comments","statuses_url":"https://api.github.com/repos/dotnet/orleans/statuses/2c427c6b416a403621761b14524e215333ab5d82","head":{"label":"benjaminpetit:version-pr2","ref":"version-pr2","sha":"2c427c6b416a403621761b14524e215333ab5d82","user":{"login":"benjaminpetit","id":20427417,"avatar_url":"https://avatars3.githubusercontent.com/u/20427417?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaminpetit","html_url":"https://github.com/benjaminpetit","followers_url":"https://api.github.com/users/benjaminpetit/followers","following_url":"https://api.github.com/users/benjaminpetit/following{/other_user}","gists_url":"https://api.github.com/users/benjaminpetit/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminpetit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminpetit/subscriptions","organizations_url":"https://api.github.com/users/benjaminpetit/orgs","repos_url":"https://api.github.com/users/benjaminpetit/repos","events_url":"https://api.github.com/users/benjaminpetit/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminpetit/received_events","type":"User","site_admin":false},"repo":{"id":63194422,"name":"orleans","full_name":"benjaminpetit/orleans","owner":{"login":"benjaminpetit","id":20427417,"avatar_url":"https://avatars3.githubusercontent.com/u/20427417?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaminpetit","html_url":"https://github.com/benjaminpetit","followers_url":"https://api.github.com/users/benjaminpetit/followers","following_url":"https://api.github.com/users/benjaminpetit/following{/other_user}","gists_url":"https://api.github.com/users/benjaminpetit/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminpetit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminpetit/subscriptions","organizations_url":"https://api.github.com/users/benjaminpetit/orgs","repos_url":"https://api.github.com/users/benjaminpetit/repos","events_url":"https://api.github.com/users/benjaminpetit/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminpetit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benjaminpetit/orleans","description":"Orleans - Distributed Virtual Actor Model","fork":true,"url":"https://api.github.com/repos/benjaminpetit/orleans","forks_url":"https://api.github.com/repos/benjaminpetit/orleans/forks","keys_url":"https://api.github.com/repos/benjaminpetit/orleans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benjaminpetit/orleans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benjaminpetit/orleans/teams","hooks_url":"https://api.github.com/repos/benjaminpetit/orleans/hooks","issue_events_url":"https://api.github.com/repos/benjaminpetit/orleans/issues/events{/number}","events_url":"https://api.github.com/repos/benjaminpetit/orleans/events","assignees_url":"https://api.github.com/repos/benjaminpetit/orleans/assignees{/user}","branches_url":"https://api.github.com/repos/benjaminpetit/orleans/branches{/branch}","tags_url":"https://api.github.com/repos/benjaminpetit/orleans/tags","blobs_url":"https://api.github.com/repos/benjaminpetit/orleans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benjaminpetit/orleans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benjaminpetit/orleans/git/refs{/sha}","trees_url":"https://api.github.com/repos/benjaminpetit/orleans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benjaminpetit/orleans/statuses/{sha}","languages_url":"https://api.github.com/repos/benjaminpetit/orleans/languages","stargazers_url":"https://api.github.com/repos/benjaminpetit/orleans/stargazers","contributors_url":"https://api.github.com/repos/benjaminpetit/orleans/contributors","subscribers_url":"https://api.github.com/repos/benjaminpetit/orleans/subscribers","subscription_url":"https://api.github.com/repos/benjaminpetit/orleans/subscription","commits_url":"https://api.github.com/repos/benjaminpetit/orleans/commits{/sha}","git_commits_url":"https://api.github.com/repos/benjaminpetit/orleans/git/commits{/sha}","comments_url":"https://api.github.com/repos/benjaminpetit/orleans/comments{/number}","issue_comment_url":"https://api.github.com/repos/benjaminpetit/orleans/issues/comments{/number}","contents_url":"https://api.github.com/repos/benjaminpetit/orleans/contents/{+path}","compare_url":"https://api.github.com/repos/benjaminpetit/orleans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benjaminpetit/orleans/merges","archive_url":"https://api.github.com/repos/benjaminpetit/orleans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benjaminpetit/orleans/downloads","issues_url":"https://api.github.com/repos/benjaminpetit/orleans/issues{/number}","pulls_url":"https://api.github.com/repos/benjaminpetit/orleans/pulls{/number}","milestones_url":"https://api.github.com/repos/benjaminpetit/orleans/milestones{/number}","notifications_url":"https://api.github.com/repos/benjaminpetit/orleans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benjaminpetit/orleans/labels{/name}","releases_url":"https://api.github.com/repos/benjaminpetit/orleans/releases{/id}","deployments_url":"https://api.github.com/repos/benjaminpetit/orleans/deployments","created_at":"2016-07-12T21:45:14Z","updated_at":"2016-07-12T21:45:18Z","pushed_at":"2017-03-24T21:35:55Z","git_url":"git://github.com/benjaminpetit/orleans.git","ssh_url":"git@github.com:benjaminpetit/orleans.git","clone_url":"https://github.com/benjaminpetit/orleans.git","svn_url":"https://github.com/benjaminpetit/orleans","homepage":"http://dotnet.github.io/orleans","size":36555,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"12f2f558abb6609ff72b57990859ebe6fa1d4af3","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars3.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":28232663,"name":"orleans","full_name":"dotnet/orleans","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars3.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/orleans","description":"Orleans - Distributed Virtual Actor Model","fork":false,"url":"https://api.github.com/repos/dotnet/orleans","forks_url":"https://api.github.com/repos/dotnet/orleans/forks","keys_url":"https://api.github.com/repos/dotnet/orleans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/orleans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/orleans/teams","hooks_url":"https://api.github.com/repos/dotnet/orleans/hooks","issue_events_url":"https://api.github.com/repos/dotnet/orleans/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/orleans/events","assignees_url":"https://api.github.com/repos/dotnet/orleans/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/orleans/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/orleans/tags","blobs_url":"https://api.github.com/repos/dotnet/orleans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/orleans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/orleans/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/orleans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/orleans/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/orleans/languages","stargazers_url":"https://api.github.com/repos/dotnet/orleans/stargazers","contributors_url":"https://api.github.com/repos/dotnet/orleans/contributors","subscribers_url":"https://api.github.com/repos/dotnet/orleans/subscribers","subscription_url":"https://api.github.com/repos/dotnet/orleans/subscription","commits_url":"https://api.github.com/repos/dotnet/orleans/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/orleans/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/orleans/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/orleans/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/orleans/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/orleans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/orleans/merges","archive_url":"https://api.github.com/repos/dotnet/orleans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/orleans/downloads","issues_url":"https://api.github.com/repos/dotnet/orleans/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/orleans/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/orleans/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/orleans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/orleans/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/orleans/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/orleans/deployments","created_at":"2014-12-19T14:32:50Z","updated_at":"2017-03-28T16:06:48Z","pushed_at":"2017-03-28T13:53:00Z","git_url":"git://github.com/dotnet/orleans.git","ssh_url":"git@github.com:dotnet/orleans.git","clone_url":"https://github.com/dotnet/orleans.git","svn_url":"https://github.com/dotnet/orleans","homepage":"http://dotnet.github.io/orleans","size":37124,"stargazers_count":2674,"watchers_count":2674,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":664,"mirror_url":null,"open_issues_count":256,"forks":664,"open_issues":256,"watchers":2674,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/2837"},"html":{"href":"https://github.com/dotnet/orleans/pull/2837"},"issue":{"href":"https://api.github.com/repos/dotnet/orleans/issues/2837"},"comments":{"href":"https://api.github.com/repos/dotnet/orleans/issues/2837/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/2837/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/2837/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/orleans/statuses/2c427c6b416a403621761b14524e215333ab5d82"}}}}
{"actor":{"display_login":"benjaminpetit"}}