SkyeYoung commented on issue #56:
URL: 
https://github.com/apache/apisix-python-plugin-runner/issues/56#issuecomment-1272281675

   Hi, I checked the logic of the code. Let me try to answer these questions 
for you.
   
   <br/>
   
   > apisix ignores the plugin and continues with the request to the upstream
   
   ##### In `python-plugin-runner`.
   
   1. 
https://github.com/apache/apisix-python-plugin-runner/blob/master/apisix/runner/plugin/core.py#L92-L94
   
        <img width="500" alt="image" 
src="https://user-images.githubusercontent.com/48400568/194697473-fce4f268-895e-4f5a-a708-262066f6441a.png";
 />
   
   2. 
https://github.com/apache/apisix-python-plugin-runner/blob/master/apisix/runner/server/handle.py#L83-L87
   
        <img width="500" alt="image" 
src="https://user-images.githubusercontent.com/48400568/194699667-11647084-2cbf-40f7-8ec5-48e272e92a04.png";
 />
   
   ##### In 
[`apisix/plugins/ext-plugin`](https://github.com/apache/apisix/blob/master/apisix/plugins/ext-plugin/init.lua).
   
   1. 
https://github.com/apache/apisix/blob/master/apisix/plugins/ext-plugin/init.lua#L566
   
        <img width="500" alt="image" 
src="https://user-images.githubusercontent.com/48400568/194699920-431bf957-2b3a-4299-ae0a-515d7586b95e.png";>
   
   
   Since `python-plugin-runner` does not modify `ty`'s original type 
`RPC_HTTP_REQ_CALL`, `apisix` ignores the error, which seems to be an 
implementation problem with `python-plugin-runner`. 🤔 
   
   Also, errors logged by `config()` are only logged in the `execute()` of 
`python-plugin-runner`, but are not passed to the function that calls 
`execute()`, and so are not passed to `apisix`.
   
   <br/>
   
   > `allow_degredation`
   
   <img width="500" alt="image" 
src="https://user-images.githubusercontent.com/48400568/194700949-bd3308f8-2875-4960-8218-560f44264199.png";>
   
   If the `ty` type problem described above can be modified, it should be 
possible to get some errors here so that the allow degradation should behave 
appropriately. 🤔 
   
   I'm not familiar enough with the code. @bzp2010 Pls help me check this.
   


-- 
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