Skip to content

Geo: Fix incorrect Package File progress bar total count

Michael Kozono requested to merge mk/geo-fix-package-file-count into master

What does this MR do?

Background

Secondaries have always sent their registry count for each Model in GeoNodeStatus, but it wasn't used in the UI. Now that we use registry tables as the SSOT on secondaries, the registry count represents the "syncable" count. We no longer perform a count of a cross-database join of two entire tables to get the "syncable" count. And we cannot use the total count of the primary source table as the "syncable" count since that is wrong e.g. when selective sync is enabled.

Solution

  • Set the package file registry count on the GeoNodeStatus
  • Use the package file registry count as the total for calculating package file synced percentage
  • Use the package file registry count as the total for the package file progress bar

To do

Closes #223095 (closed)

Screenshots

I have 1000 package_files records. After enabling selective sync and selecting groups such that most package files are excluded, the old code showed Total 1000.

With this MR, it properly shows Total 175:

image

(Unrelated: I also deleted all package_file_registry records to initially reset back to 0 since deletions are currently being implemented in !34656 (merged) is merged)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by GitLab Release Tools Bot

Merge request reports