• 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 rtyler did live during his DWJW2018 talk, showing a plugin, then removing it).

      Expected behavior

      This should not trigger an error.

          [JENKINS-53964] Drop uuid_checksum_uniq unique key constraint

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

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

              Created:
              Updated:
              Resolved: