feat: add new supported phases to supported_semaphore_wait_phases#13
feat: add new supported phases to supported_semaphore_wait_phases#13HanadaLee wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughModified the DNS client semaphore-wait phase whitelist by adding five OpenResty execution phases: Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/resty/dns/client.lua (1)
862-875:⚠️ Potential issue | 🔴 CriticalRemove unsupported phases from
supported_semaphore_wait_phases.According to the official lua-resty-core documentation,
semaphore:wait()is supported only in these phases:
rewrite_by_lua*(rewrite)access_by_lua*(access)content_by_lua*(content)ngx.timer.*(timer)The five newly added phases (
server_rewrite,precontent,proxy_ssl_cert,proxy_ssl_verify,ssl_client_hello) are not in the supported list and will causesemaphore:wait()to fail if called in those contexts. Remove them from this table.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/resty/dns/client.lua` around lines 862 - 875, supported_semaphore_wait_phases currently includes unsupported phases which will cause semaphore:wait() to fail; update the supported_semaphore_wait_phases table (the variable named supported_semaphore_wait_phases) to remove the five unsupported entries server_rewrite, precontent, proxy_ssl_cert, proxy_ssl_verify, and ssl_client_hello so that the table only contains the phases that lua-resty-core supports for semaphore:wait() (rewrite, access, content, timer).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@src/resty/dns/client.lua`:
- Around line 862-875: supported_semaphore_wait_phases currently includes
unsupported phases which will cause semaphore:wait() to fail; update the
supported_semaphore_wait_phases table (the variable named
supported_semaphore_wait_phases) to remove the five unsupported entries
server_rewrite, precontent, proxy_ssl_cert, proxy_ssl_verify, and
ssl_client_hello so that the table only contains the phases that lua-resty-core
supports for semaphore:wait() (rewrite, access, content, timer).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6f73b93e-decb-4b3e-8784-215d90f3e6ce
📒 Files selected for processing (1)
src/resty/dns/client.lua
These newly added phases in Lua support supported_semaphore_wait_phases.
Summary by CodeRabbit