https://dev.arvados.org/https://dev.arvados.org/favicon.ico?15576888422015-04-14T15:43:37ZArvadosArvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=234592015-04-14T15:43:37ZBryan Coscabcosca@curii.com
<ul></ul><p>I was pressing run a pipeline in project: <a href="https://arvadosapi.com/qr1hi-j7d0g-l1emsbyyx6wyjdh">qr1hi-j7d0g-l1emsbyyx6wyjdh</a> and the template was from project: <a href="https://arvadosapi.com/qr1hi-j7d0g-l1emsbyyx6wyjdh">qr1hi-j7d0g-l1emsbyyx6wyjdh</a></p> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=234742015-04-15T10:48:25ZPjotr Prins
<ul></ul><p>Maybe related to <a class="issue tracker-4 status-3 priority-6 priority-high2 closed" title="Admin: arv-get times out (Resolved)" href="https://dev.arvados.org/issues/5726">#5726</a></p> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=235872015-04-17T17:30:34ZRadhika Chippadaradhika@curoverse.com
<ul><li><strong>Subject</strong> changed from <i>Search for pipeline templates breaks</i> to <i>[Workbench] Search for pipeline templates breaks</i></li><li><strong>Category</strong> set to <i>Workbench</i></li></ul> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=236212015-04-17T19:03:07ZTom Cleggtom@curii.com
<ul></ul><p>Is this just happening when the search term ends with a space, or is that a coincidence?</p>
If that's not it, it would be good to collect some more evidence/clues to figure out what's happening:
<ul>
<li>Browser network activity</li>
<li>Workbench logs</li>
</ul> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=236482015-04-18T02:56:52ZRadhika Chippadaradhika@curoverse.com
<ul></ul><p>This issue is purely related to the ajax reloading. A few scenarios where the issue can be experienced:</p>
<ul>
<li>I think what happens is if there was an interruption while the page is loading, the error is displayed. You can reproduce it consistently using the steps below:
<ul>
<li>Go to a project page. It starts loading.</li>
<li>After you see the loading spinner, and while it is still showing*, hit enter or click on reload in address bar.</li>
<li>You will see “Oops request failed. Retry”. The page does load fine if I just leave it alone.</li>
</ul></li>
</ul>
<ul>
<li>You can also see this issue using the following: Go to a pipeline_instance page. While it is loading and when you see the loading spinner, click on Home project link or select a project from the Projects drop down.</li>
</ul>
<ul>
<li>Another scenario. Go to dashboard. When the dashboard is reloading (which happens once every 15 seconds), click on any link in the page such as a pipeline instance link. That is, click on a link while the <strong style="color:red;">red</strong> loading spinner is being displayed in the top-nav. You will see a "Reload tab" button with "An error occured" message. See <a class="external" href="https://arvados.org/attachments/download/564/Reload-tab-error.png">https://arvados.org/attachments/download/564/Reload-tab-error.png</a></li>
</ul>
<ul>
<li>One more scenario: While in dashboard and while the loading spinner is shown in top-nav, enter a uuid in search box and hit enter. You will see the reload tab button</li>
</ul>
<ul>
<li>In case of Bryan's search, I was able to reproduce it with much difficulty and not quite reliably using this method. Select a template from search results (or a collection while looking at other objects in the search dialog). While it is loading in preview panel, enter / change text in search filter.</li>
</ul> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=236752015-04-20T18:21:03ZRadhika Chippadaradhika@curoverse.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>Target version</strong> changed from <i>Bug Triage</i> to <i>2015-04-29 sprint</i></li><li><strong>Assigned To</strong> set to <i>Radhika Chippada</i></li></ul> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=236762015-04-20T18:43:32ZRadhika Chippadaradhika@curoverse.com
<ul></ul><p>Implementation notes:</p>
<p>It appears that the check for new ajax request is failing. I added console.log and found that the comparison below is failing. By adding JSON.stringify, I was able to resolve this issue.</p>
<pre>
if ($container.attr('data-infinite-serial') != this.serial)
console log:
$container.attr('data-infinite-serial’) = "1429552990896"
this.serial = 1429552990896
</pre> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=237362015-04-22T18:33:21ZRadhika Chippadaradhika@curoverse.com
<ul><li><strong>File</strong> <a href="/attachments/564">Reload-tab-error.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/564/Reload-tab-error.png">Reload-tab-error.png</a> added</li></ul> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=237722015-04-23T18:03:25ZBrett Smithbrett.smith@curii.com
<ul></ul><p>Reviewing <a class="changeset" title="Merge branch 'master' into 5720-ajax-loading-error" href="https://dev.arvados.org/projects/arvados/repository/arvados/revisions/e5f039f2e451790ff3838c5810a22a0749d18f6d">e5f039f</a></p>
<p>It seems like the basic issue here is that we're taking a non-string type (a Date) and putting it into an attribute, where it has to be stringified. From there, we have to remember to redo the stringification every time we want to do the comparison.</p>
<p>Is it possible to attach the original Date directly to the element by using <a href="http://api.jquery.com/data/" class="external"><code>.data()</code></a> rather than <code>.attr()</code>? I don't see any reason why this needs to be an attribute per se, and it would let the comparisons work without any need for coercion.</p>
<p>Part of the reason I'm suggesting this is because there's another place later in the file where the same comparison happens, and that hasn't been fixed in this branch. This suggests to me that making the comparison easier to do is going to be more less error-prone in the long term than requiring this incantation every time.</p>
<p>Thanks.</p> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=239492015-04-29T19:06:24ZRadhika Chippadaradhika@curoverse.com
<ul><li><strong>Target version</strong> changed from <i>2015-04-29 sprint</i> to <i>2015-05-20 sprint</i></li></ul> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=239592015-04-29T19:10:49ZWard Vandewegeward@curii.com
<ul><li><strong>Story points</strong> set to <i>1.0</i></li></ul> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=242962015-05-07T20:59:36ZTom Cleggtom@curii.com
<ul></ul><p>+1 to note-9. <code class="javascript syntaxhl"><span class="nx">$container</span><span class="p">.</span><span class="nx">data</span><span class="p">(</span><span class="dl">'</span><span class="s1">infinite-serial</span><span class="dl">'</span><span class="p">)</span></code> can hold any js object... like a Date.</p>
<pre>
$('body').data('foobar', new Date())
[<body>…</body>]
d=$('body').data('foobar')
Thu May 07 2015 16:57:44 GMT-0400 (EDT)
d.getMilliseconds()
573
</pre> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=243192015-05-08T14:32:38ZRadhika Chippadaradhika@curoverse.com
<ul></ul><blockquote>
<p>In IRC:</p>
<p><a class="email" href="mailto:tom@curoverse.com">tom@curoverse.com</a> <br />5:06 if (jqxhr.readyState 0 || jqxhr.status 0) {<br />message = "Cancelled." <br />5:06 in infinite_scroll.js<br />5:07 maybe we just need to check that in the tab-loading error handler as well, and do something similar?</p>
</blockquote>
<p>Yes, this is indeed the problem. When readyState or status is 0, it could mean that the user has navigated away. I hence added logic to skip this error. Now I do not see the error in any of the scenarios I listed in note #5.</p>
<p><a class="external" href="http://bartwullems.blogspot.com/2012/02/ajax-request-returns-status-0.html">http://bartwullems.blogspot.com/2012/02/ajax-request-returns-status-0.html</a></p> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=243812015-05-08T19:26:11ZTom Cleggtom@curii.com
<ul></ul><p>At <a class="changeset" title="5720: when jqxhr readyState == 0 or status == 0, it could be that the user has navigated away fro..." href="https://dev.arvados.org/projects/arvados/repository/arvados/revisions/acf8433929b812913208e0868599d3a507c7cf34">acf8433</a></p>
<p>In tab_panes.js, the early "return" skips the <code>$pane.removeClass('pane-loading').addClass('pane-loaded')</code> state cleanup, which error handling normally does. We probably don't want to skip that.</p>
<p>In infinite_scroll.js, the early "return" skips the "remove div.spinner" code. It seems wrong to leave the spinner showing when we know the request has been cancelled.</p>
<p>But stepping back a bit, I'm a bit wary of "could mean the user has navigated away" as a reason to completely silence the failure feedback. What if you hit "forward", then "cancel", thereby cancelling the "forward" navigation in time to stay on the current page, but still interrupting the current page's progress?</p>
<blockquote>
<p>While in dashboard and while the loading spinner is shown in top-nav, enter a uuid in search box and hit enter. You will see the reload tab button</p>
</blockquote>
<p>This is another example where silently giving up could be worse than the current behavior. Of course, it would be much better to let the tab continue to load while the search box is opening -- but that sounds like its own bug, independent of the "what if tab loading <em>is</em> cancelled for some reason" issue.</p>
<p>If we used some sort of "un-cancelled" event to resume/retry loading in the relevant situations, it would make sense to go silent while the page is abandoned. But as it is, going silent just makes users more likely to end up with content areas that are inexplicably blank or have stopped refreshing.</p>
<p>(Is it documented somewhere that readyState==0 always means "cancelled by user"? If not, that's another reason not to just go silent: we could be unwittingly throwing away error feedback in non-user-initiated fail/cancel modes.)</p>
<p>Perhaps it would be better to say <code>errhtml = 'Cancelled.'</code> in both cases instead of going silent?</p>
<p>One other minor comment -- <code>$foo.data('data-infinite-scroll')</code> could be just <code>$foo.data('infinite-scroll')</code>.</p> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=244092015-05-08T20:13:49ZTom Cleggtom@curii.com
<ul></ul><p>(following up on IRC comments)</p>
In tab_panes.js
<ul>
<li>if <code>$pane.attr('data-loaded-at') > 0</code> then there is already valid content (i.e., this is just a refresh) it seems reasonable to leave the content alone, but we still need to fix up the pane-loading and pane-loaded classes. Ideally we'd also schedule a refresh in a few seconds, to avoid the case where "navigate away / cancel navigating away" causes us to skip the content update triggered by a websocket message that won't get triggered again (e.g., "pipeline complete"?) and let content stay stale indefinitely.</li>
<li>otherwise (i.e., when this is the initial tab load) it seems reasonable to show the "cancelled" message.</li>
</ul> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=245912015-05-12T17:54:25ZRadhika Chippadaradhika@curoverse.com
<ul></ul><ul>
<li>Reverted the "skip" logic and using error message "Cancelled" when "jqxhr.readyState 0 || jqxhr.status 0". We would continue to see the unexpected error messages in the cases I listed above; however, if this is more desirable than skip, we now have it.</li>
</ul>
<ul>
<li>Tom said "if $pane.attr('data-loaded-at') > 0 then there is already valid content ..." : I am not sure if I addressed this accurately. Please let me know if you have any further comments about this. Thanks.</li>
</ul> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=247752015-05-18T17:41:03ZTom Cleggtom@curii.com
<ul></ul><p>5720-ajax-loading-error looks good. I pushed (without actually trying) <a class="changeset" title="5720: Leave existing content in place (and schedule another reload) if a tab-refresh gets cancelled." href="https://dev.arvados.org/projects/arvados/repository/arvados/revisions/6702cdabbecef52d342c6f8c67c22cd15377165c">6702cda</a> to explain what I meant about "if data-loaded-at > 0 then...". Does this make sense?</p> Arvados - Bug #5720: [Workbench] Search for pipeline templates breakshttps://dev.arvados.org/issues/5720?journal_id=248062015-05-19T02:25:08ZRadhika Chippadaradhika@curoverse.com
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset arvados|commit:f1827e2044aff826e63826880b296a59c4a17e2a.</p>