<div dir="ltr">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?<br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 8, 2019 at 11:49 AM Austin Macdonald <<a href="mailto:amacdona@redhat.com">amacdona@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="auto">There seems to be consensus around dropping pulp_ from the url. However, I am not clear whether the intention is to use string formatting at url construction time, or if we should change the conventions for setting the app_label.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 8, 2019, 11:18 AM Jeff Ortel <<a href="mailto:jortel@redhat.com" target="_blank">jortel@redhat.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<br>
<br>
<div class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370moz-cite-prefix">On 1/4/19 1:32 PM, Brian Bouterse
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>+1 to dropping the "pulp_" I don't think it's a helpful
convention.</div>
</div>
</blockquote>
<br>
Couldn't agree more.<br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
<div> I also want to avoid adding another plugin configuration
attribute. +1 to automatic namespacing and using the django
app label.</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Fri, Jan 4, 2019 at 2:18 PM David Davis <<a href="mailto:daviddavis@redhat.com" rel="noreferrer" target="_blank">daviddavis@redhat.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">While I am not opposed to dropping the "pulp_"
prefix in URLs, I don't like the idea of adding another
attribute to the plugin configuration.
<div><br>
</div>
<div>I am +1 to automatic namespacing and using the django
app label.<br clear="all">
<div>
<div dir="ltr" class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370gmail-m_-1804041657187118617gmail-m_8135561168572125087gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div><br>
</div>
<div>David<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Fri, Jan 4, 2019 at 1:50 PM Tatiana
Tereshchenko <<a href="mailto:ttereshc@redhat.com" rel="noreferrer" target="_blank">ttereshc@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div>It's seems that there is a consensus that all
master/detail related endpoints should be prepended.</div>
<div>There is no consensus if the current Django app
label is good enough to use in the construction of
the endpoints.<br>
</div>
<div><br>
</div>
<div>My personal opinion:<br>
</div>
<div>It's probably better if "pulp_" part goes away,
at the same time I'm hesitant to add new attributes
to configuration, since Django provides enough of
them and gives us uniqueness check for free.</div>
<div>See Django docs <a href="https://docs.djangoproject.com/en/2.1/ref/applications/#configurable-attributes" rel="noreferrer" target="_blank">https://docs.djangoproject.com/en/2.1/ref/applications/#configurable-attributes</a></div>
<div>Label is supposed to be a short name for the app.</div>
<div><br>
</div>
<div>Please vote and/or raise your concerns if you
have any by next Friday, voting will be closed on
Jan 11, 2019 at 8:00PM EST.</div>
<div>The proposal is described in <a href="https://pulp.plan.io/issues/4279" rel="noreferrer" target="_blank">https://pulp.plan.io/issues/4279</a></div>
<div><br>
</div>
<div>My vote:</div>
<div>+1 for automatic namespacing for all
master/detail endpoints<br>
</div>
</div>
<div>+1 to use existing Django app label</div>
<div><br>
</div>
<div>Thank you,</div>
<div>Tanya</div>
<div><br>
</div>
<div>
<div class="gmail_quote">
<div dir="ltr">On Thu, Jan 3, 2019 at 1:15 PM Ina
Panova <<a href="mailto:ipanova@redhat.com" rel="noreferrer" target="_blank">ipanova@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div>+1 namespacing all master/detail</div>
<div><br>
</div>
<div>For consistency, i would prefer to see same
format i see in `content_summary` as in
content endpoints, even if it does not make
sense from user's perspective, because what we
now have in content_summary, i would not say
that it makes much sense from user's
perspective ;)<br>
</div>
<div>
<div>
<div dir="ltr" class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370gmail-m_-1804041657187118617gmail-m_8135561168572125087gmail-m_2693858694114366778m_-7636177073352351197gmail-m_3952769510864491043gmail_signature">
<div dir="ltr"><br>
--------<br>
Regards,<br>
<br>
Ina Panova<br>
Software Engineer| Pulp| Red Hat Inc.<br>
<br>
"Do not go where the path may lead,<br>
go instead where there is no path and
leave a trail."<br>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Wed, Jan 2, 2019 at 8:55 PM
Austin Macdonald <<a href="mailto:amacdona@redhat.com" rel="noreferrer" target="_blank">amacdona@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div>+1 automatic namespacing for
master/detail. I realize the easiest way
to do this would be to use the
app_label, giving us:</div>
<div><br>
</div>
<div>
<pre><span style="font-family:monospace,monospace"><font size="2">/api/v3/content/pulp_rpm/packages/</font></span></pre>
</div>
<div><br>
</div>
<div>However, I feel like this url is
pretty clunky. The "pulp_" is totally
unnecessary, from the user's
perspective. Instead, I think I'd prefer
to add an attribute to the App config.</div>
<div><a href="https://github.com/pulp/plugin_template/blob/master/pulp_plugin_template/app/__init__.py#L8" rel="noreferrer" target="_blank">https://github.com/pulp/plugin_template/blob/master/pulp_plugin_template/app/__init__.py#L8</a></div>
<div><br>
</div>
<div>`endpoint_namespace = rpm` or
`short_label = rpm`<br>
</div>
<div><br>
</div>
<div>Result:<span style="font-family:monospace,monospace"><font size="2">
/api/v3/content/rpm/packages/</font></span></div>
<div><br>
</div>
<div>The downside is that every plugin
would need 1 more line of code. The
upside is that we could implement it
exactly same way as app_label but
without url redundancy.<br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Wed, Jan 2, 2019 at 2:39
PM Tatiana Tereshchenko <<a href="mailto:ttereshc@redhat.com" rel="noreferrer" target="_blank">ttereshc@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div>It would be automatic, and
plugins need a change only to avoid
redundant prepending.</div>
<div>E.g. If RPM plugin makes no
changes, the endpoint for RPM
content will be:</div>
<div>
<pre><span style="font-family:monospace,monospace"><font size="2">/api/v3/content/pulp_rpm/rpm/packages/</font></span>
</pre>
<pre><span style="font-family:arial,helvetica,sans-serif">because <span style="font-family:monospace,monospace">endpoint_name = 'rpm/packages'.</span>
</span></pre>
<pre><span style="font-family:arial,helvetica,sans-serif">So plugin should leave only <span style="font-family:monospace,monospace">endpoint_name = 'packages'.
</span></span></pre>
<pre><span style="font-family:arial,helvetica,sans-serif">The endpoint with redundant plugin name will work fine, just doesn't look good :)<span style="font-family:monospace,monospace">
</span></span></pre>
<pre><span style="font-family:arial,helvetica,sans-serif">Tanya</span>
</pre>
</div>
<br>
</div>
<div dir="ltr">On Wed, Jan 2, 2019 at
7:20 PM David Davis <<a href="mailto:daviddavis@redhat.com" rel="noreferrer" target="_blank">daviddavis@redhat.com</a>>
wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">I am +1 to
namespacing all master detail
models with the plugin name. Would
this be automatic or something
that the plugin writers would be
encouraged to do?<br clear="all">
<div>
<div dir="ltr" class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370gmail-m_-1804041657187118617gmail-m_8135561168572125087gmail-m_2693858694114366778m_-7636177073352351197gmail-m_3952769510864491043gmail-m_-8022020017125809122gmail-m_1884895400621008722gmail-m_-4856729958524315772gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div><br>
</div>
<div>David<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Wed, Jan 2, 2019
at 12:58 PM Tatiana Tereshchenko
<<a href="mailto:ttereshc@redhat.com" rel="noreferrer" target="_blank">ttereshc@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Thank you all for the
discussion so far.</div>
<div>The question - the
type field and
namespacing in content
summary - is solved with
<a href="https://pulp.plan.io/issues/4185" rel="noreferrer" target="_blank">https://pulp.plan.io/issues/4185</a>.</div>
<div><br>
</div>
<div>The last remaining
question is whether we
want to prepend
endpoints for
master/detail models
with plugin label. If
yes, then everything or
for Content only.</div>
<div>See details on the
issue <a href="https://pulp.plan.io/issues/4279" rel="noreferrer" target="_blank">https://pulp.plan.io/issues/4279</a>.</div>
<div><br>
</div>
<div>Examples of the
suggested change:</div>
<div>
<div class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370gmail-m_-1804041657187118617gmail-m_8135561168572125087gmail-m_2693858694114366778m_-7636177073352351197gmail-m_3952769510864491043gmail-m_-8022020017125809122gmail-m_1884895400621008722gmail-m_-4856729958524315772gmail-m_687946817222435171gmail-clipboard_helper-container">
<pre>/api/v3/content/rpm/packages/ --> /api/v3/content/pulp_rpm/packages/
/api/v3/remotes/rpm/ --> /api/v3/content/remotes/pulp_rpm/rpm/
/api/v3/publishers/rpm/ --> /api/v3/content/publishers/pulp_rpm/rpm/
</pre>
<pre><font size="2"><span style="font-family:arial,helvetica,sans-serif">Changes which will be needed in plugins:
- adjust the value of the `endpoint_name` attribute in the viewsets we introduce changes to
</span></font></pre>
Please provide
feedback, here or on
the issue <a href="https://pulp.plan.io/issues/4279" rel="noreferrer" target="_blank">https://pulp.plan.io/issues/4279</a>.
<br>
</div>
<div class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370gmail-m_-1804041657187118617gmail-m_8135561168572125087gmail-m_2693858694114366778m_-7636177073352351197gmail-m_3952769510864491043gmail-m_-8022020017125809122gmail-m_1884895400621008722gmail-m_-4856729958524315772gmail-m_687946817222435171gmail-clipboard_helper-container">This
is an RC blocker, so
it would be great to
groom it over the next
couple of days.<br>
<br>
Thank you,<br>
Tanya</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Thu, Dec 20,
2018 at 9:41 AM Tatiana
Tereshchenko <<a href="mailto:ttereshc@redhat.com" rel="noreferrer" target="_blank">ttereshc@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div>Since we are leaning
towards prepending types
for _all_ master/detail
models and not only for
the content model, that
Django fix is no longer
important for us.</div>
<div><br>
</div>
<div>Tanya<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Wed, Dec
19, 2018 at 6:18 PM
Daniel Alley <<a href="mailto:dalley@redhat.com" rel="noreferrer" target="_blank">dalley@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div>David, was that a
vote to make it
explicit?</div>
<div><br>
</div>
<div>I would regard
this as fairly
intuitive as far as
"magic-ness" goes,
acceptable from the
user POV in my
opinion. And if
Django is explicitly
trying to support
this functionality
and relies on it
working properly,
and has a unittest
for it going
forwards, then I'm
fairly confident it
won't be too
fragile. My vote is
+1.<br>
</div>
<div><br>
</div>
<div>My only concern
(and it's not a
major one) is that a
plugin that needed
to be renamed might
have problems with
this. But I think
that would be
resolvable with a
migration.</div>
<div><br>
</div>
<div>Tanya, will we
need to remove the
workaround once
Django 2.2 comes
out? If so, we
should file a
Refactor task for
it.<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Tue,
Dec 18, 2018 at 9:39
AM David Davis <<a href="mailto:daviddavis@redhat.com" rel="noreferrer" target="_blank">daviddavis@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">+1<br clear="all">
<div>
<div dir="ltr" class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370gmail-m_-1804041657187118617gmail-m_8135561168572125087gmail-m_2693858694114366778m_-7636177073352351197gmail-m_3952769510864491043gmail-m_-8022020017125809122gmail-m_1884895400621008722gmail-m_-4856729958524315772gmail-m_687946817222435171gmail-m_-1340934604373270744gmail-m_-4602954387959559242gmail-m_4039831608995754367gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div><br>
</div>
<div>David<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On
Tue, Dec 18,
2018 at 9:31 AM
Brian Bouterse
<<a href="mailto:bbouters@redhat.com" rel="noreferrer" target="_blank">bbouters@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">There
is also an
issue w/ my
suggestion in
that it's
highly
magical. The
class name is
likely going
to go through
a case
mutation and
if not it's
going to be
finicky in
terms of its
case. So now
I'm thinking
the plugin
writer should
have to define
it to keep it
simple and
explicit (not
implicit and
magical).<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On
Tue, Dec 18,
2018 at 9:27
AM David Davis
<<a href="mailto:daviddavis@redhat.com" rel="noreferrer" target="_blank">daviddavis@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Would
it be possible
to default to
class name but
let plugin
writers
override this?
I would
imagine in
some cases
plugin writers
might want to
change the
name (eg cases
where you
can't use type
as the class
name like
File).
<div>
<div dir="ltr" class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370gmail-m_-1804041657187118617gmail-m_8135561168572125087gmail-m_2693858694114366778m_-7636177073352351197gmail-m_3952769510864491043gmail-m_-8022020017125809122gmail-m_1884895400621008722gmail-m_-4856729958524315772gmail-m_687946817222435171gmail-m_-1340934604373270744gmail-m_-4602954387959559242gmail-m_4039831608995754367gmail-m_-6823830934032923366gmail-m_-5992762200900001549gmail-m_2580082881040078787gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div><br>
</div>
<div>David<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On
Tue, Dec 18,
2018 at 9:23
AM Brian
Bouterse <<a href="mailto:bbouters@redhat.com" rel="noreferrer" target="_blank">bbouters@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On
Tue, Dec 18,
2018 at 9:07
AM Tatiana
Tereshchenko
<<a href="mailto:ttereshc@redhat.com" rel="noreferrer" target="_blank">ttereshc@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Brian, <br>
</div>
<div>the
current PR [0]
does exactly
what you
describe, it
uses label
which is taken
from the
plugin
subclass of
PulpPluginAppconfig
+ TYPE defined
on the detail
model.</div>
<div>FWIW,
there is an
option to use
plugin class
name and not a
plugin writer
defined TYPE,
e.g.
pulp_file.filecontent,
pulp_rpm.package, pulp_rpm.updaterecord, etc. <br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div>+1 to
using the
classname.
Having the
plugin class
name used
would allow
the user to
not repeat
themselves as
much. I think
it's likely
the class name
== TYPE in
almost all
cases. The
plugin writer
would have 1
less
requirement on
them at
Content model
definition
time and that
helps achieve
the "less
burden on
plugin
writers" goal
for pulp.<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
<div>Jeff, to
answer your
questions:</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">1.
why do all the
plugins begin
with "pulp_"?<br>
</blockquote>
<div>This is
how django app
label is
defined in
every plugin
so far, see
pulp_file case
[1].</div>
<div>Whatever
is defined
there is used
as a plugin
name.<br>
</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2. can the
plugin name
get pre-pended
when it's
loaded by
core?<br>
<br>
I lean toward
TYPE=<plugin>.<type></blockquote>
<div>Just to
clarify, there
is a class
arttriburte
`TYPE` and
there is a
`type` field
on a model. I
guess you
suggest type =
<plugin>.<TYPE>.</div>
<div><br>
</div>
<div>We can
probably do it
on a master
model in the
save method
[2], just
initially the
change was
proposed for
Content models
only.</div>
<div>If we
decide to
namespace all
master/detail
objects, I
agree we can
do it n a more
generic way,
than just
redefine
__init__ on a
specific
class. <br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
<div>Tanya<br>
</div>
<div><br>
</div>
<div>[0] <a class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370gmail-m_-1804041657187118617gmail-m_8135561168572125087gmail-m_2693858694114366778m_-7636177073352351197gmail-m_3952769510864491043gmail-m_-8022020017125809122gmail-m_1884895400621008722gmail-m_-4856729958524315772gmail-m_687946817222435171gmail-m_-1340934604373270744gmail-m_-4602954387959559242gmail-m_4039831608995754367gmail-m_-6823830934032923366gmail-m_-5992762200900001549gmail-m_2580082881040078787gmail-m_-6975018193253913506gmail-m_8211474221962628743gmail-m_-6114340048174048705m_2342473005036704540gmail-m_-7201466314519892844m_7211214784903923686gmail-m_-5141469220101427325gmail-m_-899173989990752907gmail-m_5706015370859308442gmail-m_1979839197621402772gmail-m_3551334486212001766gmail-m_7162387610211309385gmail-m_-7604681549112275569gmail-m_5306993128347858366external" href="https://github.com/pulp/pulp/pull/3801" rel="noreferrer" target="_blank">https://github.com/pulp/pulp/pull/3801</a></div>
<div>[1] <a href="https://github.com/pulp/pulp_file/blob/24881314372b9c1c505ff687c15238126b261afa/pulp_file/app/__init__.py#L10" rel="noreferrer" target="_blank">https://github.com/pulp/pulp_file/blob/24881314372b9c1c505ff687c15238126b261afa/pulp_file/app/__init__.py#L10</a></div>
<div>[2] <a href="https://github.com/pulp/pulp/blob/master/pulpcore/app/models/base.py#L76-L83" rel="noreferrer" target="_blank">https://github.com/pulp/pulp/blob/master/pulpcore/app/models/base.py#L76-L83</a><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On
Tue, Dec 18,
2018 at 12:58
PM Ina Panova
<<a href="mailto:ipanova@redhat.com" rel="noreferrer" target="_blank">ipanova@redhat.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">+1
to namespace
master/detail
as well.<br clear="all">
<div>
<div>
<div dir="ltr" class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370gmail-m_-1804041657187118617gmail-m_8135561168572125087gmail-m_2693858694114366778m_-7636177073352351197gmail-m_3952769510864491043gmail-m_-8022020017125809122gmail-m_1884895400621008722gmail-m_-4856729958524315772gmail-m_687946817222435171gmail-m_-1340934604373270744gmail-m_-4602954387959559242gmail-m_4039831608995754367gmail-m_-6823830934032923366gmail-m_-5992762200900001549gmail-m_2580082881040078787gmail-m_-6975018193253913506gmail-m_8211474221962628743gmail-m_-6114340048174048705m_2342473005036704540gmail-m_-7201466314519892844gmail-m_7211214784903923686gmail-m_-5141469220101427325gmail_signature">
<div>+1 to
Brian's
suggestion to
try.<br>
</div>
<div dir="ltr"><br>
--------<br>
Regards,<br>
<br>
Ina Panova<br>
Software
Engineer|
Pulp| Red Hat
Inc.<br>
<br>
"Do not go
where the path
may lead,<br>
go instead
where there is
no path and
leave a
trail."<br>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On
Tue, Dec 18,
2018 at 12:15
AM Brian
Bouterse <<a href="mailto:bbouters@redhat.com" rel="noreferrer" target="_blank">bbouters@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div>+1 to
namespacing
all
Master/Detail
objects
(Remotes,
Publishers,
etc).
Namespacing
will increase
consistency w/
the user
experience and
will avoid
plugin-to-plugin
naming
collisions.
@ttereshc +1
to the url
changes and
content
summary
changes you've
described.</div>
<div><br>
</div>
<div>I think
it would be
ideal if the
app specified
its 'label'
attribute on
the
PulpPluginAppconfig
subclass, e.g
here in
pulp_file <a href="https://github.com/pulp/pulp_file/blob/24881314372b9c1c505ff687c15238126b261afa/pulp_file/app/__init__.py#L10" rel="noreferrer" target="_blank">https://github.com/pulp/pulp_file/blob/24881314372b9c1c505ff687c15238126b261afa/pulp_file/app/__init__.py#L10</a>
Then the Model
for, e.g. the
FileContent
would have the
second portion
of the string
'file' as an
example and
Master/Detail
would assemble
them.</div>
<div><br>
</div>
<div>Is this
implementation
how you
imagined it?</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On
Mon, Dec 17,
2018 at 9:29
AM Tatiana
Tereshchenko
<<a href="mailto:ttereshc@redhat.com" rel="noreferrer" target="_blank">ttereshc@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div>Just to
clarify, the
type field is
not used in
the endpoint
construction,
so two changes
described in
the original
e-mail are
independent.</div>
<div><br>
</div>
<div>In my
opinion:<br>
</div>
<div> - it is
possible to
have type
collisions.</div>
<div> - it is
possible to
have the same
endpoints
(endpoint_name
in a viewset).</div>
<div><br>
</div>
<div>FWIW, the
endpoint
collision is
not unique to
the
master/detail
models'
endpoints. A
plugin, in
theory, can
define any
endpoint they
want. <br>
</div>
<div>Though
not preventing
collisions it
for endpoints
related to
master/detail
models makes
it easier to
create such
collision
accidentally.</div>
<div><br>
</div>
<div>Tanya<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On
Mon, Dec 17,
2018 at 2:27
PM David Davis
<<a href="mailto:daviddavis@redhat.com" rel="noreferrer" target="_blank">daviddavis@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr" class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370gmail-m_-1804041657187118617gmail-m_8135561168572125087gmail-m_2693858694114366778m_-7636177073352351197gmail-m_3952769510864491043gmail-m_-8022020017125809122gmail-m_1884895400621008722gmail-m_-4856729958524315772gmail-m_687946817222435171gmail-m_-1340934604373270744gmail-m_-4602954387959559242gmail-m_4039831608995754367gmail-m_-6823830934032923366gmail-m_-5992762200900001549gmail-m_2580082881040078787gmail-m_-6975018193253913506gmail-m_8211474221962628743gmail-m_-6114340048174048705m_2342473005036704540gmail-m_-7201466314519892844gmail-m_7211214784903923686gmail-m_-5141469220101427325gmail-m_-899173989990752907gmail-m_5706015370859308442gmail-m_1979839197621402772gmail-m_3551334486212001766gmail-m_7162387610211309385gmail-m_-7604681549112275569gmail_signature">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Is it
possible
(under the
current model,
without
namespacing)
to have type
collisions in
the database
for
master/detail
models? Like
what if two
plugins define
two Contents
with the same
type or two
Remotes with
the same type?
This kind of
leads me to
believe we
should
namespace
everything. On
the Ansible
plugin for
example, I
started
working on a
git Remote[0].
Luckily I
chose
"ansible_git"
as the type
but I could
see plugin
writers
running into
problems if
they are not
so careful.</div>
<div><br>
</div>
<div>[0] <a href="https://github.com/pulp/pulp_ansible/pull/38/files#diff-debb42c875c19140793de39be3696ee3" rel="noreferrer" target="_blank">https://github.com/pulp/pulp_ansible/pull/38/files#diff-debb42c875c19140793de39be3696ee3</a></div>
<div><br>
</div>
<div>David<br>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On
Sun, Dec 16,
2018 at 4:41
PM Tatiana
Tereshchenko
<<a href="mailto:ttereshc@redhat.com" rel="noreferrer" target="_blank">ttereshc@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div>There is
an issue [0]
of colliding
type names in
the content
summary which
evolved into
more general
namespacing
problem for
plugins.<br>
</div>
<div><br>
</div>
<div>The
suggested
changes [1]
are:</div>
<div> 1.
include plugin
name into the
content
summary</div>
<div style="margin-left:40px">
<pre><span style="font-family:arial,helvetica,sans-serif">"content_summary": {
"pulp_rpm.package": 50,
"pulp_rpm.errata": 2,
"pulp_file.file": 5
}</span></pre>
</div>
<div><br>
</div>
<div> 2.
include plugin
name into
content
endpoints</div>
<div style="margin-left:40px">/api/v3/content/file/files/
-->
/api/v3/content/pulp_file/files/<br>
/api/v3/content/rpm/packages/ --> /api/v3/content/pulp_rpm/packages/</div>
<div style="margin-left:40px">/api/v3/content/rpm/errata/
-->
/api/v3/content/pulp_rpm/errata/</div>
<div style="margin-left:40px">...</div>
<div><br>
</div>
<div>For the
change #1, not
only content
summary output
is changed but
the type
itself in the
database. If
the content
type is used
somewhere in
the filters,
it should be
specified in
that format:
"plugin_name.plugin_type".
Does it makes
sense to
extend the
master model
and have a
plugin name
field and a
type field,
instead of
putting
preformatted
string into
the type
field?</div>
<div><br>
</div>
<div>For the
change #2,
endpoints are
namespaced
only for the
content
endpoint and
not for other
endpoints
related to
master/detail
models, like
remotes,
publishers,
etc. It's
inconsistent,
however it
makes the most
sense to have
it for content
endpoints.</div>
<div><br>
</div>
<div>Any
concerns or
thoughts?<br>
</div>
<div><br>
</div>
<div>Thank
you,</div>
<div>Tanya<br>
</div>
<div><br>
</div>
<div>[0] <a href="https://pulp.plan.io/issues/4185#note-8" rel="noreferrer" target="_blank">https://pulp.plan.io/issues/4185#note-8</a></div>
<div>[1] <a class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370gmail-m_-1804041657187118617gmail-m_8135561168572125087gmail-m_2693858694114366778m_-7636177073352351197gmail-m_3952769510864491043gmail-m_-8022020017125809122gmail-m_1884895400621008722gmail-m_-4856729958524315772gmail-m_687946817222435171gmail-m_-1340934604373270744gmail-m_-4602954387959559242gmail-m_4039831608995754367gmail-m_-6823830934032923366gmail-m_-5992762200900001549gmail-m_2580082881040078787gmail-m_-6975018193253913506gmail-m_8211474221962628743gmail-m_-6114340048174048705m_2342473005036704540gmail-m_-7201466314519892844gmail-m_7211214784903923686gmail-m_-5141469220101427325gmail-m_-899173989990752907gmail-m_5706015370859308442gmail-m_1979839197621402772gmail-m_3551334486212001766gmail-m_7162387610211309385gmail-m_-7604681549112275569gmail-m_5306993128347858366external" href="https://github.com/pulp/pulp/pull/3801" rel="noreferrer" target="_blank">https://github.com/pulp/pulp/pull/3801</a></div>
</div>
</div>
_______________________________________________<br>
Pulp-dev
mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" rel="noreferrer" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote>
</div>
</blockquote>
</div>
_______________________________________________<br>
Pulp-dev
mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" rel="noreferrer" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote>
</div>
_______________________________________________<br>
Pulp-dev
mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" rel="noreferrer" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
_______________________________________________<br>
Pulp-dev
mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" rel="noreferrer" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
_______________________________________________<br>
Pulp-dev mailing
list<br>
<a href="mailto:Pulp-dev@redhat.com" rel="noreferrer" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote>
</div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" rel="noreferrer" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" rel="noreferrer" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote>
</div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" rel="noreferrer" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" rel="noreferrer" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote>
</div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" rel="noreferrer" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote>
</div>
<br>
<fieldset class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370mimeAttachmentHeader"></fieldset>
<pre class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370moz-quote-pre">_______________________________________________
Pulp-dev mailing list
<a class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370moz-txt-link-abbreviated" href="mailto:Pulp-dev@redhat.com" rel="noreferrer" target="_blank">Pulp-dev@redhat.com</a>
<a class="gmail-m_-1365460561307480715gmail-m_-6915428086742344897m_-2608229035120775370moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a>
</pre>
</blockquote>
<br>
</div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" rel="noreferrer" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote></div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote></div>