{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/ignition/pulls/comments/204943720","pull_request_review_id":140117518,"id":204943720,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDk0MzcyMA==","diff_hunk":"@@ -31,6 +38,97 @@ func init() {\n \tTests = make(map[TestType][]types.Test)\n }\n \n-func Register(tType TestType, t types.Test) {\n+func register(tType TestType, t types.Test) {\n \tTests[tType] = append(Tests[tType], t)\n }\n+\n+// Registers t multiple times with different, compatible config versions\n+func Register(tType TestType, t types.Test) {\n+\t// todo: how to handle errors? it errors on Empty Userdata, Preemption with default config, Preemption with base, default config, Preemption with no config but these test still need to run\n+\tvar config typesInternal.Config\n+\terr := json.Unmarshal([]byte(t.Config), &config)\n+\tversion, semverErr := semver.NewVersion(config.Ignition.Version)\n+\n+\tregister(tType, t)\n+\tif err == nil && semverErr == nil && version.LessThan(maxTypes.MaxVersion) { // todo: how to identify max of different major versions?\n+\t\tversionStr := strconv.FormatInt(version.Major, 10) + \".\" + strconv.FormatInt(version.Minor, 10) + \".\" + strconv.FormatInt(version.Patch, 10)\n+\n+\t\tfor *version != maxTypes.MaxVersion {\n+\t\t\ttest := deepCopy(t)\n+\n+\t\t\tversion.Minor++\n+\t\t\tupdatedVersionStr := strconv.FormatInt(version.Major, 10) + \".\" + strconv.FormatInt(version.Minor, 10) + \".\" + strconv.FormatInt(version.Patch, 10)\n+\t\t\tif version.Minor == 3 {\n+\t\t\t\t*version = maxTypes.MaxVersion\n+\t\t\t\tupdatedVersionStr += \"-\" + string(version.PreRelease) + version.Metadata\n+\t\t\t}\n+\n+\t\t\ttest.Config = strings.Replace(test.Config, versionStr, updatedVersionStr, 1)\n+\t\t\ttest.Name += \" \" + updatedVersionStr\n+\t\t\tregister(tType, test)\n+\t\t}\n+\t}\n+}\n+\n+// Deep copy Test struct fields In, Out, MntDevices, OEMLookasideFiles, SystemDirFiles\n+// so each BB test with identical Test structs have their own independent Test copies\n+func deepCopy(t types.Test) types.Test {\n+\tIn_diskArr := make([]types.Disk, len(t.In))\n+\tcopy(In_diskArr, t.In)\n+\tt.In = deepCopyPartitions(In_diskArr)\n+\n+\tOut_diskArr := make([]types.Disk, len(t.Out))\n+\tcopy(Out_diskArr, t.Out)\n+\tt.Out = deepCopyPartitions(Out_diskArr)\n+\n+\tmntdevice := make([]types.MntDevice, len(t.MntDevices))\n+\tcopy(mntdevice, t.MntDevices)\n+\tt.MntDevices = mntdevice\n+\n+\tOEMLookasideFiles := make([]types.File, len(t.OEMLookasideFiles))\n+\tcopy(OEMLookasideFiles, t.OEMLookasideFiles)\n+\tt.OEMLookasideFiles = OEMLookasideFiles\n+\n+\tSystemDirFiles := make([]types.File, len(t.SystemDirFiles))\n+\tcopy(SystemDirFiles, t.SystemDirFiles)\n+\tt.SystemDirFiles = SystemDirFiles\n+\n+\treturn t\n+}\n+\n+// Deep copy each partition in []*Partitions\n+func deepCopyPartitions(diskArr []types.Disk) []types.Disk {","path":"tests/register/register.go","position":78,"original_position":78,"commit_id":"594ebaec511d3a6006dc89d0cda30180f3f078ca","original_commit_id":"594ebaec511d3a6006dc89d0cda30180f3f078ca","user":{"login":"arithx","id":1923653,"node_id":"MDQ6VXNlcjE5MjM2NTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1923653?v=4","gravatar_id":"","url":"https://api.github.com/users/arithx","html_url":"https://github.com/arithx","followers_url":"https://api.github.com/users/arithx/followers","following_url":"https://api.github.com/users/arithx/following{/other_user}","gists_url":"https://api.github.com/users/arithx/gists{/gist_id}","starred_url":"https://api.github.com/users/arithx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arithx/subscriptions","organizations_url":"https://api.github.com/users/arithx/orgs","repos_url":"https://api.github.com/users/arithx/repos","events_url":"https://api.github.com/users/arithx/events{/privacy}","received_events_url":"https://api.github.com/users/arithx/received_events","type":"User","site_admin":false},"body":"In general if it's a struct or a method of a struct it belongs in the `types` package.\r\n\r\nIn this case it's a little bit more of a grey area and could live in either. It's more personal preference on my part to keep a relatively generic operation against the struct in the same package.","created_at":"2018-07-24T23:35:19Z","updated_at":"2018-07-24T23:37:22Z","html_url":"https://github.com/coreos/ignition/pull/575#discussion_r204943720","pull_request_url":"https://api.github.com/repos/coreos/ignition/pulls/575","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/coreos/ignition/pulls/comments/204943720"},"html":{"href":"https://github.com/coreos/ignition/pull/575#discussion_r204943720"},"pull_request":{"href":"https://api.github.com/repos/coreos/ignition/pulls/575"}},"in_reply_to_id":204935722},"pull_request":{"url":"https://api.github.com/repos/coreos/ignition/pulls/575","id":199097345,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MDk3MzQ1","html_url":"https://github.com/coreos/ignition/pull/575","diff_url":"https://github.com/coreos/ignition/pull/575.diff","patch_url":"https://github.com/coreos/ignition/pull/575.patch","issue_url":"https://api.github.com/repos/coreos/ignition/issues/575","number":575,"state":"open","locked":false,"title":"tests/register: Run BB test on all compatible config versions","user":{"login":"Rahuls0720","id":18043871,"node_id":"MDQ6VXNlcjE4MDQzODcx","avatar_url":"https://avatars2.githubusercontent.com/u/18043871?v=4","gravatar_id":"","url":"https://api.github.com/users/Rahuls0720","html_url":"https://github.com/Rahuls0720","followers_url":"https://api.github.com/users/Rahuls0720/followers","following_url":"https://api.github.com/users/Rahuls0720/following{/other_user}","gists_url":"https://api.github.com/users/Rahuls0720/gists{/gist_id}","starred_url":"https://api.github.com/users/Rahuls0720/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rahuls0720/subscriptions","organizations_url":"https://api.github.com/users/Rahuls0720/orgs","repos_url":"https://api.github.com/users/Rahuls0720/repos","events_url":"https://api.github.com/users/Rahuls0720/events{/privacy}","received_events_url":"https://api.github.com/users/Rahuls0720/received_events","type":"User","site_admin":false},"body":"The purpose of this PR is have blackbox tests to run all compatible versions. For example, a BB test with a 2.0.0 config should be registered and ran 4 different times; As a 2.0.0 config, a 2.1.0 config, a 2.2.0 config, and a 2.3.0-experimental config.\r\n\r\nThe jira card is: https://projects.engineering.redhat.com/browse/COREOS-76\r\n\r\nISSUE: Identical tests (different configs) are failing due to errors mounting/un-mounting the root partition or some other partition. Test usually pass when they are not ran concurrently and only sometimes pass when ran concurrently. Not sure why its so flaky. Any help would be great.","created_at":"2018-07-03T22:22:45Z","updated_at":"2018-07-24T23:37:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48e0ab38e2070d4e0b3dd4da8bafc742841a65e8","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ajeddeloh","id":2753421,"node_id":"MDQ6VXNlcjI3NTM0MjE=","avatar_url":"https://avatars3.githubusercontent.com/u/2753421?v=4","gravatar_id":"","url":"https://api.github.com/users/ajeddeloh","html_url":"https://github.com/ajeddeloh","followers_url":"https://api.github.com/users/ajeddeloh/followers","following_url":"https://api.github.com/users/ajeddeloh/following{/other_user}","gists_url":"https://api.github.com/users/ajeddeloh/gists{/gist_id}","starred_url":"https://api.github.com/users/ajeddeloh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajeddeloh/subscriptions","organizations_url":"https://api.github.com/users/ajeddeloh/orgs","repos_url":"https://api.github.com/users/ajeddeloh/repos","events_url":"https://api.github.com/users/ajeddeloh/events{/privacy}","received_events_url":"https://api.github.com/users/ajeddeloh/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/coreos/ignition/pulls/575/commits","review_comments_url":"https://api.github.com/repos/coreos/ignition/pulls/575/comments","review_comment_url":"https://api.github.com/repos/coreos/ignition/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/ignition/issues/575/comments","statuses_url":"https://api.github.com/repos/coreos/ignition/statuses/594ebaec511d3a6006dc89d0cda30180f3f078ca","head":{"label":"Rahuls0720:BBConfigCompatibility_dev","ref":"BBConfigCompatibility_dev","sha":"594ebaec511d3a6006dc89d0cda30180f3f078ca","user":{"login":"Rahuls0720","id":18043871,"node_id":"MDQ6VXNlcjE4MDQzODcx","avatar_url":"https://avatars2.githubusercontent.com/u/18043871?v=4","gravatar_id":"","url":"https://api.github.com/users/Rahuls0720","html_url":"https://github.com/Rahuls0720","followers_url":"https://api.github.com/users/Rahuls0720/followers","following_url":"https://api.github.com/users/Rahuls0720/following{/other_user}","gists_url":"https://api.github.com/users/Rahuls0720/gists{/gist_id}","starred_url":"https://api.github.com/users/Rahuls0720/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rahuls0720/subscriptions","organizations_url":"https://api.github.com/users/Rahuls0720/orgs","repos_url":"https://api.github.com/users/Rahuls0720/repos","events_url":"https://api.github.com/users/Rahuls0720/events{/privacy}","received_events_url":"https://api.github.com/users/Rahuls0720/received_events","type":"User","site_admin":false},"repo":{"id":136674944,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY2NzQ5NDQ=","name":"ignition","full_name":"Rahuls0720/ignition","owner":{"login":"Rahuls0720","id":18043871,"node_id":"MDQ6VXNlcjE4MDQzODcx","avatar_url":"https://avatars2.githubusercontent.com/u/18043871?v=4","gravatar_id":"","url":"https://api.github.com/users/Rahuls0720","html_url":"https://github.com/Rahuls0720","followers_url":"https://api.github.com/users/Rahuls0720/followers","following_url":"https://api.github.com/users/Rahuls0720/following{/other_user}","gists_url":"https://api.github.com/users/Rahuls0720/gists{/gist_id}","starred_url":"https://api.github.com/users/Rahuls0720/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rahuls0720/subscriptions","organizations_url":"https://api.github.com/users/Rahuls0720/orgs","repos_url":"https://api.github.com/users/Rahuls0720/repos","events_url":"https://api.github.com/users/Rahuls0720/events{/privacy}","received_events_url":"https://api.github.com/users/Rahuls0720/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rahuls0720/ignition","description":"First boot installer and configuration tool","fork":true,"url":"https://api.github.com/repos/Rahuls0720/ignition","forks_url":"https://api.github.com/repos/Rahuls0720/ignition/forks","keys_url":"https://api.github.com/repos/Rahuls0720/ignition/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rahuls0720/ignition/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rahuls0720/ignition/teams","hooks_url":"https://api.github.com/repos/Rahuls0720/ignition/hooks","issue_events_url":"https://api.github.com/repos/Rahuls0720/ignition/issues/events{/number}","events_url":"https://api.github.com/repos/Rahuls0720/ignition/events","assignees_url":"https://api.github.com/repos/Rahuls0720/ignition/assignees{/user}","branches_url":"https://api.github.com/repos/Rahuls0720/ignition/branches{/branch}","tags_url":"https://api.github.com/repos/Rahuls0720/ignition/tags","blobs_url":"https://api.github.com/repos/Rahuls0720/ignition/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rahuls0720/ignition/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rahuls0720/ignition/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rahuls0720/ignition/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rahuls0720/ignition/statuses/{sha}","languages_url":"https://api.github.com/repos/Rahuls0720/ignition/languages","stargazers_url":"https://api.github.com/repos/Rahuls0720/ignition/stargazers","contributors_url":"https://api.github.com/repos/Rahuls0720/ignition/contributors","subscribers_url":"https://api.github.com/repos/Rahuls0720/ignition/subscribers","subscription_url":"https://api.github.com/repos/Rahuls0720/ignition/subscription","commits_url":"https://api.github.com/repos/Rahuls0720/ignition/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rahuls0720/ignition/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rahuls0720/ignition/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rahuls0720/ignition/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rahuls0720/ignition/contents/{+path}","compare_url":"https://api.github.com/repos/Rahuls0720/ignition/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rahuls0720/ignition/merges","archive_url":"https://api.github.com/repos/Rahuls0720/ignition/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rahuls0720/ignition/downloads","issues_url":"https://api.github.com/repos/Rahuls0720/ignition/issues{/number}","pulls_url":"https://api.github.com/repos/Rahuls0720/ignition/pulls{/number}","milestones_url":"https://api.github.com/repos/Rahuls0720/ignition/milestones{/number}","notifications_url":"https://api.github.com/repos/Rahuls0720/ignition/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rahuls0720/ignition/labels{/name}","releases_url":"https://api.github.com/repos/Rahuls0720/ignition/releases{/id}","deployments_url":"https://api.github.com/repos/Rahuls0720/ignition/deployments","created_at":"2018-06-08T23:33:36Z","updated_at":"2018-06-29T21:31:56Z","pushed_at":"2018-07-24T22:08:24Z","git_url":"git://github.com/Rahuls0720/ignition.git","ssh_url":"git@github.com:Rahuls0720/ignition.git","clone_url":"https://github.com/Rahuls0720/ignition.git","svn_url":"https://github.com/Rahuls0720/ignition","homepage":"https://coreos.com/ignition/docs/latest/","size":2448,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coreos:master","ref":"master","sha":"231cb92d3bc78c387dd08b8fdb9ffc75b9af070b","user":{"login":"coreos","id":3730757,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MzA3NTc=","avatar_url":"https://avatars3.githubusercontent.com/u/3730757?v=4","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":33020174,"node_id":"MDEwOlJlcG9zaXRvcnkzMzAyMDE3NA==","name":"ignition","full_name":"coreos/ignition","owner":{"login":"coreos","id":3730757,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MzA3NTc=","avatar_url":"https://avatars3.githubusercontent.com/u/3730757?v=4","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/ignition","description":"First boot installer and configuration tool","fork":false,"url":"https://api.github.com/repos/coreos/ignition","forks_url":"https://api.github.com/repos/coreos/ignition/forks","keys_url":"https://api.github.com/repos/coreos/ignition/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/ignition/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/ignition/teams","hooks_url":"https://api.github.com/repos/coreos/ignition/hooks","issue_events_url":"https://api.github.com/repos/coreos/ignition/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/ignition/events","assignees_url":"https://api.github.com/repos/coreos/ignition/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/ignition/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/ignition/tags","blobs_url":"https://api.github.com/repos/coreos/ignition/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/ignition/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/ignition/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/ignition/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/ignition/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/ignition/languages","stargazers_url":"https://api.github.com/repos/coreos/ignition/stargazers","contributors_url":"https://api.github.com/repos/coreos/ignition/contributors","subscribers_url":"https://api.github.com/repos/coreos/ignition/subscribers","subscription_url":"https://api.github.com/repos/coreos/ignition/subscription","commits_url":"https://api.github.com/repos/coreos/ignition/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/ignition/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/ignition/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/ignition/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/ignition/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/ignition/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/ignition/merges","archive_url":"https://api.github.com/repos/coreos/ignition/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/ignition/downloads","issues_url":"https://api.github.com/repos/coreos/ignition/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/ignition/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/ignition/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/ignition/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/ignition/labels{/name}","releases_url":"https://api.github.com/repos/coreos/ignition/releases{/id}","deployments_url":"https://api.github.com/repos/coreos/ignition/deployments","created_at":"2015-03-28T03:52:33Z","updated_at":"2018-07-23T20:01:04Z","pushed_at":"2018-07-24T22:08:25Z","git_url":"git://github.com/coreos/ignition.git","ssh_url":"git@github.com:coreos/ignition.git","clone_url":"https://github.com/coreos/ignition.git","svn_url":"https://github.com/coreos/ignition","homepage":"https://coreos.com/ignition/docs/latest/","size":2439,"stargazers_count":240,"watchers_count":240,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":99,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":99,"open_issues":34,"watchers":240,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/ignition/pulls/575"},"html":{"href":"https://github.com/coreos/ignition/pull/575"},"issue":{"href":"https://api.github.com/repos/coreos/ignition/issues/575"},"comments":{"href":"https://api.github.com/repos/coreos/ignition/issues/575/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/ignition/pulls/575/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/ignition/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/ignition/pulls/575/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/ignition/statuses/594ebaec511d3a6006dc89d0cda30180f3f078ca"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"arithx"}}