Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize deserializer in plugins so can use InvalidConfigValue when serde_json parsing fails. #944

Open
j-lanson opened this issue Feb 20, 2025 · 0 comments
Labels
product: plugin Relates to one or more hipcheck-maintained plugins type: chore Clean up or management task.
Milestone

Comments

@j-lanson
Copy link
Collaborator

Right now, in some plugins we have a #[derive(Deserialize)] on a struct Config to auto-parse JSON-value from set_config() into a struct. However, this doesn't give us information as to what field caused a failure if one occurs. Update the code to return InvalidConfigValue where appropriate. You can test this by changing the type of an int config value in a policy file to a float.

@j-lanson j-lanson added product: plugin Relates to one or more hipcheck-maintained plugins type: chore Clean up or management task. labels Feb 20, 2025
@j-lanson j-lanson added this to the 3.12.0 milestone Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: plugin Relates to one or more hipcheck-maintained plugins type: chore Clean up or management task.
Projects
Status: No status
Status: Todo
Development

No branches or pull requests

1 participant