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

Add X-Request-Id in request to QGIS Server headers #5185

Merged
merged 6 commits into from
Jan 16, 2025

Conversation

rldhont
Copy link
Collaborator

@rldhont rldhont commented Jan 13, 2025

X-Request-Id correlates HTTP requests between a client and server. It will help to correlate logs between Lizmap Web client and QGIS Server. X-Request-Id is supported by Py-QGIS-Server.

@rldhont
Copy link
Collaborator Author

rldhont commented Jan 15, 2025

Wait for #5206

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.

Nice addition

@dmarteau
Copy link
Member

Note: Py-qgis-server for now, does not take into account x-requesti-id but qjazz does. Nevertheless, this is a good idea to set it in all cases.

@rldhont rldhont merged commit fe6dfdf into 3liz:master Jan 16, 2025
16 checks passed
@3liz-bot
Copy link
Contributor

The backport to release_3_7 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 2ada8d118... Response headers: use it in OGCRequest
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging lizmap/modules/lizmap/lib/Request/Proxy.php
[backport-5185-to-release_3_7 c8b7e8d2a] Add X-Request-Id in request to QGIS Server headers
 Author: rldhont <[email protected]>
 Date: Fri Jan 10 13:52:20 2025 +0100
 1 file changed, 1 insertion(+)
Auto-merging lizmap/modules/lizmap/lib/Request/Proxy.php
[backport-5185-to-release_3_7 d2b30e634] logRequestIfError: use X-Request-Id if available
 Author: rldhont <[email protected]>
 Date: Mon Jan 13 10:42:59 2025 +0100
 1 file changed, 18 insertions(+), 5 deletions(-)
Auto-merging lizmap/modules/lizmap/lib/Request/Proxy.php
[backport-5185-to-release_3_7 5c7e9bc82] Response headers : curl and file
 Author: rldhont <[email protected]>
 Date: Mon Jan 13 10:18:42 2025 +0100
 1 file changed, 47 insertions(+), 15 deletions(-)
Auto-merging lizmap/modules/lizmap/lib/Request/Proxy.php
[backport-5185-to-release_3_7 a6493fe81] Response headers from stream to log X-Request-Id
 Author: rldhont <[email protected]>
 Date: Mon Jan 13 12:23:37 2025 +0100
 1 file changed, 1 insertion(+), 1 deletion(-)
[backport-5185-to-release_3_7 bb0539839] Tests: Update Proxy test about buildHeaders
 Author: rldhont <[email protected]>
 Date: Mon Jan 13 15:32:42 2025 +0100
 1 file changed, 5 insertions(+), 1 deletion(-)
Auto-merging lizmap/modules/lizmap/lib/Request/Proxy.php
Auto-merging tests/end2end/cypress/integration/requests-wfs-ghaction.js
CONFLICT (content): Merge conflict in tests/end2end/cypress/integration/requests-wfs-ghaction.js

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release_3_7 release_3_7
# Navigate to the new working tree
cd .worktrees/backport-release_3_7
# Create a new branch
git switch --create backport-5185-to-release_3_7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 650911ae4b2ce64d7019105b87d8d12ff4fa8444,7bf80e06715d822a0e24ef078988d5fba4f3e5a1,61871ce01832ff42a824a0fccaf61bbf97588037,eff786c0aba343ad5b175faa3461bec35e001111,148b8dc801b22e5fd042ba1c67dd5b7124a47817,2ada8d1185bc75348d2e8c12088df3b4a77c4d34
# Push it to GitHub
git push --set-upstream origin backport-5185-to-release_3_7
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release_3_7

Then, create a pull request where the base branch is release_3_7 and the compare/head branch is backport-5185-to-release_3_7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_3_8 backport release_3_9 failed backport php Pull requests that update Php code QGIS Server run end2end If the PR must run end2end tests or not
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants