Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-18216

Build Info migration falsely finishes in certain occasions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: 3 - High
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 6.9.0
    • Component/s: None
    • Labels:
      None
    • Severity:
      High

      Description

      In some occasions, the Build-Info migration that was introduced in version 6.6.0, may falsely "successfully finish", causing the non-migrated builds to not be seen.

      From the log:

      2019-01-06 17:07:33,957 [art-exec-3] [INFO ] (o.a.s.j.m.b.BuildInfoMigrationJob:116) - Build Info migration state: 0/2 (approx.) json entries were handled.
      2019-01-06 17:07:33,958 [art-exec-3] [INFO ] (o.a.s.j.m.b.BuildInfoMigrationJob:116) - Build Info migration state: 0/2 (approx.) json entries were handled.
      2019-01-06 17:07:34,040 [art-exec-6] [INFO ] (o.a.s.j.m.b.BuildInfoMigrationJob:507) - Creating build json at final location 'artifactory-build-info:maven-pipeline %3A%3A test/65-1546786587846.json'
      2019-01-06 17:07:34,040 [art-exec-7] [INFO ] (o.a.s.j.m.b.BuildInfoMigrationJob:507) - Creating build json at final location 'artifactory-build-info:arielk/1-1546786430612.json'
      2019-01-06 17:07:34,137 [art-exec-6] [ERROR] (o.a.s.j.m.b.BuildInfoMigrationJob:512) - Failed to save Build Info json at 'artifactory-build-info:maven-pipeline %3A%3A test/65-1546786587846.json'
      2019-01-06 17:07:39,713 [art-exec-3] [INFO ] (o.a.s.j.m.b.BuildInfoMigrationJob:377) - Build Info migration job has finished successfully. 0 build json entries were converted to artifacts.
      

      In the case it reproduced by using a User Plugin (attached to the JIRA) that rejects deployments.

      Workaround:
      1. Remove the plugin (while Artifactory is running).
      2. Recreate the "build_jsons_builds_fk" foreign key, by running the next DB query:
      (This query was written for Derby DB. Other DBs might require other syntax.)

      ALTER TABLE BUILD_JSONS
      ADD CONSTRAINT build_jsons_builds_fk FOREIGN KEY (build_id) REFERENCES builds (build_id);
      

      3. Restart Artifactory, the migration will start again.

      Steps to reproduce:
      1. Have Artifactory with version prior to 6.6.0 with build-info's.
      2. Use the user plugin attached to this JIRA.
      3. Upgrade Artifactory to 6.6.0, issue reproduced.

        Attachments

        1. after fix.png
          after fix.png
          225 kB
        2. before fix.png
          before fix.png
          213 kB
        3. build_info_migration - after fix.log
          35 kB
        4. build_info_migration - before fix.log
          35 kB
        5. failmigration.groovy
          0.1 kB

          Issue Links

            Activity

              People

              Assignee:
              tamirh Tamir Hadad
              Reporter:
              arielk Ariel Kabov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-18216 -
                  SYNCHRONIZED
                  • Last Sync Date: