Skip to content

Commit

Permalink
Prevent crash when invalid manifest (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
olevitt authored Aug 31, 2023
1 parent 777a0af commit 2dc4db9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ node_modules
*.iml
.vscode
onyxia-api/src/main/resources/application.properties.local
onyxia-api/src/main/resources/regions.json.local
onyxia-api/src/main/resources/regions.json.local
target
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,20 @@ private Service getServiceFromRelease(
Region region, HelmLs release, String manifest, User user) {
KubernetesClient client = kubernetesClientProvider.getUserClient(region, user);

List<String> urls = getServiceUrls(region, manifest, client);
Service service = new Service();
service.setUrls(urls);

try {
List<String> urls = getServiceUrls(region, manifest, client);
service.setUrls(urls);
} catch (Exception e) {
System.out.println(
"Warning : Failed to retrieve URLS for release "
+ release.getName()
+ " namespace "
+ release.getNamespace());
e.printStackTrace();
service.setUrls(List.of());
}

service.setInstances(1);

Expand Down

0 comments on commit 2dc4db9

Please sign in to comment.