<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>1) If we do this, what happens when someone uses multiple plugins
and both of them want to use id as well? Wouldn't it be better to have
the core application reserving it and *all* plugins doing some
derivative name?</div></blockquote><div><br></div><div>One plugin wouldn't affect another since it's namespaced by table - it's just that since plugin models inherit from core models, plugin fields can conflict with fields from core and vice-versa.</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"><div>2) I'd really like to hear more from the actual plugin writers desiring
the change on if this is a really big deal or just a minor complaint and
if it is important to them, have them write a story detailing why. Who
is the best person for me to ask? Someone on Satellite? RPM? Is
someone reading this who is effected and could give further details?<br></div></blockquote><div><br></div><div>I don't feel strongly about it. I understand Jeff's opposition and I also understand that the fact that two independent workshop attendees from the community ran into the issue means it's a common <a href="https://www.youtube.com/watch?v=ap-22FjgoE4" target="_blank"> tripping point</a> for plugin writers. I don't feel like it's a serious issue in the long run, but there's definitely some friction there. Even though it is a convention, it's not one understood well enough that it prevents plugin writers from being frustrated by it. <br></div><div><br></div><div> I don't think we should drag this conversation out too much longer, but I'll bring up one new point. Pulp is unique in the sense that users subclassing Pulp models and adding their own arbitrary fields is even a concern in the first place. Most Django projects simply don't need to care about this at all. Does this justify breaking the "common" convention? <br></div><div><br></div><div>I will make one more suggestion. What about naming "id" -> "uuid"? This carries the clear connotation that it is a unique identifier so it is less likely to be confusing a la "id and _id", and is still less likely to have a namespace conflict.<br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 14, 2018 at 10:28 AM, Dana Walker <span dir="ltr"><<a href="mailto:dawalker@redhat.com" target="_blank">dawalker@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I'm -1 still but I had a few questions.</div><div><br></div><div>1) If we do this, what happens when someone uses multiple plugins and both of them want to use id as well? Wouldn't it be better to have the core application reserving it and *all* plugins doing some derivative name?</div><div><br></div><div>2) I'd really like to hear more from the actual plugin writers desiring the change on if this is a really big deal or just a minor complaint and if it is important to them, have them write a story detailing why. Who is the best person for me to ask? Someone on Satellite? RPM? Is someone reading this who is effected and could give further details?<br></div><div><br></div><div>Thanks,</div><div><br></div><div>--Dana<br></div></div><div class="gmail_extra"><span class=""><br clear="all"><div><div class="m_-9157826205589808597gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>
<p style="font-weight:bold;margin:0;padding:0;font-size:14px;text-transform:uppercase;margin-bottom:0"><span>Dana</span> <span>Walker</span></p>
<p style="font-weight:normal;font-size:10px;margin:0px 0px 4px;text-transform:uppercase"><span>Associate Software Engineer</span><span style="font-weight:normal;color:#aaa;margin:0"></span></p>
<p style="font-weight:normal;margin:0;font-size:10px;color:#999"><a style="color:#0088ce;font-size:10px;margin:0;text-decoration:none;font-family:'overpass',sans-serif" href="https://www.redhat.com" target="_blank">Red Hat <span><br><br></span></a></p>
<table border="0"><tbody><tr><td width="100px"><a href="https://red.ht/sig" target="_blank"> <img src="https://www.redhat.com/files/brand/email/sig-redhat.png" width="90" height="auto"></a> </td>
</tr></tbody></table>
</div></div></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">On Thu, Jun 14, 2018 at 9:08 AM, Brian Bouterse <span dir="ltr"><<a href="mailto:bbouters@redhat.com" target="_blank">bbouters@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Jeff, can you elaborate more on your -1. I want to understand it. I'm struggling to appreciate an "it's a convention" argument without sources like an RFC or similar. I don't believe internet articles are credible sources because any viewpoint can be validated by an internet post.<br></div><div><br></div><div>To recap my interests here, it's about being responsive to the community. We ask plugin writers for feedback and from two independent plugin writers (not me) we received feedback that this name wasn't ideal. I want us to be responsive to that. It's not only because I think their technical feedback is legit (albeit small), but also because it's our strategy during the beta/RC of Pulp3 core is to make adjustments based on plugin writer feedback. To receive feedback and choose to not follow the recommendation they suggested feels like not the way I want to interact with plugin writers. This is my main concern with not making a change in this area.<br></div><div><br></div><div>All the best,</div><div>Brian</div><div><div class="m_-9157826205589808597h5"><div><br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 13, 2018 at 10:26 AM, Jeff Ortel <span dir="ltr"><<a href="mailto:jortel@redhat.com" target="_blank">jortel@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><span>
<br>
<br>
<div class="m_-9157826205589808597m_-5738079327561909389m_4039839811345622941m_672728314250338745moz-cite-prefix">On 06/12/2018 05:03 PM, David Davis
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I do think the most compelling case for renaming
the field is having feedback from plugin writers to do so and
also the desire to reduce complexity for plugin writers.
Honestly, I am on the fence about renaming the field.
<div><br>
</div>
<div>Just to clarify, is anyone a hard -1 on renaming id?</div>
</div>
</blockquote>
<br></span>
-1<div><div class="m_-9157826205589808597m_-5738079327561909389m_4039839811345622941h5"><br>
<br>
<blockquote type="cite">
<div class="gmail_extra"><br clear="all">
<div>
<div class="m_-9157826205589808597m_-5738079327561909389m_4039839811345622941m_672728314250338745gmail_signature" data-smartmail="gmail_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 class="gmail_quote">On Tue, Jun 12, 2018 at 5:32 PM, Brian
Bouterse <span dir="ltr"><<a href="mailto:bbouters@redhat.com" target="_blank">bbouters@redhat.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote"><span>On Tue, Jun 12,
2018 at 5:11 PM, David Davis <span dir="ltr"><<a href="mailto:daviddavis@redhat.com" target="_blank">daviddavis@redhat.com</a>></span>
wrote:<br>
</span><span>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><span>On Tue, Jun 12, 2018 at 4:50
PM, Brian Bouterse <span dir="ltr"><<a href="mailto:bbouters@redhat.com" target="_blank">bbouters@redhat.com</a>></span>
wrote:<br>
</span>
<div class="gmail_extra">
<div class="gmail_quote"><span>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Silly question, but could
we just call our 'id' 'pk' instead?
Since that is a fully reserved value
in Django for the primary key it seems
clearest to just use that? What about
that?<br>
</div>
</blockquote>
<div><br>
</div>
</span>
<div>Are you recommending we rename the id
field to pk in the database? I’m not sure
if that would work.</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
</span>
<div>I'm wondering if its possible yes. #django says
it is but they've been wrong before. I haven't had a
chance to test it.<br>
</div>
<span>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote"><span>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote"><span>On
Tue, Jun 12, 2018 at 3:44
PM, Jeff Ortel <span dir="ltr"><<a href="mailto:jortel@redhat.com" target="_blank">jortel@redhat.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On
06/08/2018 02:57 PM,
Brian Bouterse wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
@jortel: We're blocked
on your -1 vote
expressed for 3704. We
have practical plugin
writer issues with the
current state. Can you
elaborate on why we
shouldn't go forward
with <a href="https://pulp.plan.io/issues/3704" rel="noreferrer" target="_blank">https://pulp.plan.io/issues/37<wbr>04</a><br>
</blockquote>
<br>
</span>
The 'ID' column is
reserved for the primary
key and is inappropriate
for natural keys. This is
well establish convention
and best practice. </blockquote>
<div><br>
</div>
</span>
<div>I don't understand this
reasoning. Earlier in the
thread we discussed how the
sources recommending these
conventions also mention
that if we have a practical
reason or problem with that
convention to do something
differently. We received
complaints on this name
about collisions so I don't
follow how we should still
follow the convention.<br>
</div>
<span>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Plugin writers specify
natural keys. Also, by
introducing '_' prefix (or
any prefix) means a table
could have both 'ID' and
'_ID' columns which is
especially confusing since
the 'ID' column would not
be the primary key.<br>
</blockquote>
<div><br>
</div>
</span>
<div>We have two concepts here
that are similar, so I think
that problem is mostly
unrelated to this decision.
For example, if we leave the
names as-is we have this
problem only now it's named
id and errata_id and in
addition we'll have the
problems listed below.<br>
</div>
<span>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
How does naming the
natural key for an rpm as
'rpm_id' cause a
significant problem for
plugin writers?<br>
</blockquote>
<div><br>
</div>
</span>
<div>It's a good question
because it's the whole
motivation for this change.
It's not an rpm, it's an
erratum which doesn't have
nevra like a package. It's
also the problem from
another content type I heard
about at Config Management
Camp.<br>
</div>
<div><br>
</div>
<div>It causes problems in two
ways:</div>
<div><br>
</div>
<div>* plugin users (not
writers) who are familiar
with 'id' as part of the
erratum data type would then
have to also understand this
field name renaming that
Pulp arbitrarily introduces.
This could get confusing
when the user submit a
filter with id='ID-2115858'
and they find nothing
because 'id' is matching on
the primary key not on the
'id' attribute of the errata
like they expect. Those
users would also be Pulp
users so they'll understand
that _id means the pk.</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
</span>
<div>By the same logic, if Pulp users know
that id means pk, wouldn’t they therefore
understand that the id is not the erratum
id?</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
</span>
<div>Yes by that logic they probably would know, but
the actual errata field is named 'id' so my it's
more about a correctness problem than confusion. A
correctness problem that passes along to users. If
we're going to have confusing names, let's pick
names that allow for alignment with the names
already chosen by content types which commonly do
use 'id'. Plugin writer's aren't in control of those
names; they already are chosen by content types.<br>
</div>
<span>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote"><span>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div>* plugins specifically
may wrap other tools and now
they have to maintain
mappings as well. This is
specifically the case with
errata which the data model
is design to be
name-for-name identical to
the createrepo_c interface</div>
<span>
<div><br>
</div>
</span></div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
</span>
<div>Mapping one field to another seems
rather minor. Or am I missing something?</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
</span>
<div>After 22 emails on this thread it feels like a
mountain out of a molehill. I don't mean to waste
people's time and energy. The reason I continue to
advocate for it is because when two, independent
plugin writers give feedback suggesting change, even
small change, we should adopt it. The complexity is
minor, but it's there. I've always believed
minimizing complexity has been our goal.<br>
</div>
<span>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote"><span>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>
<div class="gmail_extra">
<div class="gmail_quote"><span>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
@bmbouters: just curious,
where does the rpm 'id'
come from and how is it
used differently than the
NEVREA composite natural
key.
<div class="m_-9157826205589808597m_-5738079327561909389m_4039839811345622941m_672728314250338745m_-3272269538306778365m_-4618410301101877854m_-5047181755300947594m_-5542100025370726035HOEnZb">
<div class="m_-9157826205589808597m_-5738079327561909389m_4039839811345622941m_672728314250338745m_-3272269538306778365m_-4618410301101877854m_-5047181755300947594m_-5542100025370726035h5"><br>
<br>
______________________________<wbr>_________________<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<wbr>/listinfo/pulp-dev</a><br>
</div>
</div>
</blockquote>
</span></div>
<br>
</div>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<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<wbr>/listinfo/pulp-dev</a><br>
<br>
</blockquote>
</span></div>
<br>
</div>
</div>
</blockquote>
</span></div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div></div>
<br>______________________________<wbr>_________________<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<wbr>/listinfo/pulp-dev</a><br>
<br></blockquote></div><br></div></div></div></div></div></div>
<br>______________________________<wbr>_________________<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<wbr>/listinfo/pulp-dev</a><br>
<br></blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/pulp-dev</a><br>
<br></blockquote></div><br></div>