Skip to content

Enable scripted fixing of detection metadata validation errors #405

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ljstella
Copy link
Contributor

@ljstella ljstella commented May 2, 2025

When we make changes to the .conf templates or want to make large changes to content, we frequently have to manipulate versions for many detections at once. This is currently a gigantic pain, and has no easy way to go about fixing, especially given the implicit promise we have of not modifying files in an app without that being the express intent of the command.

This PR makes a first attempt at identifying the errors where we know something is incorrect AND we specifically know what the value SHOULD be. During the contentctl inspect workflow, these errors are printed on the screen and now a JSON representation of them is saved to metadata_validation_errors.json, where they can be processed by another tool.

I also realized we didn't necessarily account for versions being bumped when they didn't have to, and added a new error type to account for those.

@ljstella
Copy link
Contributor Author

ljstella commented May 2, 2025

Snippet of current output:

Screenshot 2025-05-02 at 4 59 48 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant