{"action":"closed","number":184,"pull_request":{"url":"https://api.github.com/repos/atomist/github-sdm/pulls/184","id":174750104,"html_url":"https://github.com/atomist/github-sdm/pull/184","diff_url":"https://github.com/atomist/github-sdm/pull/184.diff","patch_url":"https://github.com/atomist/github-sdm/pull/184.patch","issue_url":"https://api.github.com/repos/atomist/github-sdm/issues/184","number":184,"state":"closed","locked":false,"title":"Log errors on local deploy","user":{"login":"jessitron","id":1149737,"avatar_url":"https://avatars2.githubusercontent.com/u/1149737?v=4","gravatar_id":"","url":"https://api.github.com/users/jessitron","html_url":"https://github.com/jessitron","followers_url":"https://api.github.com/users/jessitron/followers","following_url":"https://api.github.com/users/jessitron/following{/other_user}","gists_url":"https://api.github.com/users/jessitron/gists{/gist_id}","starred_url":"https://api.github.com/users/jessitron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessitron/subscriptions","organizations_url":"https://api.github.com/users/jessitron/orgs","repos_url":"https://api.github.com/users/jessitron/repos","events_url":"https://api.github.com/users/jessitron/events{/privacy}","received_events_url":"https://api.github.com/users/jessitron/received_events","type":"User","site_admin":false},"body":"Hint: look at one commit at a time and they should make sense.\r\n\r\nThis whole adventure began when @cdupuis 's local deploy failed this morning. It wasn't showing the error message in Slack. So I set out to fix that.\r\n\r\nThe local deploy from executable jar was not using the executeDeploy infra that I made the other day, so I settled that\r\n\r\nbut it's actually a different local deploy, local from source. Which had a totally different SourceDeployer interface and didn't include any of the fancy error reporting. Rather than duplicate that, I made it conform to Deployer and use the same methods the other ones do.\r\nTo do this, I made a Targeter for the managedApplications (which I think is lovely), and an ArtifactStore for cloning repos (which is a stretch).\r\n\r\nThen it was failing for not having an image, which wasn't reported at all, so I moved the error reporting code outward until the image-not-found exception could be included.\r\nBut to do that, I had to get rid of the special snowflake RetryDeployFromLocal, and replace it with a generic retryGoal that just sets the pending status.\r\nYou can include that in any goal's FunctionalUnit as long as you also include ExecuteGoalOnPendingStatus (to respond to the pending status, which the retry sets). This will give you a command to \"trigger -goal name-\" on any commit (defaulting to tip of master).\r\n\r\naside: The repetition in goal definitions is moving up the layers of abstraction; I have more plans for this but for now it's a few lines defining a FunctionalUnit for each one, beats having lots of classes. (there are still plenty of classes to clean up, i'm doing them gradually)\r\n\r\nRight. So the retry was out of my way, I moved progressLog and the error handling up a level (we could do this for other goals in the future, for generic failure notification and retry handling), and then I saw the image not found error, and tested retry, and then fixed it, and then fixed a few bugs in the managedApplications, and now all the local deploys are working for me.\r\n\r\n@cdupuis would you test this when you have a chance? ","created_at":"2018-03-13T18:26:32Z","updated_at":"2018-03-14T00:22:42Z","closed_at":"2018-03-14T00:22:41Z","merged_at":"2018-03-14T00:22:41Z","merge_commit_sha":"af0d4c39cfa8c6b06e41ee4d78a8c476ce304248","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/atomist/github-sdm/pulls/184/commits","review_comments_url":"https://api.github.com/repos/atomist/github-sdm/pulls/184/comments","review_comment_url":"https://api.github.com/repos/atomist/github-sdm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atomist/github-sdm/issues/184/comments","statuses_url":"https://api.github.com/repos/atomist/github-sdm/statuses/a78fb9e2840252c25218731eb9aef0134a2adf2c","head":{"label":"atomist:logErrors","ref":"logErrors","sha":"a78fb9e2840252c25218731eb9aef0134a2adf2c","user":{"login":"atomist","id":19392,"avatar_url":"https://avatars3.githubusercontent.com/u/19392?v=4","gravatar_id":"","url":"https://api.github.com/users/atomist","html_url":"https://github.com/atomist","followers_url":"https://api.github.com/users/atomist/followers","following_url":"https://api.github.com/users/atomist/following{/other_user}","gists_url":"https://api.github.com/users/atomist/gists{/gist_id}","starred_url":"https://api.github.com/users/atomist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomist/subscriptions","organizations_url":"https://api.github.com/users/atomist/orgs","repos_url":"https://api.github.com/users/atomist/repos","events_url":"https://api.github.com/users/atomist/events{/privacy}","received_events_url":"https://api.github.com/users/atomist/received_events","type":"Organization","site_admin":false},"repo":{"id":118969370,"name":"github-sdm","full_name":"atomist/github-sdm","owner":{"login":"atomist","id":19392,"avatar_url":"https://avatars3.githubusercontent.com/u/19392?v=4","gravatar_id":"","url":"https://api.github.com/users/atomist","html_url":"https://github.com/atomist","followers_url":"https://api.github.com/users/atomist/followers","following_url":"https://api.github.com/users/atomist/following{/other_user}","gists_url":"https://api.github.com/users/atomist/gists{/gist_id}","starred_url":"https://api.github.com/users/atomist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomist/subscriptions","organizations_url":"https://api.github.com/users/atomist/orgs","repos_url":"https://api.github.com/users/atomist/repos","events_url":"https://api.github.com/users/atomist/events{/privacy}","received_events_url":"https://api.github.com/users/atomist/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atomist/github-sdm","description":"GitHub Software Delivery Machine","fork":false,"url":"https://api.github.com/repos/atomist/github-sdm","forks_url":"https://api.github.com/repos/atomist/github-sdm/forks","keys_url":"https://api.github.com/repos/atomist/github-sdm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atomist/github-sdm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atomist/github-sdm/teams","hooks_url":"https://api.github.com/repos/atomist/github-sdm/hooks","issue_events_url":"https://api.github.com/repos/atomist/github-sdm/issues/events{/number}","events_url":"https://api.github.com/repos/atomist/github-sdm/events","assignees_url":"https://api.github.com/repos/atomist/github-sdm/assignees{/user}","branches_url":"https://api.github.com/repos/atomist/github-sdm/branches{/branch}","tags_url":"https://api.github.com/repos/atomist/github-sdm/tags","blobs_url":"https://api.github.com/repos/atomist/github-sdm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atomist/github-sdm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atomist/github-sdm/git/refs{/sha}","trees_url":"https://api.github.com/repos/atomist/github-sdm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atomist/github-sdm/statuses/{sha}","languages_url":"https://api.github.com/repos/atomist/github-sdm/languages","stargazers_url":"https://api.github.com/repos/atomist/github-sdm/stargazers","contributors_url":"https://api.github.com/repos/atomist/github-sdm/contributors","subscribers_url":"https://api.github.com/repos/atomist/github-sdm/subscribers","subscription_url":"https://api.github.com/repos/atomist/github-sdm/subscription","commits_url":"https://api.github.com/repos/atomist/github-sdm/commits{/sha}","git_commits_url":"https://api.github.com/repos/atomist/github-sdm/git/commits{/sha}","comments_url":"https://api.github.com/repos/atomist/github-sdm/comments{/number}","issue_comment_url":"https://api.github.com/repos/atomist/github-sdm/issues/comments{/number}","contents_url":"https://api.github.com/repos/atomist/github-sdm/contents/{+path}","compare_url":"https://api.github.com/repos/atomist/github-sdm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atomist/github-sdm/merges","archive_url":"https://api.github.com/repos/atomist/github-sdm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atomist/github-sdm/downloads","issues_url":"https://api.github.com/repos/atomist/github-sdm/issues{/number}","pulls_url":"https://api.github.com/repos/atomist/github-sdm/pulls{/number}","milestones_url":"https://api.github.com/repos/atomist/github-sdm/milestones{/number}","notifications_url":"https://api.github.com/repos/atomist/github-sdm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atomist/github-sdm/labels{/name}","releases_url":"https://api.github.com/repos/atomist/github-sdm/releases{/id}","deployments_url":"https://api.github.com/repos/atomist/github-sdm/deployments","created_at":"2018-01-25T21:23:17Z","updated_at":"2018-03-13T18:02:35Z","pushed_at":"2018-03-14T00:22:41Z","git_url":"git://github.com/atomist/github-sdm.git","ssh_url":"git@github.com:atomist/github-sdm.git","clone_url":"https://github.com/atomist/github-sdm.git","svn_url":"https://github.com/atomist/github-sdm","homepage":"","size":1103,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":63,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":63,"watchers":2,"default_branch":"master"}},"base":{"label":"atomist:master","ref":"master","sha":"6c7512dcae6bccc2db3faf529f84b78d9a0b57ce","user":{"login":"atomist","id":19392,"avatar_url":"https://avatars3.githubusercontent.com/u/19392?v=4","gravatar_id":"","url":"https://api.github.com/users/atomist","html_url":"https://github.com/atomist","followers_url":"https://api.github.com/users/atomist/followers","following_url":"https://api.github.com/users/atomist/following{/other_user}","gists_url":"https://api.github.com/users/atomist/gists{/gist_id}","starred_url":"https://api.github.com/users/atomist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomist/subscriptions","organizations_url":"https://api.github.com/users/atomist/orgs","repos_url":"https://api.github.com/users/atomist/repos","events_url":"https://api.github.com/users/atomist/events{/privacy}","received_events_url":"https://api.github.com/users/atomist/received_events","type":"Organization","site_admin":false},"repo":{"id":118969370,"name":"github-sdm","full_name":"atomist/github-sdm","owner":{"login":"atomist","id":19392,"avatar_url":"https://avatars3.githubusercontent.com/u/19392?v=4","gravatar_id":"","url":"https://api.github.com/users/atomist","html_url":"https://github.com/atomist","followers_url":"https://api.github.com/users/atomist/followers","following_url":"https://api.github.com/users/atomist/following{/other_user}","gists_url":"https://api.github.com/users/atomist/gists{/gist_id}","starred_url":"https://api.github.com/users/atomist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomist/subscriptions","organizations_url":"https://api.github.com/users/atomist/orgs","repos_url":"https://api.github.com/users/atomist/repos","events_url":"https://api.github.com/users/atomist/events{/privacy}","received_events_url":"https://api.github.com/users/atomist/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atomist/github-sdm","description":"GitHub Software Delivery Machine","fork":false,"url":"https://api.github.com/repos/atomist/github-sdm","forks_url":"https://api.github.com/repos/atomist/github-sdm/forks","keys_url":"https://api.github.com/repos/atomist/github-sdm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atomist/github-sdm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atomist/github-sdm/teams","hooks_url":"https://api.github.com/repos/atomist/github-sdm/hooks","issue_events_url":"https://api.github.com/repos/atomist/github-sdm/issues/events{/number}","events_url":"https://api.github.com/repos/atomist/github-sdm/events","assignees_url":"https://api.github.com/repos/atomist/github-sdm/assignees{/user}","branches_url":"https://api.github.com/repos/atomist/github-sdm/branches{/branch}","tags_url":"https://api.github.com/repos/atomist/github-sdm/tags","blobs_url":"https://api.github.com/repos/atomist/github-sdm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atomist/github-sdm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atomist/github-sdm/git/refs{/sha}","trees_url":"https://api.github.com/repos/atomist/github-sdm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atomist/github-sdm/statuses/{sha}","languages_url":"https://api.github.com/repos/atomist/github-sdm/languages","stargazers_url":"https://api.github.com/repos/atomist/github-sdm/stargazers","contributors_url":"https://api.github.com/repos/atomist/github-sdm/contributors","subscribers_url":"https://api.github.com/repos/atomist/github-sdm/subscribers","subscription_url":"https://api.github.com/repos/atomist/github-sdm/subscription","commits_url":"https://api.github.com/repos/atomist/github-sdm/commits{/sha}","git_commits_url":"https://api.github.com/repos/atomist/github-sdm/git/commits{/sha}","comments_url":"https://api.github.com/repos/atomist/github-sdm/comments{/number}","issue_comment_url":"https://api.github.com/repos/atomist/github-sdm/issues/comments{/number}","contents_url":"https://api.github.com/repos/atomist/github-sdm/contents/{+path}","compare_url":"https://api.github.com/repos/atomist/github-sdm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atomist/github-sdm/merges","archive_url":"https://api.github.com/repos/atomist/github-sdm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atomist/github-sdm/downloads","issues_url":"https://api.github.com/repos/atomist/github-sdm/issues{/number}","pulls_url":"https://api.github.com/repos/atomist/github-sdm/pulls{/number}","milestones_url":"https://api.github.com/repos/atomist/github-sdm/milestones{/number}","notifications_url":"https://api.github.com/repos/atomist/github-sdm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atomist/github-sdm/labels{/name}","releases_url":"https://api.github.com/repos/atomist/github-sdm/releases{/id}","deployments_url":"https://api.github.com/repos/atomist/github-sdm/deployments","created_at":"2018-01-25T21:23:17Z","updated_at":"2018-03-13T18:02:35Z","pushed_at":"2018-03-14T00:22:41Z","git_url":"git://github.com/atomist/github-sdm.git","ssh_url":"git@github.com:atomist/github-sdm.git","clone_url":"https://github.com/atomist/github-sdm.git","svn_url":"https://github.com/atomist/github-sdm","homepage":"","size":1103,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":63,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":63,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atomist/github-sdm/pulls/184"},"html":{"href":"https://github.com/atomist/github-sdm/pull/184"},"issue":{"href":"https://api.github.com/repos/atomist/github-sdm/issues/184"},"comments":{"href":"https://api.github.com/repos/atomist/github-sdm/issues/184/comments"},"review_comments":{"href":"https://api.github.com/repos/atomist/github-sdm/pulls/184/comments"},"review_comment":{"href":"https://api.github.com/repos/atomist/github-sdm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atomist/github-sdm/pulls/184/commits"},"statuses":{"href":"https://api.github.com/repos/atomist/github-sdm/statuses/a78fb9e2840252c25218731eb9aef0134a2adf2c"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"johnsonr","id":1916583,"avatar_url":"https://avatars3.githubusercontent.com/u/1916583?v=4","gravatar_id":"","url":"https://api.github.com/users/johnsonr","html_url":"https://github.com/johnsonr","followers_url":"https://api.github.com/users/johnsonr/followers","following_url":"https://api.github.com/users/johnsonr/following{/other_user}","gists_url":"https://api.github.com/users/johnsonr/gists{/gist_id}","starred_url":"https://api.github.com/users/johnsonr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnsonr/subscriptions","organizations_url":"https://api.github.com/users/johnsonr/orgs","repos_url":"https://api.github.com/users/johnsonr/repos","events_url":"https://api.github.com/users/johnsonr/events{/privacy}","received_events_url":"https://api.github.com/users/johnsonr/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"maintainer_can_modify":false,"commits":29,"additions":646,"deletions":741,"changed_files":43}}
{"actor":{"display_login":"johnsonr"}}