{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/build-pipeline-plugin/issues/89","labels_url":"https://api.github.com/repos/jenkinsci/build-pipeline-plugin/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/build-pipeline-plugin/issues/89/comments","events_url":"https://api.github.com/repos/jenkinsci/build-pipeline-plugin/issues/89/events","html_url":"https://github.com/jenkinsci/build-pipeline-plugin/pull/89","id":109907131,"number":89,"title":"Fix for JENKINS-30801","user":{"login":"dalvizu","id":731899,"avatar_url":"https://avatars.githubusercontent.com/u/731899?v=3","gravatar_id":"","url":"https://api.github.com/users/dalvizu","html_url":"https://github.com/dalvizu","followers_url":"https://api.github.com/users/dalvizu/followers","following_url":"https://api.github.com/users/dalvizu/following{/other_user}","gists_url":"https://api.github.com/users/dalvizu/gists{/gist_id}","starred_url":"https://api.github.com/users/dalvizu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalvizu/subscriptions","organizations_url":"https://api.github.com/users/dalvizu/orgs","repos_url":"https://api.github.com/users/dalvizu/repos","events_url":"https://api.github.com/users/dalvizu/events{/privacy}","received_events_url":"https://api.github.com/users/dalvizu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-05T23:34:39Z","updated_at":"2015-10-12T21:59:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/build-pipeline-plugin/pulls/89","html_url":"https://github.com/jenkinsci/build-pipeline-plugin/pull/89","diff_url":"https://github.com/jenkinsci/build-pipeline-plugin/pull/89.diff","patch_url":"https://github.com/jenkinsci/build-pipeline-plugin/pull/89.patch"},"body":"This PR fixes JENKINS-30801, a bug in the 're-run' feature where `Action` objects from a previous run were copied over to the re-run.\r\n\r\nThis is desirable for certain actions: `CauseAction` and `ParametersAction` are necessary to preserve upstream/downstream relationship and upstream trigger context.\r\n\r\nHowever, `Action` is also used by `Builder` and `Publisher` to persist and summarize stuff about what they built (for example, test result information). This is meaningful for only that current `Run`, and should not be relevant at all for a re-run.\r\n\r\nThe fix here is to filter out actions and only include `CauseAction` and `ParametersAction`. `CauseAction` with a `UserId` cause is also excluded because the re-run will explicitly include a new `MyUserIdAction` for the user doing the re-triggering.\r\n\r\nDuring this fix I also noticed 'retryRun' was not used, and looks like it would not provide any value as it does not preserve upstream / downstream relationships. This is likely leftover from JENKINS-22210 and its subsequent reverts.\r\n"},"comment":{"url":"https://api.github.com/repos/jenkinsci/build-pipeline-plugin/issues/comments/147532739","html_url":"https://github.com/jenkinsci/build-pipeline-plugin/pull/89#issuecomment-147532739","issue_url":"https://api.github.com/repos/jenkinsci/build-pipeline-plugin/issues/89","id":147532739,"user":{"login":"dalvizu","id":731899,"avatar_url":"https://avatars.githubusercontent.com/u/731899?v=3","gravatar_id":"","url":"https://api.github.com/users/dalvizu","html_url":"https://github.com/dalvizu","followers_url":"https://api.github.com/users/dalvizu/followers","following_url":"https://api.github.com/users/dalvizu/following{/other_user}","gists_url":"https://api.github.com/users/dalvizu/gists{/gist_id}","starred_url":"https://api.github.com/users/dalvizu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalvizu/subscriptions","organizations_url":"https://api.github.com/users/dalvizu/orgs","repos_url":"https://api.github.com/users/dalvizu/repos","events_url":"https://api.github.com/users/dalvizu/events{/privacy}","received_events_url":"https://api.github.com/users/dalvizu/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T21:59:11Z","updated_at":"2015-10-12T21:59:11Z","body":"Added a fix for related JENKINS-24883 - the plugin was filtering out a `CauseAction` if it contained a `Cause` with a `UserIdCause`. This ended up removing all `Causes`, including the `UpstreamCause` necessary to preserve upstream context in the BuildPipelineTrigger.\r\n\r\nFix was to keep the `CauseAction` around, but filter our the `UserIdCause` from the list of causes.\r\n"}}