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

chore(wasm): testing Kong/ngx_wasm_module#546 #13102

Closed
wants to merge 5 commits into from

Conversation

flrgh
Copy link
Contributor

@flrgh flrgh commented May 28, 2024

Created to track testing of Kong/ngx_wasm_module#546

Do not merge me.

KAG-4671

@github-actions github-actions bot added core/proxy cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee core/wasm Everything relevant to [proxy-]wasm labels May 28, 2024
@flrgh flrgh force-pushed the chore/wasm-test-lua-bridge-refactor branch from 8115bf0 to 074a61f Compare May 28, 2024 18:32
@flrgh
Copy link
Contributor Author

flrgh commented May 28, 2024

Testing locally, my initial findings are there appears to be something going wrong with sending a response from a filter. This test and others like it are failing with a timeout as the client never receive a response.

In master I have the following error.log output for the test:

2024/05/28 11:34:47 [debug] 3286943#0: *2 [proxy-wasm] "tests" filter reusing instance (ictx: 000000000185D948, store: 000000000123BD28)
2024/05/28 11:34:47 [info] 3286943#0: *2 [proxy-wasm]["tests" #1] [proxy-wasm root] create_http_context (id: #1), client: 127.0.0.1, server: kong, request: "GET /single/status/200 HTTP/1.1", host: "0.0.0.0:9000", request_id: "b395de695a18a75825b491613c682167"
2024/05/28 11:34:47 [debug] 3286943#0: *2 [proxy-wasm]["tests" #1] filter 1/1 resuming "on_request_headers" step in "rewrite" phase
2024/05/28 11:34:47 [info] 3286943#0: *2 [proxy-wasm]["tests" #1] [proxy-wasm http] on_request_headers (5 headers, eof: false), client: 127.0.0.1, server: kong, request: "GET /single/status/200 HTTP/1.1", host: "0.0.0.0:9000", request_id: "b395de695a18a75825b491613c682167"
2024/05/28 11:34:47 [info] 3286943#0: *2 [proxy-wasm]["tests" #1] [proxy-wasm] testing in "RequestHeaders", client: 127.0.0.1, server: kong, request: "GET /single/status/200 HTTP/1.1", host: "0.0.0.0:9000", request_id: "b395de695a18a75825b491613c682167"
2024/05/28 11:34:47 [info] 3286943#0: *2 [proxy-wasm]["tests" #1] [proxy-wasm] kong.client.protocol: ""http"", client: 127.0.0.1, server: kong, request: "GET /single/status/200 HTTP/1.1", host: "0.0.0.0:9000", request_id: "b395de695a18a75825b491613c682167"
2024/05/28 11:34:47 [debug] 3286943#0: *2 [proxy-wasm] setting next action: pwctx->action = "DONE" (pwctx: 0000000005AED380)
2024/05/28 11:34:47 [debug] 3286943#0: *2 [proxy-wasm] setting next action: pwctx->action = "CONTINUE" (pwctx: 0000000005AED380)
2024/05/28 11:34:47 [debug] 3286943#0: *2 [proxy-wasm] resetting filter chain: pwctx->exec_index 0 to 0 (pwctx: 0000000005AED380)
2024/05/28 11:34:47 [debug] 3286943#0: *2 [proxy-wasm]["tests" #1] filter 1/1 resuming "on_response_headers" step in "header_filter" phase
2024/05/28 11:34:47 [info] 3286943#0: *2 [proxy-wasm]["tests" #1] [proxy-wasm http] on_response_headers (8 headers, eof: false), client: 127.0.0.1, server: kong, request: "GET /single/status/200 HTTP/1.1", host: "0.0.0.0:9000", request_id: "b395de695a18a75825b491613c682167"
2024/05/28 11:34:47 [debug] 3286943#0: *2 [proxy-wasm]["tests" #1] filter 1/1 resuming "on_response_body" step in "body_filter" phase
2024/05/28 11:34:47 [info] 3286943#0: *2 [proxy-wasm]["tests" #1] [proxy-wasm http] on_response_body (5 bytes, eof true), client: 127.0.0.1, server: kong, request: "GET /single/status/200 HTTP/1.1", host: "0.0.0.0:9000", request_id: "b395de695a18a75825b491613c682167"
2024/05/28 11:34:47 [debug] 3286943#0: *2 [proxy-wasm]["tests" #1] filter 1/1 resuming "on_log" step in "log" phase
2024/05/28 11:34:47 [info] 3286943#0: *2 [proxy-wasm]["tests" #1] [proxy-wasm http] on_log while logging request, client: 127.0.0.1, server: kong, request: "GET /single/status/200 HTTP/1.1", host: "0.0.0.0:9000", request_id: "b395de695a18a75825b491613c682167"
2024/05/28 11:34:47 [debug] 3286943#0: *2 [proxy-wasm]["tests" #1] filter 1/1 resuming "on_done" step in "done" phase
2024/05/28 11:34:47 [debug] 3286943#0: *2 [proxy-wasm]["tests" #1] filter 1/1 finalizing context
2024/05/28 11:34:47 [debug] 3286943#0: *2 [proxy-wasm] "tests" filter freeing context #1 (1/1)

Whereas in chore/wasm-test-lua-bridge-refactor we never seem to make it to the other phase handlers:

2024/05/28 11:37:07 [debug] 3317361#0: *2 [proxy-wasm] "tests" filter reusing instance (ictx: 000000000573C440, store: 0000000001038918)
2024/05/28 11:37:07 [info] 3317361#0: *2 [proxy-wasm]["tests" #1] [proxy-wasm root] create_http_context (id: #1), client: 127.0.0.1, server: kong, request: "GET /single/status/200 HTTP/1.1", host: "0.0.0.0:9000", request_id: "fdf27806b2ce595919ad0177a46c7c12"
2024/05/28 11:37:07 [debug] 3317361#0: *2 [proxy-wasm]["tests" #1] filter 1/1 resuming "on_request_headers" step in "access" phase
2024/05/28 11:37:07 [info] 3317361#0: *2 [proxy-wasm]["tests" #1] [proxy-wasm http] on_request_headers (5 headers, eof: false), client: 127.0.0.1, server: kong, request: "GET /single/status/200 HTTP/1.1", host: "0.0.0.0:9000", request_id: "fdf27806b2ce595919ad0177a46c7c12"
2024/05/28 11:37:07 [info] 3317361#0: *2 [proxy-wasm]["tests" #1] [proxy-wasm] testing in "RequestHeaders", client: 127.0.0.1, server: kong, request: "GET /single/status/200 HTTP/1.1", host: "0.0.0.0:9000", request_id: "fdf27806b2ce595919ad0177a46c7c12"
2024/05/28 11:37:07 [info] 3317361#0: *2 [proxy-wasm]["tests" #1] [proxy-wasm] kong.client.protocol: ""http"", client: 127.0.0.1, server: kong, request: "GET /single/status/200 HTTP/1.1", host: "0.0.0.0:9000", request_id: "fdf27806b2ce595919ad0177a46c7c12"
2024/05/28 11:37:07 [debug] 3317361#0: *2 [proxy-wasm] setting next action: pwctx->action = "DONE" (pwctx: 00000000049F0C20)
2024/05/28 11:37:07 [debug] 3317361#0: *2 [proxy-wasm] setting next action: pwctx->action = "CONTINUE" (pwctx: 00000000049F0C20)

[no more output after this]

Edit: this has been fixed

@pull-request-size pull-request-size bot added size/M and removed size/S labels May 28, 2024
@flrgh flrgh force-pushed the chore/wasm-test-lua-bridge-refactor branch from a5bc649 to ec73044 Compare June 3, 2024 17:16
@flrgh flrgh force-pushed the chore/wasm-test-lua-bridge-refactor branch from e84a333 to 53ee6e5 Compare June 10, 2024 18:35
@flrgh
Copy link
Contributor Author

flrgh commented Jun 17, 2024

Closing in favor of #13222

@flrgh flrgh closed this Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee core/proxy core/wasm Everything relevant to [proxy-]wasm size/M skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants