<div dir="ltr">I think we could design an API in 3.0 that would support versioned repos in 3.1+. However, our current API does not. For example, the /repositorycontents/ endpoint doesn't make sense with versioned repos as no one would want to add/remove content units one-by-one when doing so would generate a new repo version each time. Imagine that we end up with an endpoint in 3.0 that’s not compatible with versioned repos. What would we do? I think this is a strong argument for adding versioned repos now.<div><br></div><div>Of course the main drawback is that it might delay the beta. But I wonder by how much. It might be good to groom the versioned repo user stories so that (a) we can see how much value they provide to end users and (b) how closely they align with the work @mhrivnak has done.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_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, Nov 28, 2017 at 4:00 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"><div>In reading back over the last email thread in May, it ended with us looking at URL options to ensure we could release 3.0 and add in repo versions in 3.1+. We definitely want repo versions in the 3.y line, so we wanted to make sure that was possible. If it wasn't, then we may have to add it into 3.0.<br><br>That question is a lot easier now given how firm the API is. I think we can add in versioned repos in 3.1+, in a natural way. Just like a user creates a Publication which triggers a publish, a user would create a RepoVersion which would trigger a sync to produce that new RepoVersion. The repo versions work needs to continue, but first I hope we prioritize getting to Beta 1 for core. There are a lot of use cases in black on the MVP which are not implemented or written in Redmine. I believe closing that gap would be a better use of time given that we can add this later.</div><div><br></div><div>What do others think?<br></div><div><div class="h5"><div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 28, 2017 at 2:24 PM, Dennis Kliban <span dir="ltr"><<a href="mailto:dkliban@redhat.com" target="_blank">dkliban@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 class="gmail_extra"><div class="gmail_extra">I have a hard objection to including versioned repositories in 3.0. We agreed to make sure that our current design would not prevent us from adding versioned repositories in the future. We did NOT agree to including versioned repositories in 3.0 release. This is a big code change that did not go through our regular planning process. I greatly appreciate your effort in driving this feature forward, but we should take a step back and go through our regular process. I am also concerned that adding such a big change at this time will delay the beta. <br><div class="gmail_quote"><br></div><div class="gmail_quote">-Dennis<br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><span>On Tue, Nov 28, 2017 at 10:10 AM, Michael Hrivnak <span dir="ltr"><<a href="mailto:mhrivnak@redhat.com" target="_blank">mhrivnak@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">Following up on previous discussions, I did an analysis of how repository versioning would impact Pulp 3's current REST API and plugin API. A lot has changed since we last discussed the topic (in May 2017), such as how we handle publications, and how the REST API is laid out. You can read the analysis here:<div><br></div><div><a href="https://pulp.plan.io/projects/pulp/wiki/Repository_Versions" target="_blank">https://pulp.plan.io/projects/<wbr>pulp/wiki/Repository_Versions</a></div><div><br></div><div>We previously discussed and vetted the mechanics at great length. While there was broad agreement on the value to Pulp 3, there was uncertainty about the details of how it would impact REST clients and plugin writers, and also uncertainty about how long it would take to fully implement.</div><div><br></div><div>In the course of my recent analysis, two things became clear. 1) both current APIs are not compatible and would have to change. Details are on the wiki page above. 2) the PoC from earlier this year indeed covers the hard parts, leaving mostly DRF details to sort out.</div></div></blockquote></span></div><div class="gmail_quote"><br></div><div class="gmail_quote">I don't agree with your assessment that the current REST API is not compatible with adding repository versions. A repository version is it's own resource that can be added <br></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><div dir="ltr"><div><br></div><div>I started rebasing the PoC onto current 3.0-dev, and within an hour I had it working with the updated REST endpoints. With that having been so easy, I threw caution to the wind, and within a few hours I had a fully functional branch that covered all the key use cases.</div><div><br></div><div>- sync creates a new version</div><div>- versions and their content sets are visible through the REST API</div><div>- each version shows what content was added and removed</div><div>- versions can be deleted, which queues a task that squashes changes as previously discussed</div><div>- the ChangeSet and pulp_file were updated to work with versions</div><div>- publish defaults to using the latest version</div><div><br></div><div>I also created a set of tests to help prove that it behaves correctly:</div><div><br></div><div><a href="https://gist.github.com/mhrivnak/69af54063dff7465212914094dff34c2" target="_blank">https://gist.github.com/mhrivn<wbr>ak/69af54063dff7465212914094df<wbr>f34c2</a></div><div><br></div><div>I have just about 12 hours of recent work into it, and the code is PR-ready. It's just missing doc updates and release notes. It's been difficult to keep discussion moving toward a full plan due to the uncertainties mentioned above, so hopefully this can alleviate those concerns and give everyone something concrete to look at.<br></div><div><br></div><div><a href="https://github.com/pulp/pulp/pull/3228" target="_blank">https://github.com/pulp/pulp/p<wbr>ull/3228</a></div><div><a href="https://github.com/pulp/pulp_file/pull/20" target="_blank">https://github.com/pulp/pulp_f<wbr>ile/pull/20</a></div><div><br></div><div>Two notable items are missing. One is that there is no way to arbitrarily add and remove content from a repo now, since this removes the "repositorycontent" endpoint. But we need to solve that with a more formal and bulk add/remove API anyway. I also found that the "repositorycontent" endpoint was not using tasks, and thus there was no repo locking, so it needed additional work anyway. Based on this overall effort, I think it will be very easy to add if we just agree on what the endpoints should look like.</div><div><br></div><div>The other is that publish does not in this PR accept a reference to a version. It always uses the latest. That would also be a very easy enhancement to make.</div><div><br></div><div>I am happy to support getting this merged as I transition to being a more passive community member, assuming there are no objections. I am also of course happy to help support this into the future, as I believe strongly in its value and importance (see previous thread).</div><div><br></div><div>Please provide feedback and questions. If a live meeting this week would help expedite evaluation of this effort, I'm happy to schedule that. And assuming there are no hard objections, I'm happy to proceed with documentation updates.</div><div><br></div><div>Thanks!<span class="m_-2112175331224786485m_6255089427418833270m_-729876166699844334m_499469974459776684HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div class="m_-2112175331224786485m_6255089427418833270m_-729876166699844334m_499469974459776684m_-7365174836549085655gmail-m_-928929903824755631gmail_signature"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px;padding:0px"><span style="margin:0px;padding:0px">Michael</span> <span style="margin:0px;padding:0px">Hrivnak</span></p><span style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px;padding:0px"><span style="margin:0px;padding:0px">Principal Software Engineer</span><span style="margin:0px;padding:0px">, <span style="margin:0px;padding:0px">RHCE</span></span> </span><span style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px"></span><br style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px;padding:0px"><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px;padding:0px">Red Hat</p></div></div>
</font></span></div></div>
<br></span><span>______________________________<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></span></blockquote></div><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">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>