Skip to content

[PR #7322/93330ecb backport][3.85] Management command for data repairs#7325

Merged
dralley merged 1 commit into3.85from
patchback/backports/3.85/93330ecb5d1a913a56720d20f91b76afabcc3b2b/pr-7322
Feb 16, 2026
Merged

[PR #7322/93330ecb backport][3.85] Management command for data repairs#7325
dralley merged 1 commit into3.85from
patchback/backports/3.85/93330ecb5d1a913a56720d20f91b76afabcc3b2b/pr-7322

Conversation

@patchback
Copy link

@patchback patchback bot commented Feb 16, 2026

This is a backport of PR #7322 as merged into main (93330ec).

Create a single reusable data repair management command for data repair operations happening outside of migrations.

Specifically in this case the motivation is to resolve the repository version memoization issues, but it can be reused in the future.

re #7272

Usage (ignore the warnings):

[root@cb0f1f0e9d34 src]# pulpcore-manager datarepair 7272 --dry-run
/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
  warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)

In domain "default"
	Repository "test" (type "rpm.rpm") version 2 has a mismatch between the RepositoryContent and the cached ID set
	Repository "test" (type "rpm.rpm") version 2 has a mismatch between the RepositoryContent and RepositoryVersionContentDetails

Finished. (no changes)
[root@cb0f1f0e9d34 src]# pulpcore-manager datarepair 7272
/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
  warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)

In domain "default"
	Repository "test" (type "rpm.rpm") version 2 has a mismatch between the RepositoryContent and the cached ID set
	Repository "test" (type "rpm.rpm") version 2 has a mismatch between the RepositoryContent and RepositoryVersionContentDetails

Finished. (1 repository versions fixed)
[root@cb0f1f0e9d34 src]# pulpcore-manager datarepair 7272 --dry-run
/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
  warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)


Finished. (OK)
[root@cb0f1f0e9d34 src]# 

Create a single reusable data repair management command for data repair
operations happening outside of migrations.

Specifically in this case the motivation is to resolve the repository
version memoization issues, but it can be reused in the future.

re #7272

(cherry picked from commit 93330ec)
@dralley dralley merged commit 5f77d28 into 3.85 Feb 16, 2026
13 checks passed
@dralley dralley deleted the patchback/backports/3.85/93330ecb5d1a913a56720d20f91b76afabcc3b2b/pr-7322 branch February 16, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant