Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
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 #8121 (closed)

Opened 12 years ago

Closed 12 years ago

Review script services for omero.group:-1

Reported by: jamoore Owned by: jamoore
Priority: minor Milestone: OMERO-4.4
Component: General Version: n.a.
Keywords: n.a. Cc: wmoore, cneves, sbesson
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: n.a.

Description

Both IScript as well as processor.py need to checked for compliance with omero.group in the call context. As long as calls are purely within the blitz (java) server, the omero.cmd.CallContext interceptor should suffice for applying the call context to the thread.

As soon as calls leave a thread and more so the entire java process, it becomes necessary to review every remote invocation to make sure that it is properly re-passing omero.group

Change History (2)

comment:1 Changed 12 years ago by jmoore <josh@…>

(In [998dfd91ee1529d1b8f49f4c2ce038d034eef007/ome.git] on branch develop) Fix scripts after the internal servant refactoring (See #8121)

Scripts were completely broken after changes in this
branch (ClassCastExceptions?, etc.) They are again working
but the propagation of omero.group still needs to be tested
and likely fixed.

comment:2 Changed 12 years ago by jmoore

  • Cc sbesson added
  • Remaining Time changed from 1.0 to 0
  • Resolution set to fixed
  • Status changed from new to closed

Further testing by Will and Sebastien along with a commit I'll push to sprint17-bugfixes should have omero.group propagating. (Optimal, however, would be to have more automated tests)

commit d8aef8159da2980c3c370b8ff44ecb188b5c3d78
Author: jmoore <josh@glencoesoftware.com>
Date:   Wed Jun 6 09:58:56 2012

    Propagate Current.ctx throughout ScriptI (See #8121)

diff --git a/components/blitz/src/ome/services/blitz/impl/ScriptI.java b/components/blitz/src/ome/services/blitz/impl/ScriptI.java
index 25dedf8..3991919 100755
--- a/components/blitz/src/ome/services/blitz/impl/ScriptI.java
+++ b/components/blitz/src/ome/services/blitz/impl/ScriptI.java
@@ -201,8 +201,8 @@ public class ScriptI extends AbstractAmdServant implements _IScriptOperations,
             final String path, final String scriptText, final Current __current) throws ServerError {
         safeRunnableCall(__current, __cb, false, new Callable<Long>() {
             public Long call() throws Exception {
-                OriginalFile file = makeFile(path, scriptText);
-                file = writeContent(file, scriptText);
+                OriginalFile file = makeFile(path, scriptText, __current);
+                file = writeContent(file, scriptText, __current);
                 validateParams(__current, file);
                 return file.getId();
             }
@@ -258,7 +258,8 @@ public class ScriptI extends AbstractAmdServant implements _IScriptOperations,
                     IceMapper mapper = new IceMapper();
                     file = (OriginalFile) mapper.reverse(fileObject);
                 } else {
-                    file = getOriginalFileOrNull(fileObject.getId().getValue());
+                    file = getOriginalFileOrNull(fileObject.getId().getValue(),
+                            __current);
...
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.76517 sec.)

We're Hiring!