Skip to content

Commit

Permalink
fix: the plugin order sent from controller may be wrong (#774)
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <[email protected]>
  • Loading branch information
spacewander authored Oct 18, 2024
1 parent 8ded9c5 commit ec9ff43
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions api/pkg/plugins/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ func ComparePluginOrder(a, b string) bool {
}

func ComparePluginOrderInt(a, b string) int {
pa := plugins[a]
pb := plugins[b]
pa := pluginTypes[a]
pb := pluginTypes[b]
if pa == nil || pb == nil {
// The caller should guarantee the a, b are valid plugin name, so this case only happens
// in test.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
'@type': type.googleapis.com/xds.type.v3.TypedStruct
value:
plugins:
- config:
average: 1
name: limitReq
- config:
pet: goldfish
name: animal
- config:
hostName: John
name: demo
- config:
average: 1
name: limitReq
- applyTo: HTTP_ROUTE
match:
routeConfiguration:
Expand All @@ -56,17 +56,17 @@
value:
namespace: default
plugins:
- config:
pet: fish
name: animal
- config:
hostName: John
name: demo
- config:
keys:
- name: Authorization
name: keyAuth
- config:
average: 1
name: limitReq
- config:
pet: fish
name: animal
- config:
hostName: John
name: demo
status: {}

0 comments on commit ec9ff43

Please sign in to comment.