You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/01/15 21:41:34 UTC

[airavata] branch develop updated (d7b9f2b -> ba8e0ea)

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git.


    from d7b9f2b  Merge branch 'AIRAVATA-3397' into develop
     add 5760d1b  Fixing connection validation logic
     add 6591afa  Ansible: adding geo gateway redirect
     new 59f74f2  AIRAVATA-3401 Fixing name of status field on ExperimentSummary
     new ba8e0ea  Merge branch 'airavata-3401' into develop

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../scigap/production/host_vars/geo/vars.yml           |  4 ++++
 dev-tools/ansible/roles/django/defaults/main.yml       |  1 +
 .../roles/django/templates/django-ssl-vhost.conf.j2    |  9 +++++++++
 .../roles/django/templates/django-vhost.conf.j2        |  9 +++++++++
 .../airavata/helix/adaptor/PoolingSSHJClient.java      |  2 +-
 .../helix/adaptor/wrapper/SFTPClientWrapper.java       |  1 -
 .../expcatalog/ExperimentSummaryRepository.java        | 12 ++++++------
 .../airavata/registry/core/utils/DBConstants.java      |  2 +-
 .../expcatalog/ExperimentSummaryRepositoryTest.java    | 18 ++++++++++++++++++
 9 files changed, 49 insertions(+), 9 deletions(-)


[airavata] 02/02: Merge branch 'airavata-3401' into develop

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit ba8e0eaa4ecc933d204bd5709b002617b5c69bb9
Merge: d7b9f2b 59f74f2
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Fri Jan 15 16:40:33 2021 -0500

    Merge branch 'airavata-3401' into develop

 .../scigap/production/host_vars/geo/vars.yml           |  4 ++++
 dev-tools/ansible/roles/django/defaults/main.yml       |  1 +
 .../roles/django/templates/django-ssl-vhost.conf.j2    |  9 +++++++++
 .../roles/django/templates/django-vhost.conf.j2        |  9 +++++++++
 .../airavata/helix/adaptor/PoolingSSHJClient.java      |  2 +-
 .../helix/adaptor/wrapper/SFTPClientWrapper.java       |  1 -
 .../expcatalog/ExperimentSummaryRepository.java        | 12 ++++++------
 .../airavata/registry/core/utils/DBConstants.java      |  2 +-
 .../expcatalog/ExperimentSummaryRepositoryTest.java    | 18 ++++++++++++++++++
 9 files changed, 49 insertions(+), 9 deletions(-)


[airavata] 01/02: AIRAVATA-3401 Fixing name of status field on ExperimentSummary

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit 59f74f2258339cb92d2e7d74558988692de63810
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Fri Jan 15 16:40:15 2021 -0500

    AIRAVATA-3401 Fixing name of status field on ExperimentSummary
---
 .../expcatalog/ExperimentSummaryRepository.java        | 12 ++++++------
 .../airavata/registry/core/utils/DBConstants.java      |  2 +-
 .../expcatalog/ExperimentSummaryRepositoryTest.java    | 18 ++++++++++++++++++
 3 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentSummaryRepository.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentSummaryRepository.java
index 69c4dc3..5db3792 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentSummaryRepository.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentSummaryRepository.java
@@ -103,11 +103,11 @@ public class ExperimentSummaryRepository extends ExpCatAbstractRepository<Experi
             query += "ES.executionId LIKE :" + DBConstants.Experiment.EXECUTION_ID + " AND ";
         }
 
-        if (filters.get(DBConstants.ExperimentStatus.STATE) != null) {
+        if (filters.get(DBConstants.ExperimentSummary.EXPERIMENT_STATUS) != null) {
             logger.debug("Filter Experiments by State");
-            String state = ExperimentState.valueOf(filters.get(DBConstants.ExperimentStatus.STATE)).toString();
-            queryParameters.put(DBConstants.ExperimentStatus.STATE, state);
-            query += "ES.experimentStatus LIKE :" + DBConstants.ExperimentStatus.STATE + " AND ";
+            String state = ExperimentState.valueOf(filters.get(DBConstants.ExperimentSummary.EXPERIMENT_STATUS)).toString();
+            queryParameters.put(DBConstants.ExperimentSummary.EXPERIMENT_STATUS, state);
+            query += "ES.experimentStatus LIKE :" + DBConstants.ExperimentSummary.EXPERIMENT_STATUS + " AND ";
         }
 
         if (filters.get(DBConstants.ExperimentSummary.FROM_DATE) != null
@@ -260,8 +260,8 @@ public class ExperimentSummaryRepository extends ExpCatAbstractRepository<Experi
 
         if (experimentState != null) {
             logger.debug("Filter Experiments by Experiment State");
-            queryParameters.put(DBConstants.Experiment.EXPERIMENT_STATE, experimentState);
-            query += "ES.experimentStatus LIKE :" + DBConstants.Experiment.EXPERIMENT_STATE + " AND ";
+            queryParameters.put(DBConstants.ExperimentSummary.EXPERIMENT_STATUS, experimentState);
+            query += "ES.experimentStatus LIKE :" + DBConstants.ExperimentSummary.EXPERIMENT_STATUS + " AND ";
         }
 
         if (gatewayId != null) {
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/utils/DBConstants.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/utils/DBConstants.java
index b5e887f..dd3abd8 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/utils/DBConstants.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/utils/DBConstants.java
@@ -116,7 +116,6 @@ public class DBConstants {
         public static final String CREATION_TIME = "creationTime";
         public static final String RESOURCE_HOST_ID = "resourceHostId";
         public static final String ACCESSIBLE_EXPERIMENT_IDS = "accessibleExperimentIds";
-        public static final String EXPERIMENT_STATE = "experimentState";
     }
 
     public final class ExperimentStatus {
@@ -140,6 +139,7 @@ public class DBConstants {
     }
 
     public static class ExperimentSummary {
+        public static final String EXPERIMENT_STATUS = "experimentStatus";
         public static final String FROM_DATE = "fromDate";
         public static final String TO_DATE = "toDate";
     }
diff --git a/modules/registry/registry-core/src/test/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentSummaryRepositoryTest.java b/modules/registry/registry-core/src/test/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentSummaryRepositoryTest.java
index 0d3e6f4..1b0c415 100644
--- a/modules/registry/registry-core/src/test/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentSummaryRepositoryTest.java
+++ b/modules/registry/registry-core/src/test/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentSummaryRepositoryTest.java
@@ -207,6 +207,24 @@ public class ExperimentSummaryRepositoryTest extends TestBase{
         assertTrue(experimentStatistics.getCreatedExperimentCount() == 1);
         assertTrue(experimentStatistics.getRunningExperimentCount() == 1);
 
+        // Test searchAllAccessibleExperiments with status filtering
+        // Only CREATED status
+        filters = new HashMap<>();
+        filters.put(DBConstants.Experiment.GATEWAY_ID, gatewayId);
+        filters.put(DBConstants.ExperimentSummary.EXPERIMENT_STATUS, ExperimentState.CREATED.name());
+        experimentSummaryModelList = experimentSummaryRepository.searchAllAccessibleExperiments(
+                                allExperimentIds, filters, -1, 0,
+                                DBConstants.Experiment.CREATION_TIME, ResultOrderType.ASC);
+        assertEquals("should return only one CREATED exp", 1, experimentSummaryModelList.size());
+        assertEquals(experimentIdOne, experimentSummaryModelList.get(0).getExperimentId());
+        // Only EXECUTING status
+        filters.put(DBConstants.ExperimentSummary.EXPERIMENT_STATUS, ExperimentState.EXECUTING.name());
+        experimentSummaryModelList = experimentSummaryRepository.searchAllAccessibleExperiments(
+                                allExperimentIds, filters, -1, 0,
+                                DBConstants.Experiment.CREATION_TIME, ResultOrderType.ASC);
+        assertEquals("should return only one EXECUTING exp", 1, experimentSummaryModelList.size());
+        assertEquals(experimentIdTwo, experimentSummaryModelList.get(0).getExperimentId());
+
         // Experiment 2 is EXECUTING and should be the only one returned
         experimentStatistics = experimentSummaryRepository.getAccessibleExperimentStatistics(Collections.singletonList(experimentIdTwo), filters);
         assertTrue(experimentStatistics.getAllExperimentCount() == 1);