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 #8614 (closed)

Opened 12 years ago

Closed 12 years ago

Bug: No Script stdout if 'cross-group'

Reported by: wmoore Owned by: wmoore
Priority: critical Milestone: OMERO-4.4
Component: Web Version: n.a.
Keywords: n.a. Cc:
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: 2012-05-22 (15)

Description

If I run a script in a group that is not my eventContext.groupId by passing omero.group to runScript(), no stdout is returned (I assume no stderr is returned either).

Updated the gatewaytest/multi_group testRunScript() to include this - now fails (commit below).

Change History (9)

comment:1 Changed 12 years ago by wmoore

Failing gatewaytest: https://github.com/aleksandra-tarkowska/openmicroscopy/commit/7c1c7676ea6763a4db214a87114845d78efbf3d3

jrs-macbookpro-25107:test will$ python gatewaytest/multi_group.py ScriptTest.testRunScript
WARNING:omero.client:Ignoring error in client.__del__:<class 'Glacier2.SessionNotExistException'>
WARNING:omero.client:Ignoring error in client.__del__:<class 'Glacier2.SessionNotExistException'>
WARNING:omero.client:Ignoring error in client.__del__:<class 'Glacier2.SessionNotExistException'>
WARNING:omero.client:Ignoring error in client.__del__:<class 'Glacier2.SessionNotExistException'>
WARNING:omero.client:Ignoring error in client.__del__:<class 'Glacier2.SessionNotExistException'>
WARNING:omero.client:Ignoring error in client.__del__:<class 'Glacier2.SessionNotExistException'>
F
======================================================================
FAIL: testRunScript (__main__.ScriptTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "gatewaytest/multi_group.py", line 176, in testRunScript
    self.assertTrue('stdout' in results, "Failed to return stdout Original File. #8614")
AssertionError: Failed to return stdout Original File. #8614

----------------------------------------------------------------------
Ran 1 test in 4.170s

FAILED (failures=1)

comment:2 Changed 12 years ago by jburel

  • Sprint changed from 2012-05-08 (14) to 2012-05-22 (15)

Moved from sprint 2012-05-08 (14)

comment:3 Changed 12 years ago by Will Moore <will@…>

(In [7c1c7676ea6763a4db214a87114845d78efbf3d3/ome.git] on branch develop) Script stdout gatewaytest fails. See #8614

comment:4 Changed 12 years ago by jmoore

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

Added call context parameter to process.getResults() and the test now passes. (Pushed to ola/sprint15-web-bugfixes)

I'm closing this. If we want to do a full review of adding "-1" server-side we can, or as Chris suggested making -1 the default. But this isn't particular to scripts, so no need to keep this open.

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

(In [9ce721da663f7a45c65e905635a12ff1d3dcf903/ome.git] on branch develop) Fix call-context script test (See #8614)

Call to process.getResults() did not have the
SERVICE_OPTS like the other method invocations and
so the original file object was not found.

comment:6 Changed 12 years ago by wmoore

  • Resolution fixed deleted
  • Status changed from closed to reopened

I have just found that this is failing again. Scripts ran with omero.group set to a different group than my default group don't return stdout.

I have tried to re-run the test above, but I'm getting import problems with the gatewaytest setup. I just tried to rebuild server on origin/develop but now it won't start (need DB upgrade)? so I'll try again tomorrow...

comment:7 Changed 12 years ago by wmoore

  • Component changed from Scripting to Web
  • Owner changed from jmoore to wmoore
  • Status changed from reopened to accepted

Test test is still passing, so it seems to be a webclient issue.

comment:8 Changed 12 years ago by wmoore

Don't understand this:

When I print the script results like this:

                proc = omero.grid.ScriptProcessPrx.checkedCast(conn.c.ic.stringToProxy(cbString))
                cb = omero.scripts.ProcessCallbackI(conn.c, proc)
                # check if we get something back from the handle...
                if cb.block(0): # ms.
                    cb.close()
                    try:
                        results = proc.getResults(0)        # we can only retrieve this ONCE - must save results
                    except Exception, x:
                        logger.error(traceback.format_exc())
                        continue

                    for key, value in results.items():
                        print key, value

I don't see stdout if the group that I'm running the script in isn't the default group.
I DO see stdout if I'm running the script in the default group.

In both cases, the stdout file appears as expected in the binary repository.

comment:9 Changed 12 years ago by wmoore

  • Resolution set to fixed
  • Status changed from accepted to closed
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.68729 sec.)

We're Hiring!