[Pulp-dev] Plugin relationship to tasks

Dennis Kliban dkliban at redhat.com
Tue Mar 27 19:06:06 UTC 2018

On Tue, Mar 27, 2018 at 1:36 PM, Jeremy Audet <jaudet at redhat.com> wrote:

> > The current plugin API allows plugin authors to define custom REST API
> endpoints that can perform any custom validation needed for the plugin. The
> repository version creation REST API provided by pulpcore only validates
> that the content exists. We should document this limitation and recommend
> that users use Repository Version creation APIs provided by specific
> plugins.
> Why should I, as a user, explicitly call HTTP API endpoints to make
> sure that Pulp's state is valid? That seems very strange. I'd rather
> not worry about that. If there's a path forward that lets plugins
> enforce correctness, that seems like a far better path forward.

There is already a way for plugins to enforce correctness by defining REST
API endpoints that perform validation. Here are the main points of concern
that need to be addressed:

   - /api/v3/repositories/<uuid>/versions/ endpoint does not perform plugin
   specific validation which can lead to "broken" repository versions.
   - Plugin authors don't have any convention to follow when creating
   custom REST API endpoints for creating repository versions.
   - As a result of ^, a user will have a hard time identifying repository
   version creation APIs in different plugins.

My first inclination is to disable the ability to POST to
/api/v3/repositories/<uuid>/versions/ and require users to use the plugin
specific APIs for creating repository versions. However, I think that
integrators of build systems that produce a variety of content types would
have a lot more flexibility if they could use a single generic API endpoint
to create a repository version independent of the content type.

Let's continue this discussion by answering the following question:

   - Should we disable the ability to POST to
   /api/v3/repositories/<uuid>/versions/ and require users to always use a
   plugin specific repository version creation API?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20180327/ccb2c3ed/attachment.htm>

More information about the Pulp-dev mailing list