Kong / ngx_wasm_module

Nginx + WebAssembly
Apache License 2.0
80 stars 7 forks source link

feat(http) implement 'postpone_rewrite' + 'postpone_access' directives #531

Closed thibaultcha closed 5 months ago

thibaultcha commented 5 months ago

Our module must run after the Lua module for the ongoing refactor of the Lua bridge. When the Lua module postpones its handlers, we postpone ours as well. This behavior assumes ngx_wasmx_module is declared after ngx_http_lua_module during compilation (static or dynamic). This could be enforced in the future in dynamic builds, and caught at runtime with a warning for static builds.

TODO

codecov[bot] commented 5 months ago

Codecov Report

Merging #531 (39ac95b) into main (473a670) will increase coverage by 0.07781%. The diff coverage is 100.00000%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/531/graphs/tree.svg?width=650&height=150&src=pr&token=T0PT2Q9IAN&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong)](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/531?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong) ```diff @@ Coverage Diff @@ ## main #531 +/- ## =================================================== + Coverage 89.98690% 90.06471% +0.07780% =================================================== Files 47 47 Lines 9927 10045 +118 =================================================== + Hits 8933 9047 +114 - Misses 994 998 +4 ``` | [Files](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/531?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong) | Coverage Δ | | |---|---|---| | [src/http/ngx\_http\_wasm\_module.c](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/531?src=pr&el=tree&filepath=src%2Fhttp%2Fngx_http_wasm_module.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL2h0dHAvbmd4X2h0dHBfd2FzbV9tb2R1bGUuYw==) | `96.50206% <100.00000%> (+0.48332%)` | :arrow_up: | | [src/wasm/ngx\_wasm.h](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/531?src=pr&el=tree&filepath=src%2Fwasm%2Fngx_wasm.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL3dhc20vbmd4X3dhc20uaA==) | `100.00000% <ø> (ø)` | | | [src/wasm/ngx\_wasm\_core\_module.c](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/531?src=pr&el=tree&filepath=src%2Fwasm%2Fngx_wasm_core_module.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL3dhc20vbmd4X3dhc21fY29yZV9tb2R1bGUuYw==) | `92.64706% <ø> (-0.73043%)` | :arrow_down: | | [src/wasm/ngx\_wasm\_util.c](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/531?src=pr&el=tree&filepath=src%2Fwasm%2Fngx_wasm_util.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL3dhc20vbmd4X3dhc21fdXRpbC5j) | `92.74194% <100.00000%> (+0.46725%)` | :arrow_up: | ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/531/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong) | [Flag](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/531/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/531/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong) | `90.13143% <100.00000%> (+0.04831%)` | :arrow_up: | | [valgrind](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/531/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong) | `78.16380% <100.00000%> (+0.15283%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#carryforward-flags-in-the-pull-request-comment) to find out more.