smengcl commented on a change in pull request #2804:
URL: https://github.com/apache/ozone/pull/2804#discussion_r746083525



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/security/S3GetSecretRequest.java
##########
@@ -102,16 +92,42 @@ public OMRequest preExecute(OzoneManager ozoneManager) 
throws IOException {
     // client does not need any proto changes.
     OMRequest.Builder omRequest = OMRequest.newBuilder()
         .setUserInfo(getUserInfo())
-        .setUpdateGetS3SecretRequest(updateGetS3SecretRequest)
         .setCmdType(getOmRequest().getCmdType())
         .setClientId(getOmRequest().getClientId());
 
+    // createIfNotExist defaults to true if not specified.
+    boolean createIfNotExist = !s3GetSecretRequest.hasCreateIfNotExist()
+            || s3GetSecretRequest.getCreateIfNotExist();
+
+    // Recompose GetS3SecretRequest just in case createIfNotExist is missing
+    final GetS3SecretRequest newGetS3SecretRequest =
+            GetS3SecretRequest.newBuilder()
+                    .setKerberosID(accessId)

Review comment:
       It turns out renaming the proto field from `kerberosID` to `` is failing 
the proto compatibility check locally.
   
   ```
   [INFO] --- proto-backwards-compatibility:1.0.5:backwards-compatibility-check 
(default) @ ozone-interface-client ---
   [ERROR] CONFLICT: "GetS3SecretRequest" field: "accessId" ID: 1 has an 
updated name, previously "kerberosID" [OmClientProtocol.proto]
   [ERROR] CONFLICT: "GetS3SecretRequest" field: "kerberosID" has been removed, 
but is not reserved [OmClientProtocol.proto]
   ```
   
   I will add a comment in the code without renaming the proto field for the 
moment.
   
   If we want to do the rename, we should probably do this later in a 
refactoring patch in the master branch. Because there are a lot of other 
references of `.setKerberosID`, `.getKerberosID` and in other proto messages as 
well (not just for `GetS3SecretRequest`).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to