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

Improve Diagnostics consistency #213

Merged
merged 6 commits into from
Jun 18, 2024
Merged

Improve Diagnostics consistency #213

merged 6 commits into from
Jun 18, 2024

Conversation

mitchnielsen
Copy link
Contributor

@mitchnielsen mitchnielsen commented Jun 13, 2024

Summary

Closes #212

  • Uses helper functions more consistently
  • Adds new helper functions
  • Ensure return on diagnostic errors
  • Fix diagnostic resource object references

To do

  • Replace all repetitive Diagnostics with helper functions

@mitchnielsen mitchnielsen added the maintenance Maintenance work - won't show in release notes label Jun 13, 2024
@mitchnielsen mitchnielsen self-assigned this Jun 13, 2024
Uses a constant for the report message so we can call it where needed.
Adds and implements a new helper to call when there's an unexpected type
during configuration of a data source or resource.
@mitchnielsen mitchnielsen force-pushed the diagnostics-consistency branch from f11c594 to 55bb3e2 Compare June 13, 2024 22:07
Ensures that ResourceClientErrorDiagnostic is
called when appropriate.
Ensures CreateClientErrorDiagnostic is used where appropriate.
Implements a new helper to use when serializing to JSON string fails.
Implements a helper for use when parsing UUIDs fails.
@mitchnielsen mitchnielsen marked this pull request as ready for review June 17, 2024 22:35
@mitchnielsen mitchnielsen requested review from gabcoyne and a team as code owners June 17, 2024 22:35
@mitchnielsen
Copy link
Contributor Author

This is a bigger one, but if you look at each commit, the changes are pretty repetitive/predictable. Also, a majority of the changes are lines removed rather than changed/added.

@mitchnielsen mitchnielsen merged commit 5ff5236 into main Jun 18, 2024
7 checks passed
@mitchnielsen mitchnielsen deleted the diagnostics-consistency branch June 18, 2024 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance work - won't show in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use helper functions for consistent Diagnostics
2 participants