Uploaded image for project: 'mod-di-converter-storage'
  1. mod-di-converter-storage
  2. MODDICONV-252

Failure during enabling module for a new tenant

    XMLWordPrintable

Details

    • Folijet Sprint 144
    • 0.5
    • Folijet
    • Morning Glory (R2 2022) Bug Fix
    • Related dependency upgrade

    Description

      Following error is observed during enabling mod-data-import-converter-storage for a new tenant:

      Tenant operation failed for module mod-data-import-converter-storage-1.15.0-SNAPSHOT.207: SQL error
       UPDATE invoice_api_tests_mod_data_import_converter_storage.job_profiles SET jsonb = jsonb_set(jsonb, '{dataType}', '"MARC_BIB"') WHERE jsonb ->> 'dataType' IN ('MARC');
      ERROR: date/time field value out of range: "2021-00-13T15:00:00.462+0000" (22008)
      

      The fix is for a new tenant only.

      When migrating a tenant there is still an issue. Example when migrating to 1.15.2:

      Tenant operation failed for module mod-data-import-converter-storage-1.15.2: SQL error
       UPDATE diku_mod_data_import_converter_storage.job_profiles SET jsonb = jsonb_set(jsonb, '{hidden}', 'false') WHERE jsonb ->> 'hidden' is null;
      ERROR: date/time field value out of range: "2021-00-13T15:00:00.462+0000" (22008)
      

      Workaround:
      Before the migration run this script:

      SET search_path TO diku_mod_data_import_converter_storage;
      
      UPDATE job_profiles
      SET jsonb = jsonb_set(jsonb, '{metadata,updatedDate}', to_jsonb('2021-04-13T15:00:00.462+0000'::text))
      WHERE jsonb->'metadata'->>'updatedDate' = '2021-00-13T15:00:00.462+0000';
      
      UPDATE action_profiles
      SET jsonb = jsonb_set(jsonb, '{metadata,updatedDate}', to_jsonb('2021-04-13T15:00:00.462+0000'::text))
      WHERE jsonb->'metadata'->>'updatedDate' = '2021-00-13T15:00:00.462+0000';
      
      UPDATE mapping_profiles
      SET jsonb = jsonb_set(jsonb, '{metadata,updatedDate}', to_jsonb('2021-04-13T15:00:00.462+0000'::text))
      WHERE jsonb->'metadata'->>'updatedDate' = '2021-00-13T15:00:00.462+0000';
      

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Kateryna Senchenko Kateryna Senchenko
                Kateryna Senchenko Kateryna Senchenko
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases