ara icon indicating copy to clipboard operation
ara copied to clipboard

Replace the saved execution quality JSON

Open omar-chahbouni-decathlon opened this issue 4 years ago • 0 comments

What it's the actual situation on ARA ? In ARA, the execution save the qualityThresholds and the qualitySeverities as a plain JSON (string). Needless to say that it should be changed. Here are some of the reasons:

  • Unnecessary space usage in the database
  • Hard to read (need to be parsed first)
  • Add complexity when saving as it needs to be parsed again
  • No fields defined, it can be anything
  • Prone to bugs (e.g. the string is not a correct JSON, etc.)
  • Hard to test, mock
  • Etc.

Describe the solution you'd like Replace the JSON string saved by the matching objects. Add the corresponding tables.

Additional context Keep in mind that this is a breaking change, so it is important to:

  • [ ] Update the database structure:
    • [ ] Create the java entities
    • [ ] Write a script SQL to create or update the tables, fields
  • [ ] Update how the values are:
    • [ ] read
    • [ ] saved
  • [ ] Create a script that transform all the fields containing those JSON into the newly created tables/fields
  • [ ] Create a script to rollback: from all those tables, recreate the JSON string and save them back