<div dir="ltr"><div>A "repair" feature is being planned that will check-and-re-download all Artifacts associated with a RepositoryVersion. The last thing for us to work out is how the API will be offered to users.</div><div><br></div><div>Initially, the feature will launch to fix Artifacts for the 'latest' repository version for a given Repository, but over time it's likely we would want to support non-latest RepositoryVersion, or even "the whole Pulp system".</div><div><br></div><div># Option A: Compose the "repair" action endpoint under RepositoryVersionViewset</div><div><br></div><div>We could add an action endpoint to RepositoryVersionViewSet [0], which would provide /pulp/api/v3/repositories/rpm/rpm/<UUID>/repair/. Plugins could opt-out by overriding that endpoint to be a no-op which would also remove it from the bindings, so I think having an opt-out policy is safe.</div><div><br></div><div>Also since pulpcore analyzes+repairs Artifacts without plugin involvement, this will work for all plugins. This API natively works on any RepositoryVersion, which is nice. The one downside is that it if we add a "fix all of Pulp" feature later this composition approach won't work and we'd need to add a separate top-level API, like /pulp/api/v3/repair/.<br></div><div><br></div><div># Option B: Use a brand-new endpoint, e.g. /pulp/api/v3/repair/</div><div><br></div><div>Have it take repository_version or repository (and assume latest) as an argument and perform the repair on that. In the future the arguments could become optional, and this would provide the "repair all of Pulp" feature.</div><div><br></div><div># Feedback:  What do you think is best?</div><div><br></div><div>Please reply to the list with what you think is best.</div><div><br></div><div>[bmbouter's take] I am ok with either, but I have a preference for Option A because composition is a great user experience. Also we're not launching the global pulp checking feature right now anyway.</div><div><br></div><div>[0]: <a href="https://github.com/pulp/pulpcore/blob/master/pulpcore/app/viewsets/repository.py#L181">https://github.com/pulp/pulpcore/blob/master/pulpcore/app/viewsets/repository.py#L181</a></div><div><br></div><div>Thanks!</div><div>Brian</div><div><br></div></div>