mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(emr-serverless): answer UpdateApplication with the updated application (#8369)
UpdateApplication answered {applicationId, arn, name}, while the model's
UpdateApplicationResponse is {application}, required: "Information about
the updated application". A client reading it found no application: a
KeyError in boto3, a null in the Java SDK. It now answers with the
application as GetApplication reports it, without the clientToken
storage keeps for CreateApplication's retries.
This commit is contained in:
1 parent
0a8b6396ac
commit
d5e831bd54
4 files changed
+24
-15
No files matched your search
@@ -95,11 +95,8 @@ public class EmrServerlessController {
|
||||
@Path("/{applicationId}")
|
||||
public UpdateApplicationResponse updateApplication(@PathParam("applicationId") String applicationId,
|
||||
UpdateApplicationRequest request) {
|
||||
Application app = service.updateApplication(applicationId, request);
|
||||
UpdateApplicationResponse response = new UpdateApplicationResponse();
|
||||
response.setApplicationId(app.getApplicationId());
|
||||
response.setArn(app.getArn());
|
||||
response.setName(app.getName());
|
||||
response.setApplication(service.updateApplication(applicationId, request));
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
+13
-9
@@ -1,17 +1,21 @@
|
||||
package io.floci.aws.services.emrserverless.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
/** UpdateApplication's answer: "Information about the updated application", as GetApplication reports it. */
|
||||
@RegisterForReflection
|
||||
public class UpdateApplicationResponse {
|
||||
private String applicationId;
|
||||
private String arn;
|
||||
private String name;
|
||||
|
||||
public String getApplicationId() { return applicationId; }
|
||||
public void setApplicationId(String applicationId) { this.applicationId = applicationId; }
|
||||
public String getArn() { return arn; }
|
||||
public void setArn(String arn) { this.arn = arn; }
|
||||
public String getName() { return name; }
|
||||
public void setName(String name) { this.name = name; }
|
||||
// Without the clientToken storage keeps, as GetApplicationResponse leaves it out.
|
||||
@JsonIgnoreProperties("clientToken")
|
||||
private Application application;
|
||||
|
||||
public Application getApplication() {
|
||||
return application;
|
||||
}
|
||||
|
||||
public void setApplication(Application application) {
|
||||
this.application = application;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user