{"action":"created","comment":{"url":"https://api.github.com/repos/appium/appium-xcuitest-driver/pulls/comments/199336836","pull_request_review_id":133441220,"id":199336836,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTMzNjgzNg==","diff_hunk":"@@ -412,10 +417,7 @@ class XCUITestDriver extends BaseDriver {\n       await this.wda.uninstall();\n       this.logEvent('wdaUninstalled');\n     } else if (!util.hasValue(this.wda.webDriverAgentUrl) && (await this.wda.isRunning())) {\n-      log.info(`Will reuse previously cached WDA instance at '${this.wda.url.href}'. ` +","path":"lib/driver.js","position":16,"original_position":16,"commit_id":"c48c7af52d1c321f7318ffb81f7fede4ff000bf5","original_commit_id":"c48c7af52d1c321f7318ffb81f7fede4ff000bf5","user":{"login":"KazuCocoa","id":5511591,"node_id":"MDQ6VXNlcjU1MTE1OTE=","avatar_url":"https://avatars3.githubusercontent.com/u/5511591?v=4","gravatar_id":"","url":"https://api.github.com/users/KazuCocoa","html_url":"https://github.com/KazuCocoa","followers_url":"https://api.github.com/users/KazuCocoa/followers","following_url":"https://api.github.com/users/KazuCocoa/following{/other_user}","gists_url":"https://api.github.com/users/KazuCocoa/gists{/gist_id}","starred_url":"https://api.github.com/users/KazuCocoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KazuCocoa/subscriptions","organizations_url":"https://api.github.com/users/KazuCocoa/orgs","repos_url":"https://api.github.com/users/KazuCocoa/repos","events_url":"https://api.github.com/users/KazuCocoa/events{/privacy}","received_events_url":"https://api.github.com/users/KazuCocoa/received_events","type":"User","site_admin":false},"body":"`await this.wda.isRunning()` is for old WDA. After https://github.com/appium/WebDriverAgent/pull/95 WDA, `await this.wda.isRunning()` is redundant method since we call `await this.getRunningBundleId()` in `uninstallWDAIfRunningBundleIdIsDifferent`. The cost is it increases the number of calling http request, `/status`, to twice.","created_at":"2018-07-01T02:56:15Z","updated_at":"2018-07-01T02:56:20Z","html_url":"https://github.com/appium/appium-xcuitest-driver/pull/712#discussion_r199336836","pull_request_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/pulls/712","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/appium/appium-xcuitest-driver/pulls/comments/199336836"},"html":{"href":"https://github.com/appium/appium-xcuitest-driver/pull/712#discussion_r199336836"},"pull_request":{"href":"https://api.github.com/repos/appium/appium-xcuitest-driver/pulls/712"}}},"pull_request":{"url":"https://api.github.com/repos/appium/appium-xcuitest-driver/pulls/712","id":198052391,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MDUyMzkx","html_url":"https://github.com/appium/appium-xcuitest-driver/pull/712","diff_url":"https://github.com/appium/appium-xcuitest-driver/pull/712.diff","patch_url":"https://github.com/appium/appium-xcuitest-driver/pull/712.patch","issue_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/issues/712","number":712,"state":"open","locked":false,"title":"[WIP]try to uninstall WDA if updatedWDABundleId exists","user":{"login":"KazuCocoa","id":5511591,"node_id":"MDQ6VXNlcjU1MTE1OTE=","avatar_url":"https://avatars3.githubusercontent.com/u/5511591?v=4","gravatar_id":"","url":"https://api.github.com/users/KazuCocoa","html_url":"https://github.com/KazuCocoa","followers_url":"https://api.github.com/users/KazuCocoa/followers","following_url":"https://api.github.com/users/KazuCocoa/following{/other_user}","gists_url":"https://api.github.com/users/KazuCocoa/gists{/gist_id}","starred_url":"https://api.github.com/users/KazuCocoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KazuCocoa/subscriptions","organizations_url":"https://api.github.com/users/KazuCocoa/orgs","repos_url":"https://api.github.com/users/KazuCocoa/repos","events_url":"https://api.github.com/users/KazuCocoa/events{/privacy}","received_events_url":"https://api.github.com/users/KazuCocoa/received_events","type":"User","site_admin":false},"body":"re: _add checking current running WDA and making sure the bundle id isn't same as updatedWDABundleId #709_\r\nrelated with: https://github.com/appium/appium/issues/10945\r\n\r\n---\r\n\r\nWe have no way to get running WDA's `PRODUCT_BUNDLE_IDENTIFIER` [note1](https://github.com/appium/appium-xcuitest-driver/pull/709/files#r198679101), [note2](https://github.com/appium/appium-xcuitest-driver/pull/709/files#diff-dd1c1e9a4d2cba48fc21e5d2c50abcafR134) by running WDA application.\r\n\r\nAs addressed in https://github.com/appium/appium-xcuitest-driver/pull/712#issuecomment-401088068, we handle running the bundle id in https://github.com/appium/appium-xcuitest-driver/blob/master/lib/wda/utils.js#L8 . When users set `updatedWDABundleId` in their capability, Appum replaces the bundle id with `updatedWDABundleId` and run it on the test device.\r\n\r\nWe reuse running WDA to reduce a time to uninstall/install WDA. https://github.com/appium/appium-xcuitest-driver/pull/712/files#diff-f64f06d264dffd32eb8d87f1b3095989L418 Then, we'd like to get running WDA's bundle id to identify which WDA is running.\r\n\r\nWe can set process argument via https://github.com/appium/appium-xcuitest-driver/pull/712/files#diff-c03fe36bcf5e25dc23373ccef7204144R203 against xcodebuild process. We've uses the way with a port number for WDA.\r\n\r\n_to identify which WDA is running_ depends on running xcodebuild process. Hence, it's enought to set the bundle id name in the process like https://github.com/appium/WebDriverAgent/pull/95 in this case. \r\n\r\nIf `webDriverAgentUrl` exists in the capability, uninstalling never happen. Users can use installed and running WDA in the case.\r\n\r\nFor backword compatibility.\r\nIf running WDA is old one. Then, the process go through https://github.com/appium/appium-xcuitest-driver/pull/712/files#diff-dd1c1e9a4d2cba48fc21e5d2c50abcafR293 as same as previous behaviour. In the case,  appium/appium#10945 happens since we can't get running WDA's bundle id.\r\n","created_at":"2018-06-28T14:39:15Z","updated_at":"2018-07-01T02:56:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37e37b4b6080da69c90e347ed3567fbef7684934","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/pulls/712/commits","review_comments_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/pulls/712/comments","review_comment_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/issues/712/comments","statuses_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/statuses/c48c7af52d1c321f7318ffb81f7fede4ff000bf5","head":{"label":"KazuCocoa:uninstall-wda-if-updatewdabundleid-exists","ref":"uninstall-wda-if-updatewdabundleid-exists","sha":"c48c7af52d1c321f7318ffb81f7fede4ff000bf5","user":{"login":"KazuCocoa","id":5511591,"node_id":"MDQ6VXNlcjU1MTE1OTE=","avatar_url":"https://avatars3.githubusercontent.com/u/5511591?v=4","gravatar_id":"","url":"https://api.github.com/users/KazuCocoa","html_url":"https://github.com/KazuCocoa","followers_url":"https://api.github.com/users/KazuCocoa/followers","following_url":"https://api.github.com/users/KazuCocoa/following{/other_user}","gists_url":"https://api.github.com/users/KazuCocoa/gists{/gist_id}","starred_url":"https://api.github.com/users/KazuCocoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KazuCocoa/subscriptions","organizations_url":"https://api.github.com/users/KazuCocoa/orgs","repos_url":"https://api.github.com/users/KazuCocoa/repos","events_url":"https://api.github.com/users/KazuCocoa/events{/privacy}","received_events_url":"https://api.github.com/users/KazuCocoa/received_events","type":"User","site_admin":false},"repo":{"id":63505665,"node_id":"MDEwOlJlcG9zaXRvcnk2MzUwNTY2NQ==","name":"appium-xcuitest-driver","full_name":"KazuCocoa/appium-xcuitest-driver","owner":{"login":"KazuCocoa","id":5511591,"node_id":"MDQ6VXNlcjU1MTE1OTE=","avatar_url":"https://avatars3.githubusercontent.com/u/5511591?v=4","gravatar_id":"","url":"https://api.github.com/users/KazuCocoa","html_url":"https://github.com/KazuCocoa","followers_url":"https://api.github.com/users/KazuCocoa/followers","following_url":"https://api.github.com/users/KazuCocoa/following{/other_user}","gists_url":"https://api.github.com/users/KazuCocoa/gists{/gist_id}","starred_url":"https://api.github.com/users/KazuCocoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KazuCocoa/subscriptions","organizations_url":"https://api.github.com/users/KazuCocoa/orgs","repos_url":"https://api.github.com/users/KazuCocoa/repos","events_url":"https://api.github.com/users/KazuCocoa/events{/privacy}","received_events_url":"https://api.github.com/users/KazuCocoa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KazuCocoa/appium-xcuitest-driver","description":"Appium iOS driver, backed by Apple XCUITest ","fork":true,"url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver","forks_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/forks","keys_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/teams","hooks_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/hooks","issue_events_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/issues/events{/number}","events_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/events","assignees_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/assignees{/user}","branches_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/branches{/branch}","tags_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/tags","blobs_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/languages","stargazers_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/stargazers","contributors_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/contributors","subscribers_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/subscribers","subscription_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/subscription","commits_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/contents/{+path}","compare_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/merges","archive_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/downloads","issues_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/issues{/number}","pulls_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/labels{/name}","releases_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/releases{/id}","deployments_url":"https://api.github.com/repos/KazuCocoa/appium-xcuitest-driver/deployments","created_at":"2016-07-16T23:01:57Z","updated_at":"2016-07-16T23:01:58Z","pushed_at":"2018-07-01T02:25:30Z","git_url":"git://github.com/KazuCocoa/appium-xcuitest-driver.git","ssh_url":"git@github.com:KazuCocoa/appium-xcuitest-driver.git","clone_url":"https://github.com/KazuCocoa/appium-xcuitest-driver.git","svn_url":"https://github.com/KazuCocoa/appium-xcuitest-driver","homepage":null,"size":25709,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"appium:master","ref":"master","sha":"aa7aa1524c0dca3853a892e07e5cb1035a915c01","user":{"login":"appium","id":3221291,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMjEyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3221291?v=4","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"repo":{"id":47652761,"node_id":"MDEwOlJlcG9zaXRvcnk0NzY1Mjc2MQ==","name":"appium-xcuitest-driver","full_name":"appium/appium-xcuitest-driver","owner":{"login":"appium","id":3221291,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMjEyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3221291?v=4","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appium/appium-xcuitest-driver","description":"Appium iOS driver, backed by Apple XCUITest ","fork":false,"url":"https://api.github.com/repos/appium/appium-xcuitest-driver","forks_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/forks","keys_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/teams","hooks_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/hooks","issue_events_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/issues/events{/number}","events_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/events","assignees_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/assignees{/user}","branches_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/branches{/branch}","tags_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/tags","blobs_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/languages","stargazers_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/stargazers","contributors_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/contributors","subscribers_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/subscribers","subscription_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/subscription","commits_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/contents/{+path}","compare_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/merges","archive_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/downloads","issues_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/issues{/number}","pulls_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/labels{/name}","releases_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/releases{/id}","deployments_url":"https://api.github.com/repos/appium/appium-xcuitest-driver/deployments","created_at":"2015-12-08T22:11:37Z","updated_at":"2018-06-29T20:04:21Z","pushed_at":"2018-07-01T02:25:31Z","git_url":"git://github.com/appium/appium-xcuitest-driver.git","ssh_url":"git@github.com:appium/appium-xcuitest-driver.git","clone_url":"https://github.com/appium/appium-xcuitest-driver.git","svn_url":"https://github.com/appium/appium-xcuitest-driver","homepage":null,"size":25711,"stargazers_count":220,"watchers_count":220,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":167,"mirror_url":null,"archived":false,"open_issues_count":5,"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":167,"open_issues":5,"watchers":220,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appium/appium-xcuitest-driver/pulls/712"},"html":{"href":"https://github.com/appium/appium-xcuitest-driver/pull/712"},"issue":{"href":"https://api.github.com/repos/appium/appium-xcuitest-driver/issues/712"},"comments":{"href":"https://api.github.com/repos/appium/appium-xcuitest-driver/issues/712/comments"},"review_comments":{"href":"https://api.github.com/repos/appium/appium-xcuitest-driver/pulls/712/comments"},"review_comment":{"href":"https://api.github.com/repos/appium/appium-xcuitest-driver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/appium/appium-xcuitest-driver/pulls/712/commits"},"statuses":{"href":"https://api.github.com/repos/appium/appium-xcuitest-driver/statuses/c48c7af52d1c321f7318ffb81f7fede4ff000bf5"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"KazuCocoa"}}