Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-integrate next_infra into develop #5616

Merged
merged 67 commits into from
Jan 18, 2018
Merged

Re-integrate next_infra into develop #5616

merged 67 commits into from
Jan 18, 2018

Conversation

joshmoore
Copy link
Member

@joshmoore joshmoore commented Jan 15, 2018

What this PR does

Re-integrates the next_infra branch back into develop. Once merged, the next_infra integration branch will be deleted. The following PRs will then be included for release in 5.4.2:

Users

CLI

Devs

Python

Java


(*): includes new API that should be signed off on

joshmoore and others added 30 commits October 7, 2017 17:56
A new "tracked service" internal API has been added. All calls to
`_create_func` in `ProxyObjectWrapper` now registers the string
representation of the created service as well as the current call
stack to the owning `BlitzGateway` instance. If on deletion, services
are left open, then an ERROR message including the call stack will
be printed.
Avoids potential for confusion with messages genuinely
from the RawAccessRequest class' logger.
@joshmoore joshmoore added this to the 5.4.2 milestone Jan 15, 2018
@joshmoore
Copy link
Member Author

History of the PRs included here:

0fabfb0e36 (origin/next_infra) Merge pull request #5595 from sbesson/omero_marshal_0.5.2 (19 hours ago) <Josh Moore>
2b7b7fe03e Merge pull request #5610 from mtbc/fix-loglevel (25 hours ago) <Josh Moore>
1c9a8d97d1 Merge pull request #5607 from mtbc/import-target (25 hours ago) <Josh Moore>
622b27da71 Merge pull request #5608 from mtbc/extend-email-timeout (4 days ago) <Josh Moore>
077384b7e4 Merge pull request #5538 from mtbc/log-cmd (6 weeks ago) <Josh Moore>
8b8be4ea7d (origin/clisplit) Merge pull request #5585 from joshmoore/test_omero_setup (7 weeks ago) <Josh Moore>
3a9dedaef1 Merge pull request #5490 from dominikl/add_update_tables (8 weeks ago) <Josh Moore>
e4a1a63afa Merge pull request #5573 from jburel/test-scripts (8 weeks ago) <Josh Moore>
54d6f3bdb3 Merge pull request #5548 from jburel/test-cli (8 weeks ago) <Josh Moore>
48d5860ebc Merge pull request #5513 from dominikl/java_gateway_fixes (8 weeks ago) <Josh Moore>
b476a51f22 Merge pull request #5545 from jburel/gateway-methods (8 weeks ago) <Josh Moore>

@joshmoore joshmoore changed the title Merge next_infra branch into develop for 5.4.2 Re-integration next_infra into develop Jan 16, 2018
@joshmoore joshmoore changed the title Re-integration next_infra into develop Re-integrate next_infra into develop Jan 16, 2018
@@ -1220,7 +1234,9 @@ private void keepSessionAlive() throws DSOutOfServiceException {
c = i.next();
if (c.needsKeepAlive()) {
if (!c.keepSessionAlive()) {
throw new DSOutOfServiceException("Network not available");
// Session has died, e. g. due to server restart.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dominikl how does insight handle the fact that no error is thrown now?

Copy link
Member

@dominikl dominikl Jan 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should work as before (show connection warning and reconnect again, when possible), tested on the original PR #5513 (point 3).

As far as I remember the Exception was the problem, because this reconnect mechanism only worked for a stale network connection, but not when the server was restarted. In that case even when the server connection is back, keepSessionAlive fails, and the exception crashed Insight. With this change the stale connector is quietly removed and a new connector will be created.

@@ -392,6 +404,9 @@ public void setAdminPrivileges(SecurityContext ctx, ExperimenterData user,
public void addAdminPrivileges(SecurityContext ctx, ExperimenterData user,
Collection<String> privileges) throws DSOutOfServiceException,
DSAccessException {
if(!Pojos.hasID(user) || CollectionUtils.isEmpty(privileges))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space between if (

@@ -421,6 +436,8 @@ public void addAdminPrivileges(SecurityContext ctx, ExperimenterData user,
public void removeAdminPrivileges(SecurityContext ctx,
ExperimenterData user, Collection<String> privileges)
throws DSOutOfServiceException, DSAccessException {
if(!Pojos.hasID(user) || CollectionUtils.isEmpty(privileges))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@@ -108,23 +113,32 @@
}

/**
* Retrieves hierarchy trees rooted by a given node.
* i.e. the requested node as root and all of its descendants.
* Retrieves hierarchy trees rooted by a given node. i.e. the requested node
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra . before i.e.

@@ -83,6 +87,9 @@
*/
public ImageAcquisitionData getImageAcquisitionData(SecurityContext ctx,
long imageId) throws DSOutOfServiceException, DSAccessException {
if(imageId < 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space after if

@@ -225,6 +226,8 @@ void parseData(Data data, TableDataColumn[] header) {
for (int j = 0; j < nRows; j++) {
MaskData md = new MaskData(mc.x[j], mc.y[j], mc.w[j],
mc.h[j], mc.bytes[j]);
md.setZ(mc.theZ[j]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will theZ and theT always be filled?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect that both are always arrays of nRows size, but you're right, I guess the values could be -1 if z and t are not explicitly set. Which is actually a bug in ShapeData (getZ and getT should return 0 not -1 in that case). Follow-up PR maybe?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or does -1 for z/t mean "all" z/t ? As channel can also be -1.
The getters and setters in ShapeData are all inconsistent, e. g. if z is not set, getZ() will return -1, but if you setZ(-1) actually 0 is set!

I think I leave it as it is for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't modify in this PR
Changing the getter and setter should be done in another PR

if (toUpdate.rowNumbers.length != data.getData()[0].length)
throw new IllegalArgumentException("Row size is different!");

for (int c = 0; c < data.getColumns().length; c++) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same cols = data.getColumns()
and for data.getData()

@@ -276,5 +281,46 @@ public void testThreshold() throws Exception {
Assert.assertEquals(td.getData()[0].length,
TablesFacility.DEFAULT_MAX_ROWS_TO_FETCH);
}

@Test(dependsOnMethods = { "testThreshold" })
public void testUpdateTable() throws Exception {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cols= td.getColumns() same for data
since the various will have an effect on performance

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave @dominikl to respond, but I think these are all local invocations since it's omero.gateway.model.TableData and not omero.api.TablesPrx.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in that case no need to make changes
I got lost in the PR review

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, just accesses the columns array in the TableData object.


def _unregister_service(self, service_string):
"""
Called on close of a service.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call?

@@ -94,6 +104,9 @@ class ArgumentFixture(object):
"""
Used to test the user/group argument
"""
warnings.warn("Deprecated in 5.4.1."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

message should be 5.4.2 now

@joshmoore joshmoore mentioned this pull request Jan 16, 2018
@hflynn hflynn mentioned this pull request Jan 17, 2018
5 tasks
Without the exclusion, python files appear under
the OMERO scripts menu which lead to exceptions
("No params found").
@joshmoore
Copy link
Member Author

Based on today's greenedness, merging to prepare for release. This is a last call for objections to the API additions (*) noted in the description.

@joshmoore joshmoore merged commit 0901b07 into develop Jan 18, 2018
@joshmoore joshmoore deleted the next_infra branch January 31, 2018 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants