-
Notifications
You must be signed in to change notification settings - Fork 914
Adds operation name labels for operations to identify calling op when required #2846
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
Conversation
|
||
@SdkInternalApi | ||
public enum OperationType { | ||
ANY("Any"), //unknown value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be UNKNOWN_TO_SDK_VERSION(null);
to be consistent with the service enum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds better, lm check that out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just UNKNOWN? Because this is internal, why would we even need an UNKNOWN value? Can't we just always specify it for our operations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't always know the operation in all code paths flowing through an operation. Especially on the read path, we make transforms and use extensions without coming directly from an operation. An example is the readAndTransform..Item
operations in EnhancedClientUtils
.
We could use null instead, which I don't prefer but I don't feel strongly about it.
@@ -96,6 +107,7 @@ public int hashCode() { | |||
result = 31 * result + (operationContext != null ? operationContext.hashCode() : 0); | |||
result = 31 * result + (tableMetadata != null ? tableMetadata.hashCode() : 0); | |||
result = 31 * result + (tableSchema != null ? tableSchema.hashCode() : 0); | |||
result = 31 * result + (operationType != null ? operationType.hashCode() : 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have equals hashcode test? If not, can we add one using equalsVerifier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good suggestion!
19bb922
to
6bd013d
Compare
6bd013d
to
4fd7f03
Compare
SonarCloud Quality Gate failed. |
Motivation and Context
Adding these labels make it possible for the client to distinguish between different operations which is useful for the extensions framework.
Description
Types of changes
Checklist
mvn install
succeedsLicense