https://dev.arvados.org/https://dev.arvados.org/favicon.ico?15576888422016-09-13T01:17:14ZArvadosArvados - Feature #10014: [SDKs] Python SDK should be more forthcoming when a file can't be found in a collection: list the path that can't be foundhttps://dev.arvados.org/issues/10014?journal_id=429232016-09-13T01:17:14ZWard Vandewegeward@curii.com
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/42923/diff?detail_id=41489">diff</a>)</li></ul> Arvados - Feature #10014: [SDKs] Python SDK should be more forthcoming when a file can't be found in a collection: list the path that can't be foundhttps://dev.arvados.org/issues/10014?journal_id=429242016-09-13T01:21:33ZWard Vandewegeward@curii.com
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/42924/diff?detail_id=41490">diff</a>)</li></ul> Arvados - Feature #10014: [SDKs] Python SDK should be more forthcoming when a file can't be found in a collection: list the path that can't be foundhttps://dev.arvados.org/issues/10014?journal_id=429252016-09-13T01:22:14ZWard Vandewegeward@curii.com
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/42925/diff?detail_id=41491">diff</a>)</li></ul> Arvados - Feature #10014: [SDKs] Python SDK should be more forthcoming when a file can't be found in a collection: list the path that can't be foundhttps://dev.arvados.org/issues/10014?journal_id=429312016-09-13T05:31:58ZTom Morristfmorris@veritasgenetics.com
<ul><li><strong>Assigned To</strong> set to <i>Tom Morris</i></li></ul> Arvados - Feature #10014: [SDKs] Python SDK should be more forthcoming when a file can't be found in a collection: list the path that can't be foundhttps://dev.arvados.org/issues/10014?journal_id=429902016-09-13T20:28:47ZTom Cleggtom@curii.com
<ul><li><strong>Assigned To</strong> changed from <i>Tom Morris</i> to <i>Tom Clegg</i></li></ul><p>10014-collection-error-detail @ <a class="changeset" title="10014: Add details to various error messages." href="https://dev.arvados.org/projects/arvados/repository/arvados/revisions/f64b139b96c3d79ad5fa1e6ea3a5ff06f3670cf9">f64b139</a></p> Arvados - Feature #10014: [SDKs] Python SDK should be more forthcoming when a file can't be found in a collection: list the path that can't be foundhttps://dev.arvados.org/issues/10014?journal_id=430942016-09-14T19:46:59ZTom Cleggtom@curii.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul> Arvados - Feature #10014: [SDKs] Python SDK should be more forthcoming when a file can't be found in a collection: list the path that can't be foundhttps://dev.arvados.org/issues/10014?journal_id=431902016-09-16T14:15:39ZLucas Di Pentimalucas.dipentima@curii.com
<ul></ul>Grepping the <code>raise</code> statements on <code>collection.py</code>, I've found some additional spots that may be improved:
<ul>
<li>Line 310: Would be useful to add the intended manifest stream that cannot be added because of containing a whitespace?</li>
<li>Line 625: Read-only collection name can be added to the error message.</li>
<li>Line 738: We refer to a “subcollection” not being empty, wouldn’t be more consistent to name it “directory” or “subdirectory” just like in other parts of the code?</li>
<li>Line 818: Can target path and/or source be added to that ArgumentError message?</li>
</ul>
<p>Also, a question related to <code>find_or_create</code>: If the file or collection exist and is not of <code>create_type</code>, shouldn’t we raise some exception instead of blindly return it without checking?</p> Arvados - Feature #10014: [SDKs] Python SDK should be more forthcoming when a file can't be found in a collection: list the path that can't be foundhttps://dev.arvados.org/issues/10014?journal_id=432002016-09-16T15:21:45ZTom Cleggtom@curii.com
<ul></ul><p>Lucas Di Pentima wrote:</p>
<blockquote>
<ul>
<li>Line 310: Would be useful to add the intended manifest stream that cannot be added because of containing a whitespace?</li>
</ul>
</blockquote>
<p>Added.</p>
<blockquote>
<ul>
<li>Line 625: Read-only collection name can be added to the error message.</li>
</ul>
</blockquote>
<p>Not actually sure how to get the collection name/uuid/pdh here...</p>
<blockquote>
<ul>
<li>Line 738: We refer to a “subcollection” not being empty, wouldn’t be more consistent to name it “directory” or “subdirectory” just like in other parts of the code?</li>
</ul>
</blockquote>
<p>Yes, updated.</p>
<blockquote>
<ul>
<li>Line 818: Can target path and/or source be added to that ArgumentError message?</li>
</ul>
</blockquote>
<p>Hm. The target path is empty by definition, and the intent seems to be to complain only if we don't have a string representation of source.</p>
<p>If I look closer, this function just starts to look rather buggy. sourcecomponents[-1] crashes before we even get to this error if source wasn't a basestring. Maybe investigate this in a separate branch?</p>
<blockquote>
<p>Also, a question related to <code>find_or_create</code>: If the file or collection exist and is not of <code>create_type</code>, shouldn’t we raise some exception instead of blindly return it without checking?</p>
</blockquote>
<p>The docstring claims this is the desired behavior but it does look like some callers are making different assumptions. Separate branch?</p>
<p>→commit:c727716</p> Arvados - Feature #10014: [SDKs] Python SDK should be more forthcoming when a file can't be found in a collection: list the path that can't be foundhttps://dev.arvados.org/issues/10014?journal_id=432012016-09-16T15:52:51ZTom Cleggtom@curii.com
<ul><li><strong>Category</strong> set to <i>SDKs</i></li><li><strong>Target version</strong> set to <i>2016-09-28 sprint</i></li></ul> Arvados - Feature #10014: [SDKs] Python SDK should be more forthcoming when a file can't be found in a collection: list the path that can't be foundhttps://dev.arvados.org/issues/10014?journal_id=432272016-09-19T14:04:56ZLucas Di Pentimalucas.dipentima@curii.com
<ul></ul><p>This LGTM, please merge.</p> Arvados - Feature #10014: [SDKs] Python SDK should be more forthcoming when a file can't be found in a collection: list the path that can't be foundhttps://dev.arvados.org/issues/10014?journal_id=432532016-09-19T17:50:05ZTom Cleggtom@curii.com
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li></ul><p>Applied in changeset arvados|commit:8cb96c1b23d02be8fac545d8c05a167454c1a11d.</p>