<div dir="ltr">@dalley you're right: we can't use ! in field names since these field names are used in the bindings and ! is a special character in many languages (including Python).<div><br></div><div><div>I've closed out the django-rest-framework-filters PR. This PR should be ready for review:</div><div><br></div><div><a href="https://github.com/pulp/pulpcore/pull/452" target="_blank">https://github.com/pulp/pulpcore/pull/452</a><br clear="all"><div><div dir="ltr" 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></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2020 at 12:04 PM Dana Walker <<a href="mailto:dawalker@redhat.com" target="_blank">dawalker@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>Given dalley's point regarding the bindings, option 3 sounds best.</div><div><br></div><div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div>
        <p style="font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:capitalize;font-family:RedHatText,sans-serif">
          <span>Dana</span> <span>Walker</span><span style="color:rgb(170,170,170);margin:0px"></span>
        </p>
        <p style="font-weight:normal;font-size:12px;margin:0px 0px 4px;text-transform:capitalize;font-family:RedHatText,sans-serif">She / Her / Hers</p>
        <p style="font-weight:normal;font-size:12px;margin:0px;text-transform:capitalize;font-family:RedHatText,sans-serif">
          <span>Software Engineer, Pulp Project</span>
        </p>
        <p style="font-weight:normal;margin:0px 0px 4px;font-size:12px;font-family:RedHatText,sans-serif">
          <a style="color:rgb(0,136,206);font-size:12px;margin:0px;text-decoration:none;font-family:RedHatText,sans-serif" href="https://www.redhat.com" target="_blank">Red Hat <span></span></a>
        </p>
    <div style="margin-bottom:4px">
      
      
    </div>
    <p style="font-weight:normal;margin:0px;font-size:12px;font-family:RedHatText,sans-serif">
      <span style="margin:0px;padding:0px"><a style="color:rgb(0,0,0);font-size:12px;margin:0px;text-decoration:none;font-family:RedHatText,sans-serif" href="mailto:dawalker@redhat.com" target="_blank">dawalker@redhat.com</a>   </span>
      
      
    </p>
    
    

    <div style="margin-top:12px">
      <table border="0">
        <tbody><tr>
          <td width="100px"><a href="https://www.redhat.com" target="_blank"> <img src="https://marketing-outfit-prod-images.s3-us-west-2.amazonaws.com/f5445ae0c9ddafd5b2f1836854d7416a/Logo-RedHat-Email.png" width="90" height="auto"></a> </td>
          
        </tr>
      </tbody></table>
    </div>

  </div><table border="0"><tbody><tr><td width="100px"><br></td>
</tr></tbody></table>

</div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2020 at 11:45 AM Daniel Alley <<a href="mailto:dalley@redhat.com" 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>Going by the comments in this PR [0], if something like this would be used with the API bindings, wouldn't the name__ne=value scheme be better?  It also just generally seems a bit more consistent.<br></div><div><br></div><div>[0] <a href="https://github.com/pulp/pulpcore/pull/316/files" target="_blank">https://github.com/pulp/pulpcore/pull/316/files</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2020 at 10:51 AM David Davis <<a href="mailto:daviddavis@redhat.com" 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><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>If we went with django-rest-framework-filters, I'm not sure we could go with other options later. Our REST API is semantically versioned so we couldn't switch from name!=value to name__ne=value. Perhaps we could label not equal filters as a tech preview to get around this?</div><div><br></div><div>Also, I'm curious about how we'd upgrade to django 3.0. It looks like they haven't been merging PRs so I imagine we'd have to fork the project, add django 3.0 support ourselves, and then vendor it. Is my understanding correct?</div><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" class="gmail_attr">On Wed, Jan 29, 2020 at 10:13 AM Brian Bouterse <<a href="mailto:bmbouter@redhat.com" target="_blank">bmbouter@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" class="gmail_attr">On Wed, Jan 29, 2020 at 10:03 AM David Davis <<a href="mailto:daviddavis@redhat.com" 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">A few weeks ago, Katello opened an issue[0] requesting a set of "not equal" filters (ie filters where a field is not equal to a certain value). I created a pulpcore issue[0] to investigate whether pulpcore could provide this functionality and it seems there are a few different options. I wanted to ask for feedback though as this would affect the user experience and thus whatever option we choose would be permanent.<div><br></div><div>There are three options:</div><div><br></div><div>1. First there is a package which adds functionality on top of django-rest-framework-filters[1] which dynamically provides filters for every field using ! (eg name!=value, state!=value). The problem is that the package doesn't look like it's well maintained[2] and we'd quickly run into problems when we try to upgrade to django 3 for example[3]. We'd probably have to fork the project or take over ownership somehow.</div></div></blockquote><div>I default to this choice because even though it's not code that is in our control and that can feel uncomfortable, they wrote it and it does what we need. If it doesn't work out we can go with other options later.</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 dir="ltr"><div><br></div><div>2. The second solution is that we can try to import the code from django-rest-framework-filters that creates these dynamic filters. This would free us from having to support any other features from django-rest-framework-filters we don't want to support.</div><div><br></div><div>3. The third option is to create a django scope (ie "ne") that would allow plugin writers to manually define filters like "name__eq=value". This solution seems the most verbose/explicit/straightforward but also the most work for plugin writers. I have a couple PRs open to demonstrate this solution:</div><div><br></div><div><a href="https://github.com/pulp/pulp_rpm/pull/1559" target="_blank">https://github.com/pulp/pulp_rpm/pull/1559</a><br></div><div><a href="https://github.com/pulp/pulpcore/pull/452" target="_blank">https://github.com/pulp/pulpcore/pull/452</a><br></div><div><br></div><div>I'll try to move forward with a solution next week. Feedback before then would be much appreciated.</div><div><div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div>[0] <a href="https://pulp.plan.io/issues/5854" target="_blank">https://pulp.plan.io/issues/5854</a></div><div>[1] <a href="https://github.com/philipn/django-rest-framework-filters" target="_blank">https://github.com/philipn/django-rest-framework-filters</a></div><div>[2] <a href="https://github.com/philipn/django-rest-framework-filters/issues/324" target="_blank">https://github.com/philipn/django-rest-framework-filters/issues/324</a> and <a href="https://github.com/philipn/django-rest-framework-filters/issues/287" target="_blank">https://github.com/philipn/django-rest-framework-filters/issues/287</a></div><div>[3] <a href="https://github.com/philipn/django-rest-framework-filters/issues/326" target="_blank">https://github.com/philipn/django-rest-framework-filters/issues/326</a></div><div><br></div><div>David<br></div></div></div></div></div></div></div></div></div></div></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></div>
</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>
_______________________________________________<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>
</blockquote></div>