-
Notifications
You must be signed in to change notification settings - Fork 218
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
Extend validation event ids to make them unique #1527
Conversation
Thanks! We'll go through and review each of these. I do think though that the JMESPath related IDs are too granular and won't be that useful considering it's fine to change JMESPath expressions in waiters as APIs evolve, bugs are fixed, or they're simplified. Let's look out for other cases like that too in this PR. Edit: Oh also, event are typically already specific to shape IDs, so I don't think we need to add shape IDs to everything. When trying to identify unique events, it should be a combination of shape ID + event ID. So let's make sure to not add shape IDs to events that are already specific to shapes since it doesn't add any value and will just make the event more complex than it needs to be. |
...files/validators/operation/input-output-traits/invalid-multiple-operations-same-shape.errors
Outdated
Show resolved
Hide resolved
.../software/amazon/smithy/model/errorfiles/validators/paginated/paginated-deeply-nested.errors
Outdated
Show resolved
Hide resolved
...ources/software/amazon/smithy/model/errorfiles/validators/paginated/paginated-invalid.errors
Outdated
Show resolved
Hide resolved
...ces/software/amazon/smithy/model/errorfiles/validators/paginated/paginated-map-tokens.errors
Outdated
Show resolved
Hide resolved
...s/software/amazon/smithy/model/errorfiles/validators/trait-value/extra-trait-property.errors
Show resolved
Hide resolved
.../software/amazon/smithy/model/errorfiles/validators/annotation-trait-extra-properties.errors
Show resolved
Hide resolved
.../software/amazon/smithy/model/errorfiles/validators/deprecated-shape/deprecated-shape.errors
Outdated
Show resolved
Hide resolved
...es/software/amazon/smithy/model/errorfiles/validators/http-method-semantics-validator.errors
Outdated
Show resolved
Hide resolved
...es/software/amazon/smithy/model/errorfiles/validators/http-method-semantics-validator.errors
Outdated
Show resolved
Hide resolved
...es/software/amazon/smithy/model/errorfiles/validators/http-method-semantics-validator.errors
Show resolved
Hide resolved
Addressed all comments except the JMES one which does not yet have a clear path forward |
Description of changes:
We have a need to record and store "approvals" on a per-smithy-violation basis. The idea is that once approved, the same violation will be hidden as long as an "approval" can be matched to it. However, we realized an issue where ValidationEvents do not currently contain the granularity we need. Currently, some linters/validators raise multiple violations on the same shape, and the only difference is the message/source location (Enum casing validation or unstable trait validation for ex). However if we key or hash on the message/source location, we risk being broken if the message or source location changes slightly.
To accomplish this goal, we can use hierarchical eventIds to pack distinguishing info into the eventId.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.