-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fix breaking change: _marshal_images() handles missing archived flag #575
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least from a code review perspective, the proposed change should provide a layer of compatibility for any downstream code using the signature of omeroweb.client.tree._marshal_images
prior to OMERO.web 5.26.0. Functional testing should ensure that the archived
status of the image is still properly exposed as this was the primary motivation of #555.
From a communication perspective, I would be mindful with the usage of breaking
. At least I use this terminology as defined in https://semver.org/ i.e. in the sense of backward incompatible changes made to the public API.
In the case of this change:
- the reference documentation classifies the entire webclient module as non-public API - see note at https://omero.readthedocs.io/en/stable/developers/Web/Webclient.html
- the method itself starts with an underscore, indicating a weak internal use as per https://peps.python.org/pep-0008/
In that sense, there is probably a wider question about why these applications are using this internal method of a private API in the first place and whether there would be some proper public API (e.g. the marshalled object returned for api/v0
that could be proposed as a suitable replacement.
In the case of mapr, this is using the JSON response to populate the jsTree, which is also using JS code from the webclient's jsTree, so it makes sense to use the same python function to marshal the data. |
Agreed that this makes sense and avoids the client having to implement the same method again, but we should then at least promote the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deprecation warning should explicitly state how to fix the deprecated usage, e.g. "row argument now requires additional 'archived' entry at index 1"
This is at best unfortunate and when I made the original changes I made them the way I did because they were in webclient and the functions were underscore prefixed. These changes certainly cannot go in without expanding the test cases that were adjusted to handle #555. While I'd be one of the first to say "breaking a downstream plugin is always a bug" fixing it like this feels really uncomfortable. My first thought is to revert #555 entirely and approach things differently if we're going to start saying things in the |
Closing in favour of #577 |
The change at https://github.com/ome/omero-web/pull/555/files#diff-dfcabd11e666e142b223e6aee67714ee9badf6ecdcaa5ceec24b7805e3d49520R553
has caused apps that use this to break:
This fix handles the missing
archived
flag (where row has 5 items) and defaults it to false.To test:
Propose to release this fix ASAP (as 5.27.1)?