Skip to content

[oc start-build] numbers builds incorrectly which results in error while creating them #9301

Closed
@tnozicka

Description

@tnozicka

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.

Jenkins:

[test2] Running shell script
+ ./oc get builds
NAME           TYPE      FROM      STATUS     STARTED       DURATION
helloworld-1   Source    Binary    Complete   2 hours ago   5m23s
+ ./oc start-build helloworld --from-dir=../artifacts/ --follow
Uploading "../artifacts" at commit "HEAD" as binary input for the build ...
Uploading directory "../artifacts" as binary input for the build ...
Error from server: builds "helloworld-1" already exists

I have tried it manually 2 times by running oc start-build helloworld and run Jenkins again:

[test2] Running shell script
+ ./oc get builds
NAME           TYPE      FROM      STATUS     STARTED         DURATION
helloworld-1   Source    Binary    Complete   2 hours ago     5m23s
helloworld-2   Source    Binary    Running    3 minutes ago   3m8s
helloworld-3   Source    Binary    New                        
+ ./oc start-build helloworld --from-dir=../artifacts/ --follow
Uploading "../artifacts" at commit "HEAD" as binary input for the build ...
Uploading directory "../artifacts" as binary input for the build ...
Error from server: builds "helloworld-1" already exists

Every jenkins run uses a new machine (pod).

Version

I have tried running both v1.2.0-2e62fab and v1.3.0-alpha.1.
On the host:

$ oc version
oc v1.3.0-alpha.1-259-g8cd1645
kubernetes v1.3.0-alpha.1-331-g0522e63
Steps To Reproduce

Hard. Needs multiple machines to manifest.

Current Result
Error from server: builds "helloworld-1" already exists
Expected Result

Works. (Always creates deployment with build number +1 to latest.)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions