Skip to content
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

Avoid image tag NPE in onboarding validation #538

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ public SQSBatchResponse processValidateOnboardingQueue(SQSEvent event, Context c
Map<String, Object> service = (Map<String, Object>) serviceConfig.getValue();
Map<String, Object> serviceCompute = (Map<String, Object>) service.get("compute");
String ecrRepo = (String) serviceCompute.get("containerRepo");
String imageTag = (String) serviceCompute.get("containerTag");
String imageTag = (String) serviceCompute.getOrDefault("containerTag", "latest");
if (Utils.isNotBlank(ecrRepo)) {
try {
ListImagesResponse dockerImages = ecr.listImages(request -> request
Expand All @@ -1190,7 +1190,7 @@ public SQSBatchResponse processValidateOnboardingQueue(SQSEvent event, Context c
// ListImagesResponse::hasImageIds will return true if the imageIds object is not null
if (dockerImages.hasImageIds()) {
for (ImageIdentifier image : dockerImages.imageIds()) {
if (image.imageTag().equals(imageTag)) {
if (imageTag.equals(image.imageTag())) {
imageAvailable = true;
break;
}
Expand Down
Loading