{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/mantle/issues/264","repository_url":"https://api.github.com/repos/coreos/mantle","labels_url":"https://api.github.com/repos/coreos/mantle/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/coreos/mantle/issues/264/comments","events_url":"https://api.github.com/repos/coreos/mantle/issues/264/events","html_url":"https://github.com/coreos/mantle/pull/264","id":140842777,"number":264,"title":"platform: make cluster.Machines() less surprising","user":{"login":"pbx0","id":10945781,"avatar_url":"https://avatars.githubusercontent.com/u/10945781?v=3","gravatar_id":"","url":"https://api.github.com/users/pbx0","html_url":"https://github.com/pbx0","followers_url":"https://api.github.com/users/pbx0/followers","following_url":"https://api.github.com/users/pbx0/following{/other_user}","gists_url":"https://api.github.com/users/pbx0/gists{/gist_id}","starred_url":"https://api.github.com/users/pbx0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbx0/subscriptions","organizations_url":"https://api.github.com/users/pbx0/orgs","repos_url":"https://api.github.com/users/pbx0/repos","events_url":"https://api.github.com/users/pbx0/events{/privacy}","received_events_url":"https://api.github.com/users/pbx0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-15T01:20:02Z","updated_at":"2016-03-15T18:38:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/coreos/mantle/pulls/264","html_url":"https://github.com/coreos/mantle/pull/264","diff_url":"https://github.com/coreos/mantle/pull/264.diff","patch_url":"https://github.com/coreos/mantle/pull/264.patch"},"body":"Change cluster.Machines() to be less surprising. Since it returns a\r\nslice, kola test-writers may assume that the order of this is always the\r\nsame.  While changing the backing structure from a map to a slice still\r\ndoesn't make this strictly true because elements can be deleted, it will\r\nmake it true in the common case. Normally, machines are not torn down\r\nuntil the end of a test.\r\n\r\nI think this is worthwhile regardless if the better advice is to always\r\ncarry pointers to machines created in a test."},"comment":{"url":"https://api.github.com/repos/coreos/mantle/issues/comments/196966432","html_url":"https://github.com/coreos/mantle/pull/264#issuecomment-196966432","issue_url":"https://api.github.com/repos/coreos/mantle/issues/264","id":196966432,"user":{"login":"pbx0","id":10945781,"avatar_url":"https://avatars.githubusercontent.com/u/10945781?v=3","gravatar_id":"","url":"https://api.github.com/users/pbx0","html_url":"https://github.com/pbx0","followers_url":"https://api.github.com/users/pbx0/followers","following_url":"https://api.github.com/users/pbx0/following{/other_user}","gists_url":"https://api.github.com/users/pbx0/gists{/gist_id}","starred_url":"https://api.github.com/users/pbx0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbx0/subscriptions","organizations_url":"https://api.github.com/users/pbx0/orgs","repos_url":"https://api.github.com/users/pbx0/repos","events_url":"https://api.github.com/users/pbx0/events{/privacy}","received_events_url":"https://api.github.com/users/pbx0/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T18:38:06Z","updated_at":"2016-03-15T18:38:06Z","body":"I thought about doing a sort, but, it will probably be more likely to confuse the common case where machines are created in serial sequence and someone tries to slice off the first machine specifically (usually some form of a master). Many tests have one machine and slice the first element. Its quite possible that future updates to that test to add more machines would break that. Deletes during a test are rare and could be surprising either way.\r\n\r\nWhat if we just change the function to pass back a map instead of a slice? Then its always obvious you can't rely on order. I don't think it'd be much work to modify tests into complying here."}}