Project

General

Profile

Actions

Bug #7100

open

[Workbench] Reusing ArvadosResourceList results in inconsistent results

Added by Radhika Chippada over 9 years ago. Updated 10 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
Story points:
-
Release:
Release relationship:
Auto

Description

See #6640 for a historical perspective of this issue. In that issue, it was observed that the results of all_projects were different when invoked in different contexts. In note #21 of that issue, Tom added a detailed described (pasted below). It is desirable that we stop reusing the ArvadosResourceList object so that the results are not mangled in various invocations.

(Pasted from note #21 of #6640):

It would be even better to fix the ArvadosResourceList API so the caller doesn't have to remember to dup in cases like this -- i.e., each method like limit() acts more like merge(), returning a new ArvadosResourceList object instead of modifying itself in place -- and it might not even be that hard. If we can't deal with that, I wonder if there is at least a systematic way we can identify similar usage errors that are causing (or likely to cause) similar bugs?

set_a = Fubar.filter [['foo', '=', 'bar']]
set_b = set_a.filter [['baz', '=', 'waz']]
set_c = set_b.limit 5
set_a.each do |x|
  puts x
end

# Naturally expected behavior:
#  print all results matching foo=bar

# Actual behavior:
#  print <= 5 results matching foo=bar && baz=waz
Actions #1

Updated by Radhika Chippada over 9 years ago

  • Description updated (diff)
Actions #2

Updated by Brett Smith over 9 years ago

  • Target version changed from Bug Triage to Arvados Future Sprints
Actions #3

Updated by Ward Vandewege over 3 years ago

  • Target version deleted (Arvados Future Sprints)
Actions #4

Updated by Peter Amstutz almost 2 years ago

  • Release set to 60
Actions #5

Updated by Peter Amstutz 10 months ago

  • Target version set to Future
Actions

Also available in: Atom PDF