Unexpected errors in data preparation check are not reported

XMLWordPrintable

      Issue Summary

      When running the data preparation check it failed unexpectedly due to a missing service desk for a JSM project. The actual service desk missing is reported correctly, however, the follow up queries timeout causing an unexpected error.

      Steps to Reproduce

      1. Create a JSM project on Jira DC.
      2. Delete the service desk for the project in the database or create some sort of a data corruption.
      3. Run the pre-migration checks -> should fail on unexpected errors.
      4. Run the migration -> should fail again on unexpected errors.

      Expected Results

      Data preparation check should be able to properly report unexpected errors and be a blocking error - the user should not be able to run the migration.

      Actual Results

      The below unexpected error was thrown in the xxxxxxx.log file:

      java.lang.IllegalStateException: Unexpected export errors during dry run: java.util.concurrent.ExecutionException: com.querydsl.core.QueryException: Caught PSQLException for select "ENTITY_PROPERTY"."entity_id", "ENTITY_PROPERTY"."json_value" from "public"."entity_property" "ENTITY_PROPERTY" inner join "public"."jiraissue" "JIRAISSUE" on "ENTITY_PROPERTY"."entity_id" = "JIRAISSUE"."id" where "JIRAISSUE"."project" = ? and "ENTITY_PROPERTY"."property_key" = ? and "ENTITY_PROPERTY"."entity_name" = ? and "ENTITY_PROPERTY"."json_value" like ?, com.querydsl.core.QueryException: Caught PSQLException for select "ENTITY_PROPERTY"."entity_id", "ENTITY_PROPERTY"."json_value", count(*) over()  from "public"."entity_property" "ENTITY_PROPERTY" where "ENTITY_PROPERTY"."entity_name" = ? and "ENTITY_PROPERTY"."property_key" = ? and "ENTITY_PROPERTY"."entity_id" in (select distinct "JIRAACTION"."id" from "public"."jiraaction" "JIRAACTION" inner join "public"."jiraissue" "JIRAISSUE" on "JIRAACTION"."issueid" = "JIRAISSUE"."id" where "JIRAACTION"."actiontype" = ? and "JIRAISSUE"."project" = ?) and "ENTITY_PROPERTY"."json_value" ilike ? and "ENTITY_PROPERTY"."json_value" ilike ?	at com.atlassian.jira.migration.preflight.dryrun.MultiNodeDryRunPreflightService.performCheck(MultiNodeDryRunPreflightService.kt:67) ~[jira-migration-plugin-1.12.39-prod.jar:?]	at com.atlassian.jira.migration.preflight.dryrun.ProjectReportErrorCheck.performCheck(ProjectReportErrorCheck.kt:77) ~[jira-migration-plugin-1.12.39-prod.jar:?]	at com.atlassian.jira.migration.preflight.AsyncCheckExecutor.runCheck$lambda$20(AsyncCheckExecutor.kt:451) ~[jira-migration-plugin-1.12.39-prod.jar:?]	at io.prometheus.metrics.core.datapoints.TimerApi.time(TimerApi.java:71) ~[jira-migration-plugin-1.12.39-prod.jar:?]	at com.atlassian.jira.migration.preflight.AsyncCheckExecutor.runCheck(AsyncCheckExecutor.kt:450) ~[jira-migration-plugin-1.12.39-prod.jar:?]	at com.atlassian.jira.migration.preflight.AsyncCheckExecutor.executeChecksListenable$lambda$18$lambda$16$lambda$15$lambda$13(AsyncCheckExecutor.kt:290) ~[jira-migration-plugin-1.12.39-prod.jar:?]	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131) ~[guava-32.1.1-jre.jar:?]	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:75) ~[guava-32.1.1-jre.jar:?]	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82) ~[guava-32.1.1-jre.jar:?]	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]	at com.atlassian.jira.migration.thread.MDCAwareRunnable.run(MDCAwareGroupedThreadFactory.kt:48) ~[jira-migration-plugin-1.12.39-prod.jar:?]	at java.lang.Thread.run(Unknown Source) ~[?:?]

      Workaround

      In this case removing the problem project and rerunning pre-migration checks should fix the issue.

            Assignee:
            Unassigned
            Reporter:
            Zane Hutchison
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: