kingluo commented on code in PR #8113:
URL: https://github.com/apache/apisix/pull/8113#discussion_r998211782


##########
apisix/core/ai.lua:
##########
@@ -71,6 +97,26 @@ function  _M.routes_analyze(routes)
     else
         core.log.info("use ai plane to match route")
         router.match = ai_match
+
+        if get_cache_key_func_def_render == nil then
+            local template = require("resty.template")

Review Comment:
   resty.template depends on `nginx.location`, but ai.lua would be called in 
`init_by_lua`, where no `ngx.location`, so the` require` would fail.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to