{"action":"closed","issue":{"url":"https://api.github.com/repos/ovh/cds/issues/994","repository_url":"https://api.github.com/repos/ovh/cds","labels_url":"https://api.github.com/repos/ovh/cds/issues/994/labels{/name}","comments_url":"https://api.github.com/repos/ovh/cds/issues/994/comments","events_url":"https://api.github.com/repos/ovh/cds/issues/994/events","html_url":"https://github.com/ovh/cds/issues/994","id":253917979,"number":994,"title":"fix (api): pipeline build number doesn't increment faster enough in db","user":{"login":"bnjjj","id":5719034,"avatar_url":"https://avatars2.githubusercontent.com/u/5719034?v=4","gravatar_id":"","url":"https://api.github.com/users/bnjjj","html_url":"https://github.com/bnjjj","followers_url":"https://api.github.com/users/bnjjj/followers","following_url":"https://api.github.com/users/bnjjj/following{/other_user}","gists_url":"https://api.github.com/users/bnjjj/gists{/gist_id}","starred_url":"https://api.github.com/users/bnjjj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnjjj/subscriptions","organizations_url":"https://api.github.com/users/bnjjj/orgs","repos_url":"https://api.github.com/users/bnjjj/repos","events_url":"https://api.github.com/users/bnjjj/events{/privacy}","received_events_url":"https://api.github.com/users/bnjjj/received_events","type":"User","site_admin":false},"labels":[{"id":459183305,"url":"https://api.github.com/repos/ovh/cds/labels/bug","name":"bug","color":"ee0701","default":true},{"id":459183311,"url":"https://api.github.com/repos/ovh/cds/labels/wontfix","name":"wontfix","color":"ffffff","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-08-30T08:28:25Z","updated_at":"2017-11-08T09:13:02Z","closed_at":"2017-11-08T09:13:01Z","author_association":"MEMBER","body":"For example if you launch in a script with cds cli multiple run on different branch on the same app you have internal error due to duplicate pipeline_build_number. if you make a sleep between each call to pipeline run it works.\r\nlog trace:\r\n```\r\n/prod/api> 2017-08-30 08:05:00 [WARN] POST    | 500  | /project/XXX/application/xxx-app/pipeline/xxx-pip/run \t runPipelineHandler> Cannot run pipeline: queue.Run> Cannot start pipeline xxx-pip: InsertPipelineBuild> Cannot insert pipeline build: insertPipelineBuild> Unable to insert pipeline_build : App:1,Pip:1,Env:1: pq: duplicate key value violates unique constraint \"idx_pipeline_build_unique_build_number\"\r\n```"}}
{"actor":{"display_login":"fsamin"}}