Closed will-moore closed 4 years ago
@will-moore : please see https://github.com/ome/omero-py/issues/153 for a possible leak with this usage.
@josh Is there a workaround for the leak?
We do the same in conn.deleteObjects()
so I guess we need to apply the same fix there too.
@will-moore : the block from https://github.com/ome/openmicroscopy/pull/6082#issuecomment-512740248
@@ -339,6 +339,7 @@ def forgotten_password(request, **kwargs):
try:
conn._waitOnCmd(handle)
finally:
+ # This likely leaks a callback servant
handle.close()
should be:
try:
cb = conn._waitOnCmd(handle)
finally:
cb.close(True)
i.e. if you are using a callback, close via the callback and not via the handle with the issue being that we don't generally consider _waitOnCmd
to be using a callback, but it is internally.
Travis failing with tests
INTERNALERROR> self.writer = self._tw
INTERNALERROR> AttributeError: can't set attribute
Probably needs the same fix as omero-web https://github.com/ome/omero-web/pull/152
Thanks @manics - that helped get a bit further. Now tests are failing for python 3.6 only with:
INTERNALERROR> AssertionError: ('test/unit/tablestest/test_servants.py::TestTables::testTablePreInitialized', <WorkerController gw0>)
INTERNALERROR> assert not 'test/unit/tablestest/test_servants.py::TestTables::testTablePreInitialized'
Let's concentrate on https://github.com/ome/omero-py/pull/198 to try to fix all open PRs.
Re-opening with #198 in.
Green!
As I am looking into cutting a patch release of omero-py
with all included fixes (see https://github.com/ome/omero-py/milestone/4?closed=1), this PR contains the only change that worries me as it adds a new API to the omero.gateway
and the discussion suggests this is still in-progress work.
@will-moore how confident do you feel about making this a public gateway API and supporting it? Additionally, is anything in our own stack consuming it yet?
One potential solution would be to mark this API as internal using the leading underscore convention (https://www.python.org/dev/peps/pep-0008/#public-and-internal-interfaces) i.e. def _chownObjects
, release omero-py 5.6.3
and start consuming this API until we are happy to declare it as public API?
I'm pretty happy with releasing this. It's a thin wrapper around the underlying API and we have tests. The usage of it in our own stack is in progress at https://github.com/ome/omero-web/pull/149 but needs this to be in place first, as well as #196 from omero-py.
Thanks. I think options are:
omero-py 5.7.0
omero-py 5.7.0
and start working towards omero-py 5.8.0
with #196omero-py 5.6.3
and make the API public together with the one introduced #196 in omero-py 5.7.0
The first option is my least favorite one as we effectively block a component release for internal reasons while there are fixes that many users could consume immediately. I am equally fine with options 2 and 3.
I don't have a strong preference between those options.
Don't know how long #196 will take. No fixes requested yet...
Happy to open a PR to add a 5.7.0 changelog or make chown "internal" (by just prefixing with _
?)...
Started to add Chown functionality to Blitz Gateway to allow for support in webclient.
Tests added in https://github.com/ome/openmicroscopy/pull/6223