nginx: enable test for http.endpoint tag#5687
Conversation
|
|
7c9498c to
68ecff1
Compare
|
| def test_http_endpoint_edge_cases(self): | ||
| """Test that edge cases are handled correctly""" | ||
| assert get_endpoint_tag(self.r_long_path) == "/resource_renaming/a/b/c/d/e/f/g" | ||
| assert get_endpoint_tag(self.r_long_path) in ("/resource_renaming/a/b/c/d/e/f/g", "/resource_renaming/a/b/c/d/e/f/g/") |
There was a problem hiding this comment.
RFC-1051 is ambiguous on whether truncated paths should have a trailing slash.
68ecff1 to
832fb7c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 832fb7cd05
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| try_files /hello.html =404; | ||
| } | ||
|
|
||
| location ~ ^/resource_renaming/ { |
There was a problem hiding this comment.
Add resource_renaming to the active nginx config
For the versions newly enabled in manifests/cpp_nginx.yml (v1.10.0+), utils/build/docker/cpp_nginx/install_ddtrace.sh symlinks /etc/nginx/nginx.conf to nginx.conf.waf whenever the module version is greater than v1.1.0; this added location is in the no-WAF config and is therefore not loaded. I checked nginx-waf.conf, and /resource_renaming/... still falls through to location / with try_files $uri =404, so the newly enabled cpp_nginx resource-renaming tests run without the intended endpoint handling and will keep failing/returning 404s. Please mirror this block in nginx-waf.conf or change the selected config.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
not strictly required for the tests to pass, since the RFC has no carve out for 404 responses, but advice followed
832fb7c to
8581125
Compare
8581125 to
dd4b1ac
Compare
|
Motivation
Enables the http.endpoint tag tests. See DataDog/nginx-datadog#267 and DataDog/dd-trace-cpp#260
Changes
Workflow
🚀 Once your PR is reviewed and the CI green, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
[<language>], double-check that only<language>is impacted by the changebuild-XXX-imagelabel is present