Skip to content

Resolve "Detect and truncate unnecessary data in decomposed database"

What does this merge request do and why?

Now that we have two databases main & ci, we need to

  • truncate data on ci database, for tables belonging to the main database.
  • truncate data on main database, for tables belonging to the ci database.

We have rake tasks to do this, but it is currently not integrated with the GDK.

With this MR, we run these rake tasks to truncate legacy data on running gdk reconfigure.

But, we also do not want to run this truncation process all the times when gdk reconfigure is run. This is only a one time job, so the first time this is run, we write to an empty file in .cache/.truncate_tables, and if this file exists, we do not run the truncation process again.

Screenshots:

On running gdk reconfigure

On first run:

Screenshot_2023-06-02_at_10.58.16_AM

On subsequent runs:

Screenshot_2023-06-02_at_11.06.15_AM

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.

Closes #1640 (closed)

Edited by Manoj M J

Merge request reports