[Pulp-dev] Namespacing plugins, looking for feedback

Jeff Ortel jortel at redhat.com
Fri Jan 11 15:59:07 UTC 2019



On 1/9/19 11:30 AM, Tatiana Tereshchenko wrote:
> To summarize where we are so far:
> *All* master/detail related endpoints will be automatically prepended 
> with Django app *label* [0]
>     - concerns: 'pulp_' in the label
>     - options to address concerns:
>          * introduce a new attribute to the AppConfig class to use in 
> the endpoints construction (not supported by majority so far)
>          * drop 'pulp_' part from a *plugin's* app label (supported by 
> majority so far)
>
> Questions/concerns about dropping the 'pulp_' from the plugins' app label:
>
> # Table names in the DB are prepended using the app label. We need to 
> be sure to avoid collisions with other applications for pulpcore and 
> for pulp plugins. Are they already in the "pulp" database?
> Yes, all pulpcore and pulp plugin tables are in "pulp" database.
>
> # The names in the list of installed plugins would then not be the 
> same as the packages themselves.
> It's probably ok. The status would look like this:
>         {
>             "component": "*file*",
>             "version": "0.0.1b6"
>         },
>         {
>             "component": "*rpm*",
>             "version": "3.0.0b1"
>         }
>
> # What about the label for the core? (not discussed)
> It stays as is - 'pulp_app'.

Why?  Seems like 'core' would be more descriptive.
>
> [0] 
> https://docs.djangoproject.com/en/2.1/ref/applications/#django.apps.AppConfig.label
>
> On Tue, Jan 8, 2019 at 8:22 PM Daniel Alley <dalley at redhat.com 
> <mailto:dalley at redhat.com>> wrote:
>
>     I'm not opposed to this plan, I just want to point out that it
>     would make the status API make slightly less sense.  The names in
>     the list of installed plugins would then not be the same as the
>     packages themselves.  It's probably close enough as to not be a
>     problem though.
>
>     On Tue, Jan 8, 2019 at 12:23 PM Austin Macdonald
>     <amacdona at redhat.com <mailto:amacdona at redhat.com>> wrote:
>
>
>
>         On Tue, Jan 8, 2019 at 12:12 PM Brian Bouterse
>         <bbouters at redhat.com <mailto:bbouters at redhat.com>> wrote:
>
>             My understanding is that it's for both. It would be
>             dropped from app_label and that will automatically be used
>             in master/detail urls. Is that what others thought?
>
>         This seems like the simplest approach to me. My only concern
>         with this approach is making sure that the database will be
>         properly namespaced so there won't be collisions with other
>         applications that use postgres like Katello. AFAIK, the plugin
>         tables don't need to be namespaced since they are already in
>         the "pulp" database. Is that correct? If so, +1.
>         _______________________________________________
>         Pulp-dev mailing list
>         Pulp-dev at redhat.com <mailto:Pulp-dev at redhat.com>
>         https://www.redhat.com/mailman/listinfo/pulp-dev
>
>     _______________________________________________
>     Pulp-dev mailing list
>     Pulp-dev at redhat.com <mailto:Pulp-dev at redhat.com>
>     https://www.redhat.com/mailman/listinfo/pulp-dev
>
>
> _______________________________________________
> Pulp-dev mailing list
> Pulp-dev at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20190111/29967901/attachment.htm>


More information about the Pulp-dev mailing list