{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/9301","repository_url":"https://api.github.com/repos/openshift/origin","labels_url":"https://api.github.com/repos/openshift/origin/issues/9301/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/9301/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/9301/events","html_url":"https://github.com/openshift/origin/issues/9301","id":159959806,"number":9301,"title":"[oc start-build] numbers builds incorrectly which results in error while creating them","user":{"login":"tnozicka","id":11869554,"avatar_url":"https://avatars.githubusercontent.com/u/11869554?v=3","gravatar_id":"","url":"https://api.github.com/users/tnozicka","html_url":"https://github.com/tnozicka","followers_url":"https://api.github.com/users/tnozicka/followers","following_url":"https://api.github.com/users/tnozicka/following{/other_user}","gists_url":"https://api.github.com/users/tnozicka/gists{/gist_id}","starred_url":"https://api.github.com/users/tnozicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnozicka/subscriptions","organizations_url":"https://api.github.com/users/tnozicka/orgs","repos_url":"https://api.github.com/users/tnozicka/repos","events_url":"https://api.github.com/users/tnozicka/events{/privacy}","received_events_url":"https://api.github.com/users/tnozicka/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openshift/origin/labels/component/build","name":"component/build","color":"0052cc"},{"url":"https://api.github.com/repos/openshift/origin/labels/priority/P1","name":"priority/P1","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"bparees","id":4974046,"avatar_url":"https://avatars.githubusercontent.com/u/4974046?v=3","gravatar_id":"","url":"https://api.github.com/users/bparees","html_url":"https://github.com/bparees","followers_url":"https://api.github.com/users/bparees/followers","following_url":"https://api.github.com/users/bparees/following{/other_user}","gists_url":"https://api.github.com/users/bparees/gists{/gist_id}","starred_url":"https://api.github.com/users/bparees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bparees/subscriptions","organizations_url":"https://api.github.com/users/bparees/orgs","repos_url":"https://api.github.com/users/bparees/repos","events_url":"https://api.github.com/users/bparees/events{/privacy}","received_events_url":"https://api.github.com/users/bparees/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2016-06-13T14:12:30Z","updated_at":"2016-06-19T02:18:48Z","closed_at":null,"body":"`oc start-build` numbers builds incorrectly which results in error while creating them. It happens only if you use different machines for calling `oc start-build`.\r\n\r\nJenkins:\r\n```\r\n[test2] Running shell script\r\n+ ./oc get builds\r\nNAME           TYPE      FROM      STATUS     STARTED       DURATION\r\nhelloworld-1   Source    Binary    Complete   2 hours ago   5m23s\r\n+ ./oc start-build helloworld --from-dir=../artifacts/ --follow\r\nUploading \"../artifacts\" at commit \"HEAD\" as binary input for the build ...\r\nUploading directory \"../artifacts\" as binary input for the build ...\r\nError from server: builds \"helloworld-1\" already exists\r\n```\r\n\r\nI have tried it manually 2 times by running `oc start-build helloworld` and run Jenkins again:\r\n```\r\n[test2] Running shell script\r\n+ ./oc get builds\r\nNAME           TYPE      FROM      STATUS     STARTED         DURATION\r\nhelloworld-1   Source    Binary    Complete   2 hours ago     5m23s\r\nhelloworld-2   Source    Binary    Running    3 minutes ago   3m8s\r\nhelloworld-3   Source    Binary    New                        \r\n+ ./oc start-build helloworld --from-dir=../artifacts/ --follow\r\nUploading \"../artifacts\" at commit \"HEAD\" as binary input for the build ...\r\nUploading directory \"../artifacts\" as binary input for the build ...\r\nError from server: builds \"helloworld-1\" already exists\r\n```\r\n\r\nEvery jenkins run uses a new machine (pod).\r\n\r\n##### Version\r\nI have tried running both `v1.2.0-2e62fab` and `v1.3.0-alpha.1`.\r\nOn the host:\r\n```bash\r\n$ oc version\r\noc v1.3.0-alpha.1-259-g8cd1645\r\nkubernetes v1.3.0-alpha.1-331-g0522e63\r\n```\r\n##### Steps To Reproduce\r\nHard. Needs multiple machines to manifest.\r\n\r\n##### Current Result\r\n```\r\nError from server: builds \"helloworld-1\" already exists\r\n```\r\n##### Expected Result\r\nWorks. (Always creates deployment with build number +1 to latest.)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/226975472","html_url":"https://github.com/openshift/origin/issues/9301#issuecomment-226975472","issue_url":"https://api.github.com/repos/openshift/origin/issues/9301","id":226975472,"user":{"login":"bparees","id":4974046,"avatar_url":"https://avatars.githubusercontent.com/u/4974046?v=3","gravatar_id":"","url":"https://api.github.com/users/bparees","html_url":"https://github.com/bparees","followers_url":"https://api.github.com/users/bparees/followers","following_url":"https://api.github.com/users/bparees/following{/other_user}","gists_url":"https://api.github.com/users/bparees/gists{/gist_id}","starred_url":"https://api.github.com/users/bparees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bparees/subscriptions","organizations_url":"https://api.github.com/users/bparees/orgs","repos_url":"https://api.github.com/users/bparees/repos","events_url":"https://api.github.com/users/bparees/events{/privacy}","received_events_url":"https://api.github.com/users/bparees/received_events","type":"User","site_admin":false},"created_at":"2016-06-19T02:18:48Z","updated_at":"2016-06-19T02:18:48Z","body":"@tnozicka the other workaround would be to delete the BC before creating the new one.  Deleting a BC will delete all associated builds, thus resetting the build count to 0.\r\n\r\n@kargakis i'll need to chat w/ you more about your suggestion, i don't know enough about how patch works but i take it it's somehow related to what patch is doing."}}
{"actor":{"display_login":"bparees"}}