Skip to content

Commit

Permalink
Add errorParams
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 5951c17ea4b353a77c1854949ffcc2babce960e4
  • Loading branch information
pdesgarets authored and Gitlab-CI committed Dec 4, 2024
1 parent f8defd0 commit cb90791
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import lombok.Data;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
public class ContainerDto {
Expand All @@ -14,4 +16,5 @@ public class ContainerDto {
private Long deletionTime;
private Boolean needsNewGpu;
private String creationError;
private Map<String, String> errorParams = new HashMap<>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public ContainerRequest createRequest(CourseSession courseSession, User user, bo

Metadata.Builder metadataBuilder = Metadata.newBuilder()
.putTags("courseId", String.valueOf(course.getId()))
.putTags("courseTitle", course.getTitle())
.putTags("userId", String.valueOf(user.getId()))
.putTags("email", String.valueOf(user.getEmail()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ private ContainerDto mapContainerResponseToContainer(ContainerResponse container
containerDto.setPassword(containerResponse.getUserPassword().getPassword());
containerDto.setUsername(containerResponse.getUserPassword().getUsername());
containerDto.setCreationError(containerResponse.getError());
containerDto.getErrorParams().putAll(containerResponse.getErrorParamsMap());
containerDto.setDeletionTime(containerResponse.getDeletionTime());
containerDto.setNeedsNewGpu(course.isPresent() && course.get().getComputeType().isGpu());
return containerDto;
Expand Down
1 change: 1 addition & 0 deletions back/src/main/proto/containerService.proto
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ message ContainerResponse {
}
int64 deletionTime = 9;
string error = 10;
map<string, string> errorParams = 11;
};


Expand Down

0 comments on commit cb90791

Please sign in to comment.