{"action":"opened","number":48492,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/48492","id":200229951,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMjI5OTUx","html_url":"https://github.com/saltstack/salt/pull/48492","diff_url":"https://github.com/saltstack/salt/pull/48492.diff","patch_url":"https://github.com/saltstack/salt/pull/48492.patch","issue_url":"https://api.github.com/repos/saltstack/salt/issues/48492","number":48492,"state":"open","locked":false,"title":"Improve handling of identifying json output (#43138)","user":{"login":"wyardley","id":10714426,"node_id":"MDQ6VXNlcjEwNzE0NDI2","avatar_url":"https://avatars3.githubusercontent.com/u/10714426?v=4","gravatar_id":"","url":"https://api.github.com/users/wyardley","html_url":"https://github.com/wyardley","followers_url":"https://api.github.com/users/wyardley/followers","following_url":"https://api.github.com/users/wyardley/following{/other_user}","gists_url":"https://api.github.com/users/wyardley/gists{/gist_id}","starred_url":"https://api.github.com/users/wyardley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wyardley/subscriptions","organizations_url":"https://api.github.com/users/wyardley/orgs","repos_url":"https://api.github.com/users/wyardley/repos","events_url":"https://api.github.com/users/wyardley/events{/privacy}","received_events_url":"https://api.github.com/users/wyardley/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\nRather than look for [ or { at the beginning of a line, it looks for equality. Since the JSON output of `npm install` seems to have the first character on its own, this seems to work, at least for the npm version I looked at -- however, I'm open to better / other approaches that would be better. I think the previous approach was a bit too limited, since there could be other output in the future that matches `^[` or `^{`.\r\n\r\n### What issues does this PR fix or reference?\r\nIdempotency issue - first run will \"fail\" with an error, even when packages get installed, if the output has a string like:\r\n```[grpc] Success: \"/usr/lib/node_modules/@google-cloud/monitoring/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node\" is installed via remote\r\n```\r\nMore details in #43138 \r\n\r\n### Tests written?\r\nNo - but willing to write one if you let me know where it should be go and what it should be modeled on. I threw together a quick one, but not sure if it's right.\r\n\r\n### Commits signed with GPG?\r\n\r\nYes","created_at":"2018-07-09T21:52:30Z","updated_at":"2018-07-09T21:52:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/saltstack/salt/pulls/48492/commits","review_comments_url":"https://api.github.com/repos/saltstack/salt/pulls/48492/comments","review_comment_url":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/48492/comments","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/309adc1fd46b3fdcccbf00b995b11ef4d018f8bf","head":{"label":"wyardley:wyardley-npm-json-output","ref":"wyardley-npm-json-output","sha":"309adc1fd46b3fdcccbf00b995b11ef4d018f8bf","user":{"login":"wyardley","id":10714426,"node_id":"MDQ6VXNlcjEwNzE0NDI2","avatar_url":"https://avatars3.githubusercontent.com/u/10714426?v=4","gravatar_id":"","url":"https://api.github.com/users/wyardley","html_url":"https://github.com/wyardley","followers_url":"https://api.github.com/users/wyardley/followers","following_url":"https://api.github.com/users/wyardley/following{/other_user}","gists_url":"https://api.github.com/users/wyardley/gists{/gist_id}","starred_url":"https://api.github.com/users/wyardley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wyardley/subscriptions","organizations_url":"https://api.github.com/users/wyardley/orgs","repos_url":"https://api.github.com/users/wyardley/repos","events_url":"https://api.github.com/users/wyardley/events{/privacy}","received_events_url":"https://api.github.com/users/wyardley/received_events","type":"User","site_admin":false},"repo":{"id":140332989,"node_id":"MDEwOlJlcG9zaXRvcnkxNDAzMzI5ODk=","name":"salt","full_name":"wyardley/salt","owner":{"login":"wyardley","id":10714426,"node_id":"MDQ6VXNlcjEwNzE0NDI2","avatar_url":"https://avatars3.githubusercontent.com/u/10714426?v=4","gravatar_id":"","url":"https://api.github.com/users/wyardley","html_url":"https://github.com/wyardley","followers_url":"https://api.github.com/users/wyardley/followers","following_url":"https://api.github.com/users/wyardley/following{/other_user}","gists_url":"https://api.github.com/users/wyardley/gists{/gist_id}","starred_url":"https://api.github.com/users/wyardley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wyardley/subscriptions","organizations_url":"https://api.github.com/users/wyardley/orgs","repos_url":"https://api.github.com/users/wyardley/repos","events_url":"https://api.github.com/users/wyardley/events{/privacy}","received_events_url":"https://api.github.com/users/wyardley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wyardley/salt","description":"Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here: ","fork":true,"url":"https://api.github.com/repos/wyardley/salt","forks_url":"https://api.github.com/repos/wyardley/salt/forks","keys_url":"https://api.github.com/repos/wyardley/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wyardley/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wyardley/salt/teams","hooks_url":"https://api.github.com/repos/wyardley/salt/hooks","issue_events_url":"https://api.github.com/repos/wyardley/salt/issues/events{/number}","events_url":"https://api.github.com/repos/wyardley/salt/events","assignees_url":"https://api.github.com/repos/wyardley/salt/assignees{/user}","branches_url":"https://api.github.com/repos/wyardley/salt/branches{/branch}","tags_url":"https://api.github.com/repos/wyardley/salt/tags","blobs_url":"https://api.github.com/repos/wyardley/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wyardley/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wyardley/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/wyardley/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wyardley/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/wyardley/salt/languages","stargazers_url":"https://api.github.com/repos/wyardley/salt/stargazers","contributors_url":"https://api.github.com/repos/wyardley/salt/contributors","subscribers_url":"https://api.github.com/repos/wyardley/salt/subscribers","subscription_url":"https://api.github.com/repos/wyardley/salt/subscription","commits_url":"https://api.github.com/repos/wyardley/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/wyardley/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/wyardley/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/wyardley/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/wyardley/salt/contents/{+path}","compare_url":"https://api.github.com/repos/wyardley/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wyardley/salt/merges","archive_url":"https://api.github.com/repos/wyardley/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wyardley/salt/downloads","issues_url":"https://api.github.com/repos/wyardley/salt/issues{/number}","pulls_url":"https://api.github.com/repos/wyardley/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/wyardley/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/wyardley/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wyardley/salt/labels{/name}","releases_url":"https://api.github.com/repos/wyardley/salt/releases{/id}","deployments_url":"https://api.github.com/repos/wyardley/salt/deployments","created_at":"2018-07-09T19:30:34Z","updated_at":"2018-07-09T19:30:51Z","pushed_at":"2018-07-09T21:46:59Z","git_url":"git://github.com/wyardley/salt.git","ssh_url":"git@github.com:wyardley/salt.git","clone_url":"https://github.com/wyardley/salt.git","svn_url":"https://github.com/wyardley/salt","homepage":"https://repo.saltstack.com/","size":407030,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"develop"}},"base":{"label":"saltstack:develop","ref":"develop","sha":"e8fc110b524d5b4407bfa9aecc46fd450be67d4e","user":{"login":"saltstack","id":1147473,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNDc0NzM=","avatar_url":"https://avatars3.githubusercontent.com/u/1147473?v=4","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"repo":{"id":1390248,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkwMjQ4","name":"salt","full_name":"saltstack/salt","owner":{"login":"saltstack","id":1147473,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNDc0NzM=","avatar_url":"https://avatars3.githubusercontent.com/u/1147473?v=4","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/saltstack/salt","description":"Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here: ","fork":false,"url":"https://api.github.com/repos/saltstack/salt","forks_url":"https://api.github.com/repos/saltstack/salt/forks","keys_url":"https://api.github.com/repos/saltstack/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saltstack/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saltstack/salt/teams","hooks_url":"https://api.github.com/repos/saltstack/salt/hooks","issue_events_url":"https://api.github.com/repos/saltstack/salt/issues/events{/number}","events_url":"https://api.github.com/repos/saltstack/salt/events","assignees_url":"https://api.github.com/repos/saltstack/salt/assignees{/user}","branches_url":"https://api.github.com/repos/saltstack/salt/branches{/branch}","tags_url":"https://api.github.com/repos/saltstack/salt/tags","blobs_url":"https://api.github.com/repos/saltstack/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saltstack/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saltstack/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/saltstack/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/saltstack/salt/languages","stargazers_url":"https://api.github.com/repos/saltstack/salt/stargazers","contributors_url":"https://api.github.com/repos/saltstack/salt/contributors","subscribers_url":"https://api.github.com/repos/saltstack/salt/subscribers","subscription_url":"https://api.github.com/repos/saltstack/salt/subscription","commits_url":"https://api.github.com/repos/saltstack/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/saltstack/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/saltstack/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/saltstack/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/saltstack/salt/contents/{+path}","compare_url":"https://api.github.com/repos/saltstack/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saltstack/salt/merges","archive_url":"https://api.github.com/repos/saltstack/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saltstack/salt/downloads","issues_url":"https://api.github.com/repos/saltstack/salt/issues{/number}","pulls_url":"https://api.github.com/repos/saltstack/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/saltstack/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/saltstack/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saltstack/salt/labels{/name}","releases_url":"https://api.github.com/repos/saltstack/salt/releases{/id}","deployments_url":"https://api.github.com/repos/saltstack/salt/deployments","created_at":"2011-02-20T20:16:56Z","updated_at":"2018-07-09T20:43:08Z","pushed_at":"2018-07-09T20:42:42Z","git_url":"git://github.com/saltstack/salt.git","ssh_url":"git@github.com:saltstack/salt.git","clone_url":"https://github.com/saltstack/salt.git","svn_url":"https://github.com/saltstack/salt","homepage":"https://repo.saltstack.com/","size":407073,"stargazers_count":8994,"watchers_count":8994,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4206,"mirror_url":null,"archived":false,"open_issues_count":3017,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4206,"open_issues":3017,"watchers":8994,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/saltstack/salt/pulls/48492"},"html":{"href":"https://github.com/saltstack/salt/pull/48492"},"issue":{"href":"https://api.github.com/repos/saltstack/salt/issues/48492"},"comments":{"href":"https://api.github.com/repos/saltstack/salt/issues/48492/comments"},"review_comments":{"href":"https://api.github.com/repos/saltstack/salt/pulls/48492/comments"},"review_comment":{"href":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/saltstack/salt/pulls/48492/commits"},"statuses":{"href":"https://api.github.com/repos/saltstack/salt/statuses/309adc1fd46b3fdcccbf00b995b11ef4d018f8bf"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":4,"deletions":7,"changed_files":1}}
{"actor":{"display_login":"wyardley"}}