You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by dy...@apache.org on 2022/03/07 18:03:25 UTC
[incubator-datalab] branch DATALAB-2697 updated: change EnvironmentService.start method, ExploratiryService, add logs
This is an automated email from the ASF dual-hosted git repository.
dyankiv pushed a commit to branch DATALAB-2697
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/DATALAB-2697 by this push:
new dee895e change EnvironmentService.start method, ExploratiryService, add logs
dee895e is described below
commit dee895e07a9af9566ebcd6b058375e3fac51c373
Author: Denys Yankiv <de...@gmail.com>
AuthorDate: Mon Mar 7 20:03:08 2022 +0200
change EnvironmentService.start method, ExploratiryService, add logs
---
.../backendapi/schedulers/CheckInfrastructureStatusScheduler.java | 1 +
.../com/epam/datalab/backendapi/service/ExploratoryService.java | 2 --
.../datalab/backendapi/service/impl/EnvironmentServiceImpl.java | 3 +--
.../datalab/backendapi/service/impl/ExploratoryServiceImpl.java | 7 -------
4 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/services/self-service/src/main/java/com/epam/datalab/backendapi/schedulers/CheckInfrastructureStatusScheduler.java b/services/self-service/src/main/java/com/epam/datalab/backendapi/schedulers/CheckInfrastructureStatusScheduler.java
index ab11001..e6a0b0e 100644
--- a/services/self-service/src/main/java/com/epam/datalab/backendapi/schedulers/CheckInfrastructureStatusScheduler.java
+++ b/services/self-service/src/main/java/com/epam/datalab/backendapi/schedulers/CheckInfrastructureStatusScheduler.java
@@ -73,6 +73,7 @@ public class CheckInfrastructureStatusScheduler implements Job {
@Override
public void execute(JobExecutionContext context) {
+ log.info("Trying to update infrastructure statuses");
UserInfo serviceUser = securityService.getServiceAccountInfo("admin");
List<String> activeEndpoints = endpointService.getEndpointsWithStatus(EndpointDTO.EndpointStatus.ACTIVE)
diff --git a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/ExploratoryService.java b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/ExploratoryService.java
index c54723f..366b823 100644
--- a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/ExploratoryService.java
+++ b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/ExploratoryService.java
@@ -37,8 +37,6 @@ public interface ExploratoryService {
String start(UserInfo userInfo, String exploratoryName, String project, String auditInfo);
- String startAsAdmin(UserInfo userInfo, String resourceCreator, String project, String exploratoryName, @Info String auditInfo);
-
String stop(UserInfo userInfo, String resourceCreator, String project, String exploratoryName, String auditInfo);
String terminate(UserInfo userInfo, String resourceCreator, String project, String exploratoryName, String auditInfo);
diff --git a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/EnvironmentServiceImpl.java b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/EnvironmentServiceImpl.java
index d364fc3..1286752 100644
--- a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/EnvironmentServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/EnvironmentServiceImpl.java
@@ -110,8 +110,7 @@ public class EnvironmentServiceImpl implements EnvironmentService {
@ProjectAdmin
@Override
public void startExploratory(@User UserInfo userInfo, String user, @Project String project, String exploratoryName) {
- exploratoryService.startAsAdmin(userInfo, user, project, exploratoryName, null);
- // exploratoryService.start(securityService.getServiceAccountInfo(user),exploratoryName,project,null);
+ exploratoryService.start(securityService.getServiceAccountInfo(user),exploratoryName,project,null);
}
@Override
diff --git a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ExploratoryServiceImpl.java b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ExploratoryServiceImpl.java
index aac4e2a..60d4c84 100644
--- a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ExploratoryServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ExploratoryServiceImpl.java
@@ -98,13 +98,6 @@ public class ExploratoryServiceImpl implements ExploratoryService {
return action(userInfo, userInfo.getName(), project, exploratoryName, EXPLORATORY_START, STARTING);
}
- @BudgetLimited
- @Audit(action = START, type = NOTEBOOK)
- @Override
- public String startAsAdmin(@User UserInfo userInfo, String resourceCreator, @Project String project, @ResourceName String exploratoryName, @Info String auditInfo) {
- return action(userInfo, resourceCreator, project, exploratoryName, EXPLORATORY_START, STARTING);
- }
-
@Audit(action = STOP, type = NOTEBOOK)
@Override
public String stop(@User UserInfo userInfo, String resourceCreator, @Project String project, @ResourceName String exploratoryName, @Info String auditInfo) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org