{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/4608","labels_url":"https://api.github.com/repos/openshift/origin/issues/4608/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/4608/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/4608/events","html_url":"https://github.com/openshift/origin/issues/4608","id":105757227,"number":4608,"title":"Build already exists errors","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=3","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openshift/origin/labels/component/build","name":"component/build","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-09-10T08:19:33Z","updated_at":"2015-09-10T14:01:23Z","closed_at":null,"body":"Today I found interesting bug:\r\n\r\n```\r\n$ oc create -f test-buildconfig.json\r\n$ oc start-build test # repeat several times\r\n$ oc delete -f test-buildconfig.json\r\n$ oc create -f test-buildconfig.json\r\n$ oc start-build test\r\nError from server: build \"test-1\" already exists\r\n```\r\n\r\nSo I have to call `start-build` X times to finally reach the name that was not taken ;-) I can also remove all builds manually, but this looks as an error to me in the first place. Why we reset the counter for the builds if I re-create the build config?\r\n\r\nWe have three choices I think:\r\n\r\n1) When deleting BuildConfig, remove all associated builds\r\n2) Instead of \"build already exists\", suggest user next action (remove all builds?)\r\n3) Do not reset the counter for the builds\r\n\r\nEDIT: If you delete DC all its deployments will be scaled down and deleted, why not to do the same for builds?"},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/139243239","html_url":"https://github.com/openshift/origin/issues/4608#issuecomment-139243239","issue_url":"https://api.github.com/repos/openshift/origin/issues/4608","id":139243239,"user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=3","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"created_at":"2015-09-10T14:01:23Z","updated_at":"2015-09-10T14:01:23Z","body":"@bparees transferring to trello?"}}