jenkinsci / audit2db-plugin

Jenkins plugin to record build audit information to database.
https://plugins.jenkins.io/audit2db/
5 stars 24 forks source link

UniqueID schema easily generates collisions #18

Open alevinetx opened 7 years ago

alevinetx commented 7 years ago

For table JENKINS_BUILD_DETAILS:

UID is [url of a build server]/[short job name]/[build number] short job name being without the full tree path so, something generic like "build" is going to crash

example

UID: jenkins.server.com/computer/jenkins-node//build/1

That can easily be non-unique if more than one path has a job named "build". We are using CloudBees Folders plugin, which allows for the subpaths.

Dept1/jobs/a tool/build Dep2/jobs/another tool/build

There's a quick collision right there. First one wins, second one fails silently.

Found in: https://github.com/jenkinsci/audit2db-plugin/blob/master/src/main/java/org/jenkins/plugins/audit2db/internal/model/BuildDetailsImpl.java Line: 400-401