Management command for data repairs#7322
Conversation
5c80aed to
9ad4497
Compare
mdellweg
left a comment
There was a problem hiding this comment.
I like the idea.
And added whatever came first to my mind.
|
|
||
| def add_arguments(self, parser): | ||
| """Set up arguments.""" | ||
| parser.add_argument("issue", help=_("The github issue # of the issue to be fixed.")) |
There was a problem hiding this comment.
Would it be possible for plugins to add datarepair operations, and how would we avoid name clashes?
There was a problem hiding this comment.
It might be possible, but some plugins (e.g. rpm) already have their own command (rpm-datarepair) for that purpose.
| help=_( | ||
| "Don't modify anything, just show the results of what would happen if this " | ||
| "command were run." | ||
| ), |
There was a problem hiding this comment.
Maybe another option. But wouldn't it be nice to print some info paragraph about the selected repair?
It could sum up for example after what type of upgrade the data is expected to need repair (whenever we have that detail).
There was a problem hiding this comment.
Do you mean as help text, or as part of the execution of the command, including in dry-run mode?
Generally I would expect the user to know what they're running ahead of time, this isn't really the sort of thing to be running in an exploratory way. Even, to an extent, in --dry-run mode. Probably the user is coming to rectify some specific issue.
There was a problem hiding this comment.
Help text sounds fine. I just thought that maybe assuming we know how an inconsistency arose, we could briefly describe the situation so a user knowing they didn't come that way doesn't put high expectations in this. But maybe I'm in wonderland here.
This sure is not a requirement.
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 pulp#7272
|
A progress counter / indicator would be "nice to have" here I suppose, unless someone wants to call it a "must have" |
Backport to 3.85: 💚 backport PR created✅ Backport PR branch: Backported as #7325 🤖 @patchback |
Backport to 3.103: 💚 backport PR created✅ Backport PR branch: Backported as #7324 🤖 @patchback |
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):