Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-53964

Drop uuid_checksum_uniq unique key constraint


    • Similar Issues:
    • Sprint:
      Evergreen - Milestone 2


      Problem statement

      The versions table has a unique key constraint on the checksum and uuid fields.

      This is a problem because when the reportVersions call is made after a rollback, the insertion is rejected since it would violate that constraint.
      But in case of a rollback, this is absolutely normal and expected that we are going to get back to a previous known state, so the backend should not reject it.

      Currently, this is rejected like the following:

      backend_1   | error: Error during call: BadRequest: Validation error
      instance_1  | error: Failed to report versions message=Validation error, type=FeathersError, name=BadRequest, code=400, className=bad-request, data=undefined, errors=[message=uuid must be unique, type=unique violation, path=uuid, value=d87c40a9-fd67-45d8-a718-531cd81ab23b, origin=DB, id=null, uuid=d87c40a9-fd67-45d8-a718-531cd81ab23b, schema=1, commit=faf226350db4e8e09a39d81f7f361b665a5435f2

      Apart from rollback, this case could even also happen if we decide to push a new UL that takes back a new plugin to a previous version, or even remove a plugin that got added for some testing phase (like what R. Tyler Croy did live during his DWJW2018 talk, showing a plugin, then removing it).

      Expected behavior

      This should not trigger an error.


          Issue Links


            batmat Baptiste Mathus created issue -
            batmat Baptiste Mathus made changes -
            Field Original Value New Value
            Assignee R. Tyler Croy [ rtyler ] Baptiste Mathus [ batmat ]
            batmat Baptiste Mathus made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            batmat Baptiste Mathus made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            batmat Baptiste Mathus made changes -
            Remote Link This issue links to "evergreen PR (Web Link)" [ 21907 ]
            batmat Baptiste Mathus made changes -
            Link This issue is blocking JENKINS-53273 [ JENKINS-53273 ]
            batmat Baptiste Mathus made changes -
            Status In Review [ 10005 ] Closed [ 6 ]
            Resolution Fixed [ 1 ]


              • Assignee:
                batmat Baptiste Mathus
                batmat Baptiste Mathus
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: