linz / gazetteer

New Zealand Gazetteer of official place names
http://www.linz.govt.nz/regulatory/place-names/find-name/new-zealand-gazetteer-official-geographic-names/new-zealand-gazetteer-search-place-names#zoom=0&lat=-41.14127&lon=172.5&layers=BTTT
Other
2 stars 2 forks source link

Use the QGIS docker image provided testrunner (monkey-patching it) #109

Closed strk closed 4 years ago

strk commented 4 years ago

Can't stand the /dev/tty issue

strk commented 4 years ago

@SPlanzer it looks like the monkey-patch solution works, waiting for https://github.com/qgis/QGIS/issues/36187 to be fixed upstream...

SPlanzer commented 4 years ago

Great CI is passing without the second test rest_runner but this does not see the python unit tests reported in the github action terminal

e.g.


Run make docker-qgis-test
docker-compose up -d
gazetteer_db_1 is up-to-date
gazetteer_qgis_1 is up-to-date
docker-compose exec -T qgis sh -c "/usr/bin/xvfb-run -- /scripts/testrunner.sh tests_directory.run_tests.run_test_modules"
Running test tests_directory.run_tests.run_test_modules ...
Warning: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QGIS Test Runner Inside - starting the tests ...
QGIS Test Runner - Trying to import tests_directory.run_tests.run_test_modules
QGIS Test Runner - Trying to import tests_directory.run_tests
QGIS Test Runner Inside - executing function <function run_test_modules at 0x7f0b0337f7b8>
test_metadata (test_metadata.TestMetadata) ... ok
test_click_search (test_ui.TestUi) ... ok
test_click_tab_text (test_ui.TestUi) ... ok
test_editordockwidget_is_docked (test_ui.TestUi) ... ok
test_layers_load_on_start (test_ui.TestUi) ... ok
test_tools_disabled_on_start (test_ui.TestUi) ... ok
test_tools_enabled_on_start (test_ui.TestUi) ... ok

----------------------------------------------------------------------
Ran 7 tests in 1.153s

OK
Finished running test tests_directory.run_tests.run_test_modules (codes: IS_DEAD=1 IS_FAILED=1 IS_PASSED=0).
strk commented 4 years ago

Thanks for testing @SPlanzer, I've now force-pushed an amended commit fixing that problem

Gustry commented 4 years ago

@strk Does this work nicely?

Now that the PR in QGIS is merged, do you still need this PR? Can't you use the new docker image generated?

strk commented 4 years ago

@Gustry it has to be checked, if new QGIS images have been updated we should be fine.

Gustry commented 4 years ago

I'm not an expert on TTY etc, but I tried and it didn't work. Can you let me know? I will investigate more soon.

strk commented 4 years ago

We have to figure out which docker tag contains the upstream fix

strk commented 4 years ago

I'm testing it, 3.10.7 should have the fix

strk commented 4 years ago

Ok, 3.10.6 tag is still not available, see: https://hub.docker.com/r/qgis/qgis/tags

We'll have to wait for upstream to publish a new image

Gustry commented 4 years ago

@strk https://github.com/qgis/QGIS/pull/36189 has been merged on master. So https://hub.docker.com/layers/qgis/qgis/latest/images/sha256-3f0ba39b9f130fde1b18b8b3e259f5faa8c3feb2b67d9d95d348ca875691e2cc?context=explore should be ok, no?

strk commented 4 years ago

Yes, "latest" would be good, but "latest" is a moving target and we'd prefer (for stability) to have a stable one (a final tag). Also we want to be sure about the actual version we're using, I think.

We can, however, take the base image tag as a parameter, to experiment various tags, would you be willing to send a PR in that direction ?

Gustry commented 4 years ago

Yes, "latest" would be good, but "latest" is a moving target and we'd prefer (for stability) to have a stable one (a final tag).

Yes I understand, it make sense to keep a known version of course.

We can, however, take the base image tag as a parameter, to experiment various tags, would you be willing to send a PR in that direction ?

I already gave it a try on my side, but it was unsuccessful for now. That's why I wanted to know if you had a look.

With doing a test matrix with a parameter, you could do a PR against your repo to try the qgis:latest image to check if your patch in upstream was working for you.

strk commented 4 years ago

Yes, see #133 for a PR

Gustry commented 4 years ago

@strk Have you got some progress by just trying in a PR, before 3.14 is out to try the latest tag?

strk commented 4 years ago

@Gustry no, I did not test, but you can now do easily, as https://github.com/linz/gazetteer/pull/133 was merged. Can you give it a try while I'm on a low-bandwidth network ?