Skip to content

Commit

Permalink
Merge pull request #2237 from opencb/TASK-3796
Browse files Browse the repository at this point in the history
TASK-3796 - Migration 'add_cellbase_data_release' failed with message: Error executing operation configureCellbase
  • Loading branch information
j-coll authored Jan 23, 2023
2 parents f0f95a6 + b66ddc2 commit 74c5255
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,29 @@ protected void run() throws Exception {
cellbase.setDataRelease(cellBaseUtils.getDataRelease());
updateCellbase = true;
} else {
String serverVersion;
try {
serverVersion = cellBaseUtils.getVersionFromServer();
} catch (Exception e) {
if (cellBaseUtils.getVersion().equals("v4")) {
logger.debug(e.getMessage(), e);
logger.warn(e.getMessage(), e);
logger.info("DataRelease not supported on version '" + cellBaseUtils.getVersion() + "' . Leaving empty");
continue;
}
throw e;
}
if (cellBaseUtils.supportsDataRelease()) {
cellbase.setDataRelease("1");
updateCellbase = true;
} else {
String serverVersion = cellBaseUtils.getVersionFromServer();
logger.info("DataRelease not supported on version '" + serverVersion + "' . Leaving empty");
}
}
}
if (updateCellbase) {
logger.info("Update cellbase info for project '{}' with '{}'", projectFqn, cellBaseUtils);
variantStorageManager.setCellbaseConfiguration(projectFqn, null, false, null, token);
variantStorageManager.setCellbaseConfiguration(projectFqn, cellbase, false, null, token);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ public boolean isPublicRegistration() {

@Override
public void checkCanEditProject(long projectId, String userId) throws CatalogException {
if (isInstallationAdministrator(userId)) {
return;
}
if (projectDBAdaptor.getOwnerId(projectId).equals(userId)) {
return;
}
Expand Down

0 comments on commit 74c5255

Please sign in to comment.