ome / omero-mapr

An OMERO.web app allowing to browse the data through attributes linked to the image
https://pypi.org/project/omero-mapr/
GNU Affero General Public License v3.0
5 stars 12 forks source link

Infra 030 #31

Closed joshmoore closed 6 years ago

joshmoore commented 6 years ago

Upgrades to keep mapr testing green and make the omero-test-infra more usable.

cc: @jburel @will-moore

will-moore commented 6 years ago

Checked this branch out locally...

rm -rf .omero
git clone -b integration git://github.com/joshmoore/omero-test-infra .omero
.omero/docker app
...

============================= test session starts ==============================
platform linux2 -- Python 2.7.5, pytest-3.3.2, py-1.5.2, pluggy-0.6.0 -- /opt/omero/web/venv/bin/python
cachedir: .cache
rootdir: /omero-mapr, inifile: setup.cfg
plugins: django-3.1.2
collecting ... collected 40 items

tests/integration/test_config.py::TestMaprConfig::test_settings ERROR    [  2%]
tests/integration/test_config.py::TestMaprConfig::test_empty_settings ERROR [  5%]
tests/integration/test_config.py::TestMaprConfig::test_bad_settings[foo] ERROR [  7%]

tests/unittests/test_version.py::TestUtil::test_version[version4] PASSED [ 95%]
tests/unittests/test_version.py::TestUtil::test_version[version5] PASSED [ 97%]
tests/unittests/test_version.py::TestUtil::test_version[version6] PASSED [100%]

==================================== ERRORS ====================================
________________ ERROR at setup of TestMaprConfig.test_settings ________________

I see lots of

>       super(IWebTest, cls).setup_class()
>           raise Exception("Could not initiate a root connection")

CannotCreateSessionException: exception ::Glacier2::CannotCreateSessionException
{
    reason = Server not fully initialized
}
joshmoore commented 6 years ago

Thanks for testing, @will-moore. The only thing I can think of off-hand is that your laptop needs more than the 30 seconds for the sever to startup. Can you try export SLEEP_TIME=60 (or 120) and try again?

will-moore commented 6 years ago

In fact the problem turned out to be

$ docker ps -a
CONTAINER ID        IMAGE                                     COMMAND                  CREATED             STATUS              PORTS                                              NAMES
d2f003a3e65b        openmicroscopy/omero-web-standalone:5.4   "/usr/local/bin/en..."   25 minutes ago      Up 25 minutes       0.0.0.0:32768->4080/tcp                            omeromapr_web_1
a291f7781ff4        openmicroscopy/omero-server:5.4           "/usr/local/bin/en..."   25 minutes ago      Up 25 minutes       0.0.0.0:32770->4063/tcp, 0.0.0.0:32769->4064/tcp   omeromapr_omero_1
8aa450053794        postgres:9.6                              "docker-entrypoint..."   25 minutes ago      Up 25 minutes       5432/tcp                                           omeromapr_db_1
980a4f7e0645        postgres:9.6                              "docker-entrypoint..."   26 minutes ago      Up 26 minutes       5432/tcp                                           omero_db_1
25cb05e8b415        openmicroscopy/omero-server:5.4           "/usr/local/bin/en..."   26 minutes ago      Up 26 minutes       0.0.0.0:4063-4064->4063-4064/tcp                   omero_omero_1
ad26c2181df4        openmicroscopy/omero-web-standalone:5.4   "/usr/local/bin/en..."   26 minutes ago      Up 26 minutes       0.0.0.0:4080->4080/tcp                             omero_web_1

Killed them all and ran again...

==================== 39 passed, 1 xpassed in 22.70 seconds =====================
joshmoore commented 6 years ago

Nice. Yes. Periodically running .omero/compose down is worthwhile. (Currently debating whether or not that should be the default.)

will-moore commented 6 years ago

Ah, thats a bit quicker than 3 x docker stop and 3 x docker rm! However, the only reason I was running these test was to try and see how mapr is creating map annotations so that it "works", since I was having no luck manually: https://trello.com/c/2bBx96kX/23-mapr-installation#comment-5a8316bba48c48a843a2b840 Is it possible to point my host browser at omeromapr_web_1 after running the tests to see what it's created? Otherwise I'll try digging into the code...

joshmoore commented 6 years ago

Ah, thats a bit quicker than 3 x docker stop and 3 x docker rm!

Indeed! Additionally, .omero/compose has the logic for choosing between various difference composes (based on the name of the directory that it's running in)

Is it possible to point my host browser at omeromapr_web_1 after running the tests to see what it's created?

Yes. If you haven't run down yet, then the server & web should still be running. Check docker ps for the port. (Or you can hard-code them via the variables in .omero/.env)

will-moore commented 6 years ago

OK, cool. http://0.0.0.0:32774/webclient/ works fine, but strangely http://0.0.0.0:32774/mapr/ is 404?!

joshmoore commented 6 years ago

I'm running into the same issue; on OMERO 5.3 as well. Not sure if I need to try the IDR branch or if there's something simpler going on with the config.

joshmoore commented 6 years ago

:+1: for gh-32. While testing that with this PR, I realized that part of my problem was that OMERO.web was not being restarted (again, :+1: for the README). However, I'm still getting The requested object or URL was not found on this server. for curl -L http://localhost:33087/mapr/api/...

joshmoore commented 6 years ago

==================== 39 passed, 1 xpassed in 30.73 seconds =====================

jburel commented 6 years ago

The version of the dependencies matches the one used in https://github.com/openmicroscopy/omero-test-infra/pull/8

jburel commented 6 years ago

tests are passing and everything is green merging