{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/workflow-multibranch-plugin/issues/65","repository_url":"https://api.github.com/repos/jenkinsci/workflow-multibranch-plugin","labels_url":"https://api.github.com/repos/jenkinsci/workflow-multibranch-plugin/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/workflow-multibranch-plugin/issues/65/comments","events_url":"https://api.github.com/repos/jenkinsci/workflow-multibranch-plugin/issues/65/events","html_url":"https://github.com/jenkinsci/workflow-multibranch-plugin/pull/65","id":235553801,"number":65,"title":"[FIXED JENKINS-44848] Stop removing JobPropertys defined outside step","user":{"login":"abayer","id":120218,"avatar_url":"https://avatars1.githubusercontent.com/u/120218?v=3","gravatar_id":"","url":"https://api.github.com/users/abayer","html_url":"https://github.com/abayer","followers_url":"https://api.github.com/users/abayer/followers","following_url":"https://api.github.com/users/abayer/following{/other_user}","gists_url":"https://api.github.com/users/abayer/gists{/gist_id}","starred_url":"https://api.github.com/users/abayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abayer/subscriptions","organizations_url":"https://api.github.com/users/abayer/orgs","repos_url":"https://api.github.com/users/abayer/repos","events_url":"https://api.github.com/users/abayer/events{/privacy}","received_events_url":"https://api.github.com/users/abayer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-13T13:27:50Z","updated_at":"2017-06-13T15:23:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/workflow-multibranch-plugin/pulls/65","html_url":"https://github.com/jenkinsci/workflow-multibranch-plugin/pull/65","diff_url":"https://github.com/jenkinsci/workflow-multibranch-plugin/pull/65.diff","patch_url":"https://github.com/jenkinsci/workflow-multibranch-plugin/pull/65.patch"},"body":"[JENKINS-44848](https://issues.jenkins-ci.org/browse/JENKINS-44848)\r\n\r\nThere's some special logic for handling the case where the previous\r\nrun had the `properties` step run, but does not have the\r\n`JobPropertyTrackerAction` on it - i.e., the first run of an existing\r\njob with the `properties` step after upgrading. In that case, we still\r\nuse the old behavior of removing all existing `JobProperty`s. But in\r\nall future runs, only `JobProperty`s defined via `properties` will be\r\nremoved by `properties`.\r\n\r\nAlso removed the warning messages about removing `JobProperty`s in\r\nnon-multibranch jobs, since, well, we don't do that any more once this\r\nlands.\r\n\r\ncc @reviewbybees "},"comment":{"url":"https://api.github.com/repos/jenkinsci/workflow-multibranch-plugin/issues/comments/308153200","html_url":"https://github.com/jenkinsci/workflow-multibranch-plugin/pull/65#issuecomment-308153200","issue_url":"https://api.github.com/repos/jenkinsci/workflow-multibranch-plugin/issues/65","id":308153200,"user":{"login":"jglick","id":154109,"avatar_url":"https://avatars2.githubusercontent.com/u/154109?v=3","gravatar_id":"","url":"https://api.github.com/users/jglick","html_url":"https://github.com/jglick","followers_url":"https://api.github.com/users/jglick/followers","following_url":"https://api.github.com/users/jglick/following{/other_user}","gists_url":"https://api.github.com/users/jglick/gists{/gist_id}","starred_url":"https://api.github.com/users/jglick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jglick/subscriptions","organizations_url":"https://api.github.com/users/jglick/orgs","repos_url":"https://api.github.com/users/jglick/repos","events_url":"https://api.github.com/users/jglick/events{/privacy}","received_events_url":"https://api.github.com/users/jglick/received_events","type":"User","site_admin":false},"created_at":"2017-06-13T15:23:53Z","updated_at":"2017-06-13T15:23:53Z","body":"> May make more sense to store the action on the `Job` rather than on the `Run`, not sure.\r\n\r\nMy reasoning is that we are dealing with `Job`-level configuration. So, we want to know which properties were added to the `Job` the last time this step was run. Which might have been in the last build, if there was one, but need not have been; pathologically\r\n\r\n```groovy\r\nsleep 10 - (BUILD_NUMBER as int)\r\nproperties([…])\r\n```\r\n\r\nSetting aside race conditions for the moment (which is already theoretically an issue with this step—probably it should acquire a per-`Job` lock during its execution, unless some of the add/remove/replace calls invoke foreign code), what you are interested in is merely the last-saved state.\r\n\r\nNow when we are talking about an upgrade scenario, checking for a step execution in the last completed build is good enough—we are making a best effort here. But for routine ongoing usage, per-build metadata seems inherently unreliable."}}
{"actor":{"display_login":"jglick"}}