Skip to content

Conversation

@rileykarson
Copy link
Member

MMv1 errors are inconsistent in how much information is available. Some format strings show the affected property/resource and others don't. I'm looking to clear that up- as well as stop the process dying from a log.Fatalf on any issue. Since Validate does surface-level checking of yaml data we can typically proceed after seeing an error, allowing us to collect multiple errors instead of dying immediately.

We could theoretically push this further- since resources are mostly or entirely independent- and collect errors across all files before dying. For now I collected all errors in the current resource, prefixed them all with the resource file they came from, and sent a fatal error after validating the entire resource. Currently a draft, looking for any thoughts/concerns/feedback before cleaning up and creating a merge-ready PR.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

Copy link
Member

@c2thorn c2thorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems simply better than what we had before, do you have example output that you used

@rileykarson
Copy link
Member Author

The errors on the PR are from the second commit that introduces a resource and field level issue in the same resource! Any of them- like https://github.com/GoogleCloudPlatform/magic-modules/actions/runs/21299668917/job/61314007939?pr=16207 - work

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.

2 participants