Uploaded image for project: 'mod-data-export'
  1. mod-data-export
  2. MDEXP-402

Migration Script does not handle all cases

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 4.2.0
    • Labels:
      None
    • Template:
      Standard Bug Write-Up Format
    • Sprint:
      Concorde - Sprint 117, Concorde - Sprint 118
    • Story Points:
      2
    • Development Team:
      Concorde

      Description

      Overview:
      The migration script to convert the string value of progress.total into an int value does not handle the cases where the progress object is not null but empty or is missing the "total" and "failed" properties. This leads to a SQL error when executing the script.

      Steps to Reproduce:
      Run this script

      UPDATE <tenatnId>_mod_data_export.job_executions SET jsonb = jsonb_set(jsonb #- '

      {progress, total}', '{progress, total}

      ', to_jsonb((jsonb -> 'progress' ->> 'total')::int))
      WHERE jsonb -> 'progress' IS NOT NULL

      with records having
      "progress":

      { "exported": 451 }

      or
      "progress": {},

      Expected Results:

      • Gracefully skipping over these records

      Actual Results:
      Script throws error

      Interested parties:
      Sobha Duvvuri Magda Zacharska

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                TotoroDev Illia Daliek
                Reporter:
                mtraneis Martin Tran
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases