-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: keep builtin_console actions not complain args #11617
fix: keep builtin_console actions not complain args #11617
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok to me but would be great with a test case to ensure that we don't break this in the future!
640dd13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe this could have a test case?
@@ -647,7 +647,7 @@ set_keepalive(put, #{bindings := #{clientid := ClientID}, body := Body}) -> | |||
error -> | |||
{400, 'BAD_REQUEST', "Interval Not Found"}; | |||
{ok, Interval} -> | |||
case emqx_mgmt:set_keepalive(emqx_mgmt_util:urldecode(ClientID), Interval) of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: is this change intended for this PR? Seems unrelated. 馃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, It's not related, I just fix this incidentally, because keepalive
api is hidden for swagger.
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
190b04a
to
8b6d5d4
Compare
Fixes https://emqx.atlassian.net/browse/EMQX-10992
Don't need changelog, v5.2.0 is ok.
There was previously a bug allowing invalid fields:
The API for creation/update did not validate the args field, and rules were being created with default args.
The configuration file also did not validate the args field.
Now after being fixed, validation has been enabled:
This causes any rules/configurations saved earlier with invalid args to no longer work.
We fixed the validate here:
78c5a77#diff-5799d1ec01ad3359596ab22f7781d2b34e8f7909194bb0785f7d1dbe677a0d88L202-L208
compatibility with
actions. args
And
![image](https://private-user-images.githubusercontent.com/3116225/268227147-27bd2147-e5b6-41d2-b680-21c886bf3b7b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzMzY2MjAsIm5iZiI6MTcxOTMzNjMyMCwicGF0aCI6Ii8zMTE2MjI1LzI2ODIyNzE0Ny0yN2JkMjE0Ny1lNWI2LTQxZDItYjY4MC0yMWM4ODZiZjNiN2IucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjVUMTcyNTIwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZWQ5YmM1N2Q4NmJhZWI0NTA4ZDY4NmI1ODg0ZTVlMTRmNzUzOTY0NDIyNGU3ZjAxNGVlYzgzZWRhMDNhMDZhZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.lE0h0p8r06vKv3ATW81-0VsHdz3MiZnW9YMBAqND1YQ)
Summary
馃 Generated by Copilot at d72348c
Fix a validation bug for the
builtin_action_console
rule action and update theemqx_rule_engine
version. The bug caused the console action to fail validation when saving the rule config due to an invalidargs
field. The fix removes theargs
field from the console action config and adds it to the schema as a deprecated and ignored field. The version update reflects the bug fix and other changes in the application.PR Checklist
Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:
changes/(ce|ee)/(feat|perf|fix)-<PR-id>.en.md
filesChecklist for CI (.github/workflows) changes
changes/
dir for user-facing artifacts update