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

Test runner not working within recent release-3_22 docker image #50729

Closed
1 of 2 tasks
CodeBardian opened this issue Oct 28, 2022 · 9 comments
Closed
1 of 2 tasks

Test runner not working within recent release-3_22 docker image #50729

CodeBardian opened this issue Oct 28, 2022 · 9 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS Feedback Waiting on the submitter for answers

Comments

@CodeBardian
Copy link
Contributor

CodeBardian commented Oct 28, 2022

EDIT:
all recent docker images of the 3.22 branch are useless because the QGIS executable is not present. This is due to failing build when creating docker images. See my latest comments on this thread for details. The issue description below can be ignored, it will probably fix itself once the build is working again.

What is the bug or the crash?

I am using the qgis_testrunner.sh script to run some unit tests for a QGIS-Plugin, which always worked fine. However, since today something is off within the release-3_22 container.

The test runner always returns with ERROR: no output from the test runner! (exit code: 0)

The previous release-3_22 image with digest sha256:a05df35259317e3457d4cdc73f0aabf0623f1e7a8257c56bff10b041ded3dce3 which was the latest available until yesterday runs fine.

I put a minimal sample within the following repository where I ran the test runner script within GitHub Actions: https://github.com/CodeBardian/qgis-docker-test

You can see in the Actions tab that the exact same test passes on almost all of the other containers: https://github.com/CodeBardian/qgis-docker-test/actions/runs/3344611088. The first failing one is introduced with final-3_22_10.

Appreciate if anyone has some insights on this issue.

Steps to reproduce the issue

  1. docker pull qgis/qgis:release-3_22
  2. docker run -d --name qgis22 -e DISPLAY=:99 qgis/qgis:release-3_22
  3. docker start qgis22
  4. docker exec -it qgis22 sh -c "qgis_testrunner.sh"

output:

~$ docker exec -it qgis22 sh -c "qgis_testrunner.sh"
ERROR: no output from the test runner! (exit code: 0)

expected (result from previous image):

~$ docker exec -it qgis sh -c "qgis_testrunner.sh"
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
....

Versions

3.22

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@CodeBardian CodeBardian added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Oct 28, 2022
@nicogodet
Copy link
Member

Same regression with 3.26 and/or 3.28 ?

@CodeBardian
Copy link
Contributor Author

No, neither on 3.24/3.26/3.28 nor on master. Only on the 3.22 branch.

The release-3_22 image has this problem since the recent push here or maybe this one.

I also noticed that on the final-3_22_* series of images, it first fails with final-3_22_10 (which i believe was pushed to docker here). final-3_22_9 and lower was fine as seen below:

grafik

@CodeBardian
Copy link
Contributor Author

I started to further investigate on this issue.

It turns out that within the release-3_22 the qgis executable is not present!

qgis_testrunner.sh calls this and therefore of course cannot work. Notice the difference in the following comparison.

This is on 3.22 container, the failing one:

~$ docker exec -it qgis22 sh -c "which qgis"
~$ docker exec -it qgis22 sh -c "cd /usr/bin/ && ls -al qgis*"
-rwxr-xr-x 1 root root 1986 Oct 29 00:04 qgis_setup.sh
-rwxr-xr-x 1 root root  695 Oct 29 00:04 qgis_startup.py
-rwxr-xr-x 1 root root 5951 Oct 29 00:04 qgis_testrunner.py
-rwxr-xr-x 1 root root 1430 Oct 29 00:04 qgis_testrunner.sh

This is the output on one of the working images:

~$ docker exec -it qgis26 sh -c "which qgis"
/usr/bin/qgis
~$ docker exec -it qgis26 sh -c "cd /usr/bin/ && ls -al qgis*"
-rwxr-xr-x 1 root root 433136 Aug 11 03:31 qgis
-rwxr-xr-x 1 root root 333240 Aug 11 03:31 qgis_mapserv.fcgi
-rwxr-xr-x 1 root root 397472 Aug 11 03:31 qgis_mapserver
-rwxr-xr-x 1 root root 283216 Aug 11 03:35 qgis_process
-rwxr-xr-x 1 root root   1986 Aug 11 00:04 qgis_setup.sh
-rwxr-xr-x 1 root root    695 Aug 11 00:04 qgis_startup.py
-rwxr-xr-x 1 root root   5951 Aug 11 00:04 qgis_testrunner.py
-rwxr-xr-x 1 root root   1430 Aug 11 00:04 qgis_testrunner.sh

@CodeBardian
Copy link
Contributor Author

CodeBardian commented Oct 29, 2022

It seems to me that the build process does not fully succeed, but the image still gets pushed to docker hub.

The build exit value is FAILED within the release-3_22 image

~$ docker exec -it qgis22 sh -c "cd /QGIS && cat build_exit_value"
FAILED

vs. on working images

~$ docker exec -it qgis26 sh -c "cd /QGIS && cat build_exit_value"
OK

This should get picked up by the following lines in the workflow:

if [[ $(cat ./build_exit_value) != "OK" ]]; then
echo "Build failed, not pushing image"
exit 1
fi

I don't quite understand why that does not work

@nicogodet nicogodet added the Build/Install Related to compiling or installing QGIS label Oct 30, 2022
Rikuoja added a commit to GispoCoding/school-catchment-plugin that referenced this issue Oct 31, 2022
@CodeBardian
Copy link
Contributor Author

after searching through the action logs it seems to me that Linking CXX shared library output/lib/libqgis_3d is the step in the build process that always fails with following error, e.g. here

/usr/bin/ld: src/3d/CMakeFiles/qgis_3d.dir/qgswindow3dengine.cpp.o: in function `QgsWindow3DEngine::QgsWindow3DEngine(QObject*)':
qgswindow3dengine.cpp:(.text+0x9a): undefined reference to `Qt3DExtras::Qt3DWindow::Qt3DWindow(QScreen*)'
collect2: error: ld returned 1 exit status

This happens in the Finalize image step of the workflow where there is no guarding check against failing build.

Unfortunately I don't understand much about compiling C++ and the internals of QGIS docker builds but
@3nids could it be that PR #50285 was supposed to fix that?
Maybe it should be backported to release-3_22 branch?

@perevertysh
Copy link

perevertysh commented Nov 2, 2022

Same problem on qgis from docker image deployment. It seems image is badly formed or some ref libs not respond correctly

@nicogodet
Copy link
Member

@CodeBardian Backport PR has been opened #50850

Could you check after it has been merged and update this issue ?

@nicogodet
Copy link
Member

Setting feedback label as PRs have been merged.

@nicogodet nicogodet added the Feedback Waiting on the submitter for answers label Nov 19, 2022
@CodeBardian
Copy link
Contributor Author

Everything working again 🚀

LKajan added a commit to nlsfi/segment-reshape-qgis-plugin that referenced this issue Mar 6, 2023
qgis/QGIS#50729 is now fixed. So tests should
work without this deticated requirements.txt.
LKajan added a commit to nlsfi/segment-reshape-qgis-plugin that referenced this issue Mar 6, 2023
qgis/QGIS#50729 is now fixed. So tests should
work without this deticated requirements.txt.
LKajan added a commit to nlsfi/segment-reshape-qgis-plugin that referenced this issue Mar 13, 2023
qgis/QGIS#50729 is now fixed. So tests should
work without this deticated requirements.txt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS Feedback Waiting on the submitter for answers
Projects
None yet
Development

No branches or pull requests

3 participants