[Pulp-dev] Namespacing plugins, looking for feedback

Tatiana Tereshchenko ttereshc at redhat.com
Mon Jan 14 10:45:49 UTC 2019


Thank you all for your feedback and voting.

The outcome of the discussion:
As a part of https://pulp.plan.io/issues/4279:
 - all master/detail related endpoints will be automatically prepended with
Django app label
 - it will be suggested to drop 'pulp_' prefix in Django label for all the
plugins

The Django label for the core can be renamed as a part of that story or
separately,
it doesn't affect endpoints, it doesn't introduce any backward incompatible
change and can be done at any moment.

Tanya


On Fri, Jan 11, 2019 at 5:35 PM Tatiana Tereshchenko <ttereshc at redhat.com>
wrote:

>
>
> On Fri, Jan 11, 2019 at 5:01 PM Jeff Ortel <jortel at redhat.com> wrote:
>
>>
>>
>> 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.
>>
>
> We can change it and I think we can do it at any time more or less.
> There is no impact on the endpoints, no impact on status representation.
> That change will impact DB table names only and require a migration.
>
> Tanya
>
>
>> [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> 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>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Tue, Jan 8, 2019 at 12:12 PM Brian Bouterse <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
>>>> 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
>>>
>>
>> _______________________________________________
>> Pulp-dev mailing listPulp-dev at redhat.comhttps://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/20190114/1050b296/attachment.htm>


More information about the Pulp-dev mailing list