You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "lingliy (via GitHub)" <gi...@apache.org> on 2023/04/13 03:29:41 UTC

[GitHub] [apisix] lingliy opened a new pull request, #9298: Fixed missing consumer.attach_consumer in wolf-rbac plugin

lingliy opened a new pull request, #9298:
URL: https://github.com/apache/apisix/pull/9298

   ### Description
   
   <!-- Please include a summary of the change and which issue is fixed. -->
   <!-- Please also include relevant motivation and context. -->
   
   Fixes # (issue)
   https://github.com/apache/apisix/issues/9287
   ### Checklist
   
   - [ x ] I have explained the need for this PR and the problem it solves
   - [ x ] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9298: fix(wolf-rbac): other plugin in consumer not effective when consumer used wolf-rbac plugin (#9287)

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on code in PR #9298:
URL: https://github.com/apache/apisix/pull/9298#discussion_r1185292347


##########
t/plugin/wolf-rbac.t:
##########
@@ -685,3 +685,55 @@ passed
             ngx.status = code
         }
     }
+
+
+
+=== TEST 36: add consumer with echo plugin
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/consumers',
+                ngx.HTTP_PUT,
+                [[{
+                    "username": "wolf_rbac_with_other_plugins",
+                    "plugins": {
+                        "wolf-rbac": {
+                            "appid": "wolf-rbac-app",
+                            "server": "http://127.0.0.1:1982"
+                        },
+                        "echo": {
+                            "body": "consumer merge echo plugins\n"

Review Comment:
   Please fix the code lint first



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] lingliy commented on a diff in pull request #9298: fix(wolf-rbac): other plugin in consumer not effective when consumer used wolf-rbac plugin (#9287)

Posted by "lingliy (via GitHub)" <gi...@apache.org>.
lingliy commented on code in PR #9298:
URL: https://github.com/apache/apisix/pull/9298#discussion_r1185692631


##########
t/plugin/wolf-rbac.t:
##########
@@ -685,3 +685,55 @@ passed
             ngx.status = code
         }
     }
+
+
+
+=== TEST 36: add consumer with echo plugin
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/consumers',
+                ngx.HTTP_PUT,
+                [[{
+                    "username": "wolf_rbac_with_other_plugins",
+                    "plugins": {
+                        "wolf-rbac": {
+                            "appid": "wolf-rbac-app",
+                            "server": "http://127.0.0.1:1982"
+                        },
+                        "echo": {
+                            "body": "consumer merge echo plugins\n"

Review Comment:
   Fixed with make lint



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on pull request #9298: fix(wolf-rbac): other plugin in consumer not effective when consumer used wolf-rbac plugin (#9287)

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #9298:
URL: https://github.com/apache/apisix/pull/9298#issuecomment-1507311306

   Hi @lingliy,  test cases are needed!


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 merged pull request #9298: fix(wolf-rbac): other plugin in consumer not effective when consumer used wolf-rbac plugin (#9287)

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 merged PR #9298:
URL: https://github.com/apache/apisix/pull/9298


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] lingliy commented on pull request #9298: fix(wolf-rbac): other plugin in consumer not effective when consumer used wolf-rbac plugin (#9287)

Posted by "lingliy (via GitHub)" <gi...@apache.org>.
lingliy commented on PR #9298:
URL: https://github.com/apache/apisix/pull/9298#issuecomment-1509741468

   @monkeyDluffy6017  test cases have been written


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9298: fix(wolf-rbac): other plugin in consumer not effective when consumer used wolf-rbac plugin (#9287)

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on code in PR #9298:
URL: https://github.com/apache/apisix/pull/9298#discussion_r1185233255


##########
t/plugin/wolf-rbac.t:
##########
@@ -685,3 +685,55 @@ passed
             ngx.status = code
         }
     }
+
+
+
+=== TEST 36: add consumer with echo plugin
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/consumers',
+                ngx.HTTP_PUT,
+                [[{
+                    "username": "wolf_rbac_with_other_plugins",
+                    "plugins": {
+                        "wolf-rbac": {
+                            "appid": "wolf-rbac-app",
+                            "server": "http://127.0.0.1:1982"
+                        },
+                        "echo": {
+                            "body": "consumer merge echo plugins\n"

Review Comment:
   Why don't you use the example in the issue: https://github.com/apache/apisix/issues/9287 ?



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on pull request #9298: fix(wolf-rbac): other plugin in consumer not effective when consumer used wolf-rbac plugin (#9287)

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #9298:
URL: https://github.com/apache/apisix/pull/9298#issuecomment-1534572531

   @lingliy please fix the ci


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] lingliy commented on a diff in pull request #9298: fix(wolf-rbac): other plugin in consumer not effective when consumer used wolf-rbac plugin (#9287)

Posted by "lingliy (via GitHub)" <gi...@apache.org>.
lingliy commented on code in PR #9298:
URL: https://github.com/apache/apisix/pull/9298#discussion_r1185290588


##########
t/plugin/wolf-rbac.t:
##########
@@ -685,3 +685,55 @@ passed
             ngx.status = code
         }
     }
+
+
+
+=== TEST 36: add consumer with echo plugin
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/consumers',
+                ngx.HTTP_PUT,
+                [[{
+                    "username": "wolf_rbac_with_other_plugins",
+                    "plugins": {
+                        "wolf-rbac": {
+                            "appid": "wolf-rbac-app",
+                            "server": "http://127.0.0.1:1982"
+                        },
+                        "echo": {
+                            "body": "consumer merge echo plugins\n"

Review Comment:
   I want to avoid having one plugin dependent on another, and I think echo is a much more basic plugin.
   
   after a brief review of ci errors, it seems that many errors have nothing to do with this modification. when I am free, I will have a careful look



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org