Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #11966 (closed)

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

Bug: chgrp from CLI is broken for MIFs

Reported by: jamoore Owned by: sbesson
Priority: blocker Milestone: 5.0.0
Component: Client Version: 5.0.0-rc1
Keywords: n.a. Cc: sbesson, jburel, pwalczysko, mtbcarroll
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

The proprocessing phase for chgrp needed to make MIFs movable has left the CLI broken for 5.0 data:

(ome1)jamoore@blue:/opt/ome5/dist$ bin/omero chgrp --report simple /Dataset:251
omero.cmd.Chgrp /Dataset 251... failed: 'STEP ERR'
You cannot move part of fileset 4334; only complete filesets can be moved to another group.

Steps: 1563
Elapsed time: 6.733 secs.
Flags: [FAILURE, CANCELLED]

I'll open a PR which wraps the graph command with an omero.cmd.DoAll() instance, but this is something that will need to be rolled back once we've reworked graph processing.

Change History (4)

comment:1 Changed 7 years ago by jamoore

Initial changes but still not functional if anyone wants to have a look:

diff --git a/components/tools/OmeroPy/src/omero/cli.py b/components/tools/OmeroPy/src/omero/cli.py
index 90cc445..51f9c0c 100755
--- a/components/tools/OmeroPy/src/omero/cli.py
+++ b/components/tools/OmeroPy/src/omero/cli.py
@@ -1245,10 +1245,10 @@ class GraphArg(object):
 
             import omero
             import omero.cmd
-            return self.cmd_type(\
+            return omero.cmd.DoAll([self.cmd_type(\
                     type=type,\
                     id=id,\
-                    options={})
+                    options={})])
         except:
             raise ValueError("Bad object: %s", arg)
 
@@ -1396,6 +1396,11 @@ class GraphControl(CmdControl):
         """
         pass
 
+    def as_doall(self, req_or_doall):
+        if not isinstance(req_or_doall, omero.cmd.DoAll):
+            req_or_doall = omero.cmd.DoAll([req_or_doall])
+        return req_or_doall
+
     def main_method(self, args):
 
         import omero
@@ -1433,14 +1438,16 @@ class GraphControl(CmdControl):
             self.ctx.out("\n".join(keys))
             return # Early exit.
 
-        for req in args.obj:
-            if args.edit:
-                req.options = self.edit_options(req, specmap)
-            if args.opt:
-                for opt in args.opt:
-                    self.line_to_opts(opt, req.options)
+        for req_or_doall in args.obj:
+            doall = self.as_doall(req_or_doall)
+            for req in doall.requests:
+                if args.edit:
+                    req.options = self.edit_options(req, specmap)
+                if args.opt:
+                    for opt in args.opt:
+                        self.line_to_opts(opt, req.options)
 
-            self._process_request(req, args, client)
+            self._process_request(doall, args, client)
 
     def edit_options(self, req, specmap):
 
@@ -1476,9 +1483,10 @@ class GraphControl(CmdControl):
         return start_text
 
     def print_request_description(self, req):
-
-        cmd_type = self.cmd_type().ice_staticId()[2:].replace("::", ".")
-        return "%s %s %s... " % (cmd_type, req.type, req.id)
+        doall = self.as_doall(req)
+        for req in doall.requests:
+            cmd_type = self.cmd_type().ice_staticId()[2:].replace("::", ".")
+            return "%s %s %s... " % (cmd_type, req.type, req.id)
 
 class UserGroupControl(BaseControl):
 

comment:2 Changed 7 years ago by sbesson

  • Owner changed from jamoore to sbesson
  • Status changed from new to accepted

comment:3 Changed 7 years ago by sbesson

  • Resolution set to fixed
  • Status changed from accepted to closed

comment:4 Changed 7 years ago by Sebastien Besson <seb.besson@…>

(In [80664cf936aaeaca16f22842e291621abb042fb5/ome.git] on branch develop) Partial fix for chgrp error (See #11966)

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.77480 sec.)

We're Hiring!