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-include xalan as a dependency of the image-region micro-service #147

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

sbesson
Copy link
Member

@sbesson sbesson commented May 28, 2024

This library is required for upgrading older version of the OME-XML schema (currently at 2016-06) using the XSLT transformation sheets in the memo regeneration utility.
Without it, the XML transformation will fail and the reader stack will typically fallback to the generic TIFF reader causing metadata mismatch when reading planes/series greater than zero.

This can be tested by importing a multidimensional multi-file OME-TIFF created with an old version of the OME data model e.g. https://downloads.openmicroscopy.org/images/OME-TIFF/2013-06/tubhiswt-4D/ and regenerating the memo file using the utility shipped with the micro-service. With the current version of the micro-service, the memo file will be generated using the standard TIFF reader and any rendering call on a plane other than the first one should result in an Error instantiating pixel buffer due to an underlying java.lang.IllegalArgumentException.
With this PR included, the rendering calls should work as expected for all planes

This library is required for upgrading older version of the OME-XML
schema (currently at 2016-06) using the XSLT transformation sheets
in the memo regeneration utility.
Without it, the XML transformation will fail and the reader stack
will typically fallback to the generic TIFF reader causing metadata
mismatch when reading planes/series greater than zero.
Copy link
Member

@melissalinkert melissalinkert left a comment

Choose a reason for hiding this comment

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

👍 We might want to evaluate other places where this dependency is excluded too (e.g. https://github.com/search?q=org%3Aglencoesoftware+%22exclude+group%3A+%27xalan%27%22&type=code)

As discussed separately with @sbesson, a potential follow-up is to warn in the memo regenerator if the regenerated memo's reader does not match the DB reader (and/or the previous memo's reader), as that could have helped to catch this issue sooner.

Copy link
Member

@chris-allan chris-allan left a comment

Choose a reason for hiding this comment

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

Throw a quick unit test in to make sure that the requisite classes are on the classpath?

@chris-allan
Copy link
Member

Do we need to initialize everything and run what is essentially an integration test to check if Xalan is on the classpath?

@sbesson
Copy link
Member Author

sbesson commented Jun 6, 2024

576cfdc should include a first unit test for the MemoRegenerator class which uses the tubishwt-2D as a representative example.

Running the tests on top of the current HEAD of the micro-service should fail with an java.lang.AssertionError: expected:<2> but was:<1> due to the missing xalan library.
With the library re-included the test should pass and help to catch future regressions

@sbesson
Copy link
Member Author

sbesson commented Jun 6, 2024

Do we need to initialize everything and run what is essentially an integration test to check if Xalan is on the classpath?

Definitely not necessary. In the spirit of keeping the changes minimal, I force pushed the TIFFs and added a test which should throw a ClassNotFoundException is xalan is not on the runtime classpath.

@chris-allan
Copy link
Member

Do we need to initialize everything and run what is essentially an integration test to check if Xalan is on the classpath?

Definitely not necessary. Last commit should keep the tests minimal for now and throw a ClassNotFoundException is xalan is not on the runtime classpath.

👍 Let's loose the TIFFs from 576cfdc then? Maybe just force push it away?

@sbesson sbesson requested a review from chris-allan June 6, 2024 11:29
@chris-allan chris-allan merged commit 97209b6 into glencoesoftware:master Jun 6, 2024
3 checks passed
@sbesson sbesson deleted the xalan_include branch January 26, 2025 08:47
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.

3 participants