{"action":"created","issue":{"url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/3172","repository_url":"https://api.github.com/repos/SUSE-Cloud/automation","labels_url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/3172/labels{/name}","comments_url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/3172/comments","events_url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/3172/events","html_url":"https://github.com/SUSE-Cloud/automation/pull/3172","id":408143256,"node_id":"MDExOlB1bGxSZXF1ZXN0MjUxNDU3NTU5","number":3172,"title":"openstack-ardana: JENKINS-52638 bug workaround","user":{"login":"stefannica","id":3963946,"node_id":"MDQ6VXNlcjM5NjM5NDY=","avatar_url":"https://avatars0.githubusercontent.com/u/3963946?v=4","gravatar_id":"","url":"https://api.github.com/users/stefannica","html_url":"https://github.com/stefannica","followers_url":"https://api.github.com/users/stefannica/followers","following_url":"https://api.github.com/users/stefannica/following{/other_user}","gists_url":"https://api.github.com/users/stefannica/gists{/gist_id}","starred_url":"https://api.github.com/users/stefannica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefannica/subscriptions","organizations_url":"https://api.github.com/users/stefannica/orgs","repos_url":"https://api.github.com/users/stefannica/repos","events_url":"https://api.github.com/users/stefannica/events{/privacy}","received_events_url":"https://api.github.com/users/stefannica/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-02-08T13:02:40Z","updated_at":"2019-02-08T22:03:01Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/3172","html_url":"https://github.com/SUSE-Cloud/automation/pull/3172","diff_url":"https://github.com/SUSE-Cloud/automation/pull/3172.diff","patch_url":"https://github.com/SUSE-Cloud/automation/pull/3172.patch"},"body":"There's a bug in the Lockable Resources plugin that sometimes\r\ncauses a Null value to be returned by the `lock` function called\r\nto reserve a resource [1][2]. This has been known to happen for\r\nexample when the Jenkins server is restarted, or when a resource\r\nthat was previously manually reserved is released and immediately\r\nreserved by one of the jobs waiting in queue.\r\n\r\nWe don't yet have a fix for this bug, nor a way around it, but we\r\ncan at least abort the jobs immediately if this bug is detected,\r\nrather than having them continue to run without a locked resource.\r\n\r\n[1] https://issues.jenkins-ci.org/browse/JENKINS-52638\r\n[2] https://issues.jenkins-ci.org/browse/JENKINS-43002"},"comment":{"url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/comments/461962323","html_url":"https://github.com/SUSE-Cloud/automation/pull/3172#issuecomment-461962323","issue_url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/3172","id":461962323,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2MTk2MjMyMw==","user":{"login":"stefannica","id":3963946,"node_id":"MDQ6VXNlcjM5NjM5NDY=","avatar_url":"https://avatars0.githubusercontent.com/u/3963946?v=4","gravatar_id":"","url":"https://api.github.com/users/stefannica","html_url":"https://github.com/stefannica","followers_url":"https://api.github.com/users/stefannica/followers","following_url":"https://api.github.com/users/stefannica/following{/other_user}","gists_url":"https://api.github.com/users/stefannica/gists{/gist_id}","starred_url":"https://api.github.com/users/stefannica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefannica/subscriptions","organizations_url":"https://api.github.com/users/stefannica/orgs","repos_url":"https://api.github.com/users/stefannica/repos","events_url":"https://api.github.com/users/stefannica/events{/privacy}","received_events_url":"https://api.github.com/users/stefannica/received_events","type":"User","site_admin":false},"created_at":"2019-02-08T22:03:01Z","updated_at":"2019-02-08T22:03:01Z","author_association":"CONTRIBUTOR","body":">  for a workaround like this until there is a proper solution\r\n>   for so much code duplication\r\n> \r\n> Isn't there a way to define templates/macros/functions for this?\r\n\r\nYour question gave me some ideas that I would like to try out. First of all, yes, we can add a function to the shared library that we're already using for the sole purpose of avoiding duplicated code. Even though we set out rules against using that, as @JanZerebecki mentioned, the amount of Groovy code duplication just got to a level that caused more problems than a shared library would. \r\n\r\nBut much more than that, we can use a closure approach to enrich the default 'lock' step behavior and this actually enables us to implement a sleep-retry workaround that might actually work. We could never achieve do that without a shared library."}}
{"actor":{"display_login":"stefannica"}}