Skip to content

Commit

Permalink
Google Java Format
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 10, 2023
1 parent a3ab558 commit 5f065db
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ public void testDataJobDeploymentCrud() throws Exception {

// Deletes deployment
desiredJobDeploymentRepository.deleteById(testJobName);
dataJobsSynchronizer.synchronizeDataJob(
dataJob, null, actualDataJobDeployment, true);
dataJobsSynchronizer.synchronizeDataJob(dataJob, null, actualDataJobDeployment, true);
Assertions.assertFalse(deploymentService.readDeployment(testJobName).isPresent());
Assertions.assertFalse(actualJobDeploymentRepository.findById(testJobName).isPresent());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ public ResponseEntity<Void> deploymentDelete(
// TODO: deploymentId not implemented
if (jobName != null) {
if (dataJobDeploymentPropertiesConfig
.getWriteTos()
.contains(DataJobDeploymentPropertiesConfig.WriteTo.K8S)) {
.getWriteTos()
.contains(DataJobDeploymentPropertiesConfig.WriteTo.K8S)) {
deploymentService.deleteDeployment(jobName);
return ResponseEntity.accepted().build();
} else if (dataJobDeploymentPropertiesConfig
.getWriteTos()
.contains(DataJobDeploymentPropertiesConfig.WriteTo.DB)) {
.getWriteTos()
.contains(DataJobDeploymentPropertiesConfig.WriteTo.DB)) {
deploymentServiceV2.deleteDesiredDeployment(jobName);
return ResponseEntity.accepted().build();
}
Expand All @@ -92,8 +92,8 @@ public ResponseEntity<Void> deploymentPatch(
var jobDeployment =
ToModelApiConverter.toJobDeployment(teamName, jobName, dataJobDeployment);
if (dataJobDeploymentPropertiesConfig
.getWriteTos()
.contains(DataJobDeploymentPropertiesConfig.WriteTo.K8S)) {
.getWriteTos()
.contains(DataJobDeploymentPropertiesConfig.WriteTo.K8S)) {
deploymentService.patchDeployment(job.get(), jobDeployment);
return ResponseEntity.accepted().build();
}
Expand All @@ -110,8 +110,8 @@ public ResponseEntity<List<DataJobDeploymentStatus>> deploymentList(
List<DataJobDeploymentStatus> deployments = Collections.emptyList();
Optional<JobDeploymentStatus> jobDeploymentStatus = Optional.empty();
if (dataJobDeploymentPropertiesConfig
.getReadDataSource()
.equals(DataJobDeploymentPropertiesConfig.ReadFrom.K8S)) {
.getReadDataSource()
.equals(DataJobDeploymentPropertiesConfig.ReadFrom.K8S)) {
jobDeploymentStatus = deploymentService.readDeployment(jobName.toLowerCase());
}
if (jobDeploymentStatus.isPresent()) {
Expand All @@ -130,8 +130,8 @@ public ResponseEntity<DataJobDeploymentStatus> deploymentRead(
// TODO: deploymentId are not implemented.
Optional<JobDeploymentStatus> jobDeploymentStatus = Optional.empty();
if (dataJobDeploymentPropertiesConfig
.getReadDataSource()
.equals(DataJobDeploymentPropertiesConfig.ReadFrom.K8S)) {
.getReadDataSource()
.equals(DataJobDeploymentPropertiesConfig.ReadFrom.K8S)) {
jobDeploymentStatus = deploymentService.readDeployment(jobName.toLowerCase());
}
if (jobDeploymentStatus.isPresent()) {
Expand All @@ -156,15 +156,15 @@ public ResponseEntity<Void> deploymentUpdate(
var jobDeployment =
ToModelApiConverter.toJobDeployment(teamName, jobName.toLowerCase(), dataJobDeployment);
if (dataJobDeploymentPropertiesConfig
.getWriteTos()
.contains(DataJobDeploymentPropertiesConfig.WriteTo.K8S)) {
.getWriteTos()
.contains(DataJobDeploymentPropertiesConfig.WriteTo.K8S)) {
// TODO: Consider using a Task-oriented API approach
deploymentService.updateDeployment(
job.get(),
jobDeployment,
sendNotification,
operationContext.getUser(),
operationContext.getOpId());
job.get(),
jobDeployment,
sendNotification,
operationContext.getUser(),
operationContext.getOpId());
}

return ResponseEntity.accepted().build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,6 @@ private void handleException(

private boolean deploymentExistsOrInProgress(String dataJobName) {
return jobImageBuilder.isBuildingJobInProgress(dataJobName)
|| readDeployment(dataJobName).isPresent();
|| readDeployment(dataJobName).isPresent();
}
}

0 comments on commit 5f065db

Please sign in to comment.