Create ResourceLabels and use for ManagedResource, NetworkConfiguration.#1360
Open
jglogan wants to merge 1 commit intoapple:mainfrom
Open
Create ResourceLabels and use for ManagedResource, NetworkConfiguration.#1360jglogan wants to merge 1 commit intoapple:mainfrom
jglogan wants to merge 1 commit intoapple:mainfrom
Conversation
saehejkang
reviewed
Mar 29, 2026
|
|
||
| import Collections | ||
|
|
||
| public protocol AppError: Error { |
Contributor
There was a problem hiding this comment.
Is this going to be the used for the highest level and for generic type of errors (that all resources will follow)? I kind of worked on creating more lower level, managed resource specific handling approach (that each resource will follow but will vary per resource).
Contributor
Author
There was a problem hiding this comment.
I don't know the answer to that for sure yet. I feel like we'll want to try as much as we can in the coming month and evolve to something sensible by the next release.
What I was going for with this error is:
- Supports a caused-by chain.
- Supports structured log output
- Delegates presentation to an error receiver that is responsible for making sense of chained errors, compound errors, and error metadata and mapping it to one or more log messages.
- For easier compatibility, doesn't rely on
enumfor error typing.
- Create a ResourceLabels type and extract the label validation from NetworkConfiguration into the new type. - Create a base AppError type that is compatible with structured logging and delegates message presentation to the error receiver. - Define LabelError over AppError for label validation. - Slightly reworks NetworkConfiguration entity migration code in NetworksService.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Motivation and Context
See related issue.
Testing