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

Use QJazz in tests #5168

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Use QJazz in tests #5168

wants to merge 1 commit into from

Conversation

dmarteau
Copy link
Member

@dmarteau dmarteau commented Jan 8, 2025

QJazz QGIS server in tests.

@dmarteau dmarteau requested a review from Gustry January 8, 2025 15:59
@github-actions github-actions bot added this to the 3.10.0 milestone Jan 8, 2025
@Gustry Gustry added QGIS Server tests unit tests and docker configuration for tests run end2end If the PR must run end2end tests or not backport release_3_8 backport release_3_9 labels Jan 8, 2025
Copy link
Member

@Gustry Gustry left a comment

Choose a reason for hiding this comment

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

I tried it locally, it works.
Still an issue on CI for now.

Will tags such as 3.34, 3.40 will be available on Docker hubs later ?

tests/Makefile Outdated Show resolved Hide resolved
tests/docker-conf/qgis-server.toml Outdated Show resolved Hide resolved
@dmarteau dmarteau force-pushed the qjazz-test branch 2 times, most recently from 23d1e4b to ca13211 Compare January 13, 2025 12:40
Copy link
Member

@Gustry Gustry left a comment

Choose a reason for hiding this comment

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

  • Needed QGIS Server plugins are not installed in the current state of this PR. That's why the CI is not working. It was working locally, because my plugins were already existing before.
  • Can you remove the script tests/add_server_plugins.sh ?
  • In tests/add_server_plugins.sh, we need to use to the custom repository for QGIS plugins. Please do the change
  • Will tags such as 3.34, 3.40 will be available on Docker hubs ? https://hub.docker.com/r/3liz/qjazz/tags

@Gustry
Copy link
Member

Gustry commented Jan 13, 2025

Is-it not missing the mount for QGIS plugins in map container ? But it doesn't seem to be enough to have QGIS server plugins installed, even when rebuilding/starting containers.

@Gustry
Copy link
Member

Gustry commented Jan 13, 2025

For testing purpose, I have pressed the rebased button, to have latest commits from master.

@Gustry Gustry added run end2end If the PR must run end2end tests or not and removed run end2end If the PR must run end2end tests or not labels Jan 13, 2025
@dmarteau
Copy link
Member Author

dmarteau commented Jan 13, 2025

Is-it not missing the mount for QGIS plugins in map container ? But it doesn't seem to be enough to have QGIS server plugins installed, even when rebuilding/starting containers.

Rules for plugins are the following:

  1. Plugins locations should be mounted somewhere and declared in config (or QGIS_PLUGINPATH).
  2. Wether or not plugin are installed at startup depends on configuration settings ('auto' vs 'external').
  3. Allowed plugins must be explicitely declared in configuration settings (see tests/docker-conf/qgis-server.toml)

@dmarteau
Copy link
Member Author

  • Will tags such as 3.34, 3.40 will be available on Docker hubs ?

On release.

@Gustry Gustry force-pushed the qjazz-test branch 2 times, most recently from 00fba5e to 42aefa7 Compare January 13, 2025 17:00
@dmarteau
Copy link
Member Author

There is tests checking OnlineResource: they seems to be wrong to me.

The qjazz proxy handle standard Forwarded headers as defined in RFC 7239 and legacy X-Forwarded-Host and X-Forwarded-Proto.

The path returned in the service response may be changed with the appropriate X-Qgis-Service-Url header (See the documentation for the QGIS_SERVER_SERVICE_URL environment variable.

@dmarteau
Copy link
Member Author

dmarteau commented Jan 13, 2025

Found that QGIS does not stick to standard and handle headers in case sensitive way, at least for 'X-Qgis-*' headers.

@dmarteau
Copy link
Member Author

I cannot check what's wrong on failed test, i need at least the request that failed if this is is a request to the QGIS service.

@dmarteau
Copy link
Member Author

@Gustry : please check the timeout error on Playwright test, with proper rights there is no issue locally with the url I can guess from the details.

@Gustry Gustry force-pushed the qjazz-test branch 4 times, most recently from 4bbaab3 to 51d7be8 Compare January 15, 2025 10:01
@Gustry
Copy link
Member

Gustry commented Jan 15, 2025

Something is very slow in this PR.
At the end of the CI, there will be some artifacts generated : https://github.com/3liz/lizmap-web-client/actions/runs/12785872522?pr=5168, especially all QGIS servers logs, from the container lizmapBRANCH_test_qgis.
Should we also save logs from lizmapBRANCH_test_qgis_rpc container ?

Copy link
Member

@Gustry Gustry left a comment

Choose a reason for hiding this comment

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

Is-it a typo ?

tests/docker-compose.yml Outdated Show resolved Hide resolved
@dmarteau
Copy link
Member Author

Something is very slow in this PR. At the end of the CI, there will be some artifacts generated : https://github.com/3liz/lizmap-web-client/actions/runs/12785872522?pr=5168, especially all QGIS servers logs, from the container lizmapBRANCH_test_qgis. Should we also save logs from lizmapBRANCH_test_qgis_rpc container ?

Yes, this where we log QGIS opérations.

@dmarteau
Copy link
Member Author

Where can I find logs related to failed tests ?

@Gustry
Copy link
Member

Gustry commented Jan 16, 2025

Can you rebase on top of master, I have merged #5203

All logs are in the artifacts, for example, for the last run, after 194 minutes :(, artifacts are on the page summary https://github.com/3liz/lizmap-web-client/actions/runs/12785872522?pr=5168 at the bottom, direct link to ZIP :

https://github.com/3liz/lizmap-web-client/actions/runs/12785872522/artifacts/2434513285

The timestamp in the QGIS Server logs are very slow.

Yes, this where we log QGIS opérations.

So can you add in your PR .github/workflows/e2e_tests.yml L220:

docker logs lizmap${{ env.LZMBRANCH }}_test_qgis_rpc &> /tmp/e2e/docker/qgis-server-rpc.log | true

@dmarteau
Copy link
Member Author

So can you add in your PR .github/workflows/e2e_tests.yml L220:

docker logs lizmap${{ env.LZMBRANCH }}_test_qgis_rpc &> /tmp/e2e/docker/qgis-server-rpc.log | true

I don't understand where I should exacty set this line: shouldn't it be in a job ? It seems wrong to me jush to add the line add the end of the file.

@dmarteau dmarteau force-pushed the qjazz-test branch 4 times, most recently from c45838c to 48706f2 Compare January 17, 2025 00:13
Copy link
Member

@Gustry Gustry left a comment

Choose a reason for hiding this comment

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

Thanks, tests are finally passing.
Last thing to change is the plugin repository to change.

Will tags such as 3.34, 3.40 will be available on Docker hubs ? https://hub.docker.com/r/3liz/qjazz/tags

So you mean when a git tag will be made on qjazz repository, it will be available on docker hub ?

tests/add_server_plugins.sh Show resolved Hide resolved
tests/docker-compose.yml Outdated Show resolved Hide resolved
@Gustry
Copy link
Member

Gustry commented Jan 17, 2025

@dmarteau Discussion we got with @rldhont and @mdouchin :

Do you think it's possible to add your work in another docker-compose file ? with inheritance ?
We would need to keep the tests/add_server_plugins.sh, make a copy of tests/docker-conf/phpfpm/lizmapConfig.ini.php and would be nearly able to run both stacks Py-QGIS-Server and QJazz ?

@dmarteau
Copy link
Member Author

Do you think it's possible to add your work in another docker-compose file ? with inheritance ? We would need to keep the tests/add_server_plugins.sh, make a copy of tests/docker-conf/phpfpm/lizmapConfig.ini.php and would be nearly able to run both stacks Py-QGIS-Server and QJazz ?

I don't see the benefit unless making things uneccessary complicated. Just keep that
branch to draft and sync with master until we officially move to QJazz as stable backend since the backend for the LWC tests has only to be an acceptable OWS/QGIS server proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QGIS Server run end2end If the PR must run end2end tests or not tests unit tests and docker configuration for tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants