<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 27, 2017 at 11:27 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"><br>
- The artifact FK to a content unit would need to become optional.<br>
<br>
- Need to add use cases for cleaning up artifacts not associated with a content unit.<br>
<br>
- The upload API would need additional information needed to create an artifact.  Like relative path, size,<br>
checksums etc.<br>
<br>
- Since (I assume) you are proposing uploading/writing directly to artifact storage (not staging in a working<br>
dir), the flow would need to involve (optional) validation.  If validation fails, the artifact must not be<br>
inserted into the DB.</blockquote></div><br>Perhaps a decent middle ground would be to stick with the plan of keeping uploaded (or partially uploaded) files as a separate model until they are ready to be turned into a Content instance plus artifacts, and save their file data directly to somewhere within /var/lib/pulp/. It would be some path distinct from where Artifacts are stored. That's what I had imagined we would do anyway. Then as Dennis pointed out, turning that into an Artifact would only require a move operation on the same filesystem, which is super-cheap.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Would that address all the concerns? We'd write the data just once, and then move it once on the same filesystem. I haven't looked at django's support for this recently, but it seems like it should be doable.<br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><span style="margin:0px!important;padding:0px!important">Michael</span> <span style="margin:0px!important;padding:0px!important">Hrivnak</span></p><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"></p><span style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><span style="margin:0px!important;padding:0px!important">Principal Software Engineer</span><span style="margin:0px!important;padding:0px!important">, <span style="margin:0px!important;padding:0px!important">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!important;padding:0px!important"><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important">Red Hat</p></div></div>
</div></div>