Re: [PR] fix(workflow): reject invalid case expressions and missing action conf [apisix]

2026-09-09 Thread via GitHub


nic-6443 merged PR #13862:
URL: https://github.com/apache/apisix/pull/13862


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



Re: [PR] fix(workflow): reject invalid case expressions and missing action conf [apisix]

2026-09-08 Thread via GitHub


Arjen10 commented on code in PR #13862:
URL: https://github.com/apache/apisix/pull/13862#discussion_r3965154450


##
apisix/plugins/workflow.lua:
##
@@ -45,9 +45,14 @@ local schema = {
 },
 actions = {
 type = "array",
+minItems = 1,

Review Comment:
   Done. added TEST 13 and TEST 14 to workflow2.t



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



Re: [PR] fix(workflow): reject invalid case expressions and missing action conf [apisix]

2026-09-08 Thread via GitHub


nic-6443 commented on code in PR #13862:
URL: https://github.com/apache/apisix/pull/13862#discussion_r3964298011


##
apisix/plugins/workflow.lua:
##
@@ -45,9 +45,14 @@ local schema = {
 },
 actions = {
 type = "array",
+minItems = 1,

Review Comment:
   I've checked the code. Currently it only supports one action, and the array 
length inside each action can only be 2. Therefore, a maxItem limit should also 
be added.



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



Re: [PR] fix(workflow): reject invalid case expressions and missing action conf [apisix]

2026-09-07 Thread via GitHub


Arjen10 commented on PR #13862:
URL: https://github.com/apache/apisix/pull/13862#issuecomment-5566843146

   merge https://github.com/apache/apisix/pull/13921


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



Re: [PR] fix(workflow): reject invalid case expressions and missing action conf [apisix]

2026-09-06 Thread via GitHub


Arjen10 commented on PR #13862:
URL: https://github.com/apache/apisix/pull/13862#issuecomment-5564031724

   CI failed on pnpm setup under sudo, not on the tests


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



Re: [PR] fix(workflow): reject invalid case expressions and missing action conf [apisix]

2026-09-03 Thread via GitHub


Arjen10 commented on PR #13862:
URL: https://github.com/apache/apisix/pull/13862#issuecomment-5534683719

   > Thanks for fixing the CI lint, however a few points need to be addressed:
   > 
   > 1. CI lint. `apisix/plugins/workflow.lua:144` uses the global `type` 
without `local type = type`, so `lj-releng` errors. You can run CI locally 
first to check if it passes.
   > 2. Empty `actions: []` still crashes at runtime. Schema has `minItems` on 
each action but not on actions itself, so the validation loop is a no-op. Admin 
API returns passed, then every request on that rule gets 500 at 
`workflow.lua:174` (`rule.actions[1]` is nil).
   > 3. Non-string action name 500s. `workflow.lua:141` concatenates 
`action[1]`, so `[true], [{}], [null]` crash with attempt to concatenate.
   > 4. Test gap. New tests only unit-call check_schema. No Admin-API-level 
error_code: 400 assertion for the issue's repro, no empty-actions case. 
`t/plugin/workflow2.t:316` has the pattern to reuse.
   > 
   > Design: One schema change beats the guard by declaring actions.items as 
[string, object] with minItems: 2. WDYT?
   
   Thank you for the code review. i went throuth the [workflow plugin 
doc](https://apisix.apache.org/zh/docs/apisix/plugins/workflow/) again. i think 
your solution is better. i will fix it


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



Re: [PR] fix(workflow): reject invalid case expressions and missing action conf [apisix]

2026-09-02 Thread via GitHub


janiussyafiq commented on PR #13862:
URL: https://github.com/apache/apisix/pull/13862#issuecomment-5519897867

   Thanks for fixing the CI lint, however a few points need to be addressed:
   1. CI lint. `apisix/plugins/workflow.lua:144` uses the global `type` without 
`local type = type`, so `lj-releng` errors. You can run CI locally first to 
check if it passes.
   2. Empty `actions: []` still crashes at runtime. Schema has `minItems` on 
each action but not on actions itself, so the validation loop is a no-op. Admin 
API returns passed, then every request on that rule gets 500 at 
`workflow.lua:174` (`rule.actions[1]` is nil).
   3. Non-string action name 500s. `workflow.lua:141` concatenates `action[1]`, 
so `[true], [{}], [null]` crash with attempt to concatenate.
   4. Test gap. New tests only unit-call check_schema. No Admin-API-level 
error_code: 400 assertion for the issue's repro, no empty-actions case. 
`t/plugin/workflow2.t:316` has the pattern to reuse.
 
   Design:
   One schema change beats the guard by declaring actions.items as [string, 
object] with minItems: 2. WDYT?


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