From 624c5740f7ac0b5661f1d88dcd0df6d283204be2 Mon Sep 17 00:00:00 2001 From: Holash Chand Date: Sun, 11 Aug 2024 11:36:20 +0530 Subject: [PATCH 1/4] Fixed view template issue for search --- .../java/dev/sunbirdrc/registry/helper/RegistryHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/registry/src/main/java/dev/sunbirdrc/registry/helper/RegistryHelper.java b/java/registry/src/main/java/dev/sunbirdrc/registry/helper/RegistryHelper.java index 951209f04..395d12110 100644 --- a/java/registry/src/main/java/dev/sunbirdrc/registry/helper/RegistryHelper.java +++ b/java/registry/src/main/java/dev/sunbirdrc/registry/helper/RegistryHelper.java @@ -370,7 +370,9 @@ private JsonNode searchEntity(JsonNode inputJson, ISearchService service, String ViewTemplate viewTemplate = viewTemplateManager.getViewTemplate(inputJson); if (viewTemplate != null) { ViewTransformer vTransformer = new ViewTransformer(); - resultNode.set(ENTITY_LIST, vTransformer.transform(viewTemplate, resultNode.get(ENTITY_LIST))); + String entityName = resultNode.fields().next().getKey(); + ObjectNode transformerInput = JsonNodeFactory.instance.objectNode().set(entityName, resultNode.get(entityName).get(ENTITY_LIST)); + ((ObjectNode) resultNode.get(entityName)).set(ENTITY_LIST, vTransformer.transform(viewTemplate, transformerInput).get(entityName)); } // Search is tricky to support LD. Needs a revisit here. logger.debug("searchEntity ends"); From 594b188a01878e7e66670c825c3bc893322dc12c Mon Sep 17 00:00:00 2001 From: Holash Chand Date: Tue, 13 Aug 2024 17:54:13 +0530 Subject: [PATCH 2/4] Enabled debug --- .github/workflows/maven.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1033e9f26..808f5cf2c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -32,11 +32,11 @@ jobs: - name: Check space before tests run: df -h # debug step -# - name: Setup upterm session -# uses: lhotari/action-upterm@v1 -# with: -# ## limits ssh access and adds the ssh public key for the user which triggered the workflow ie holashchand -# limit-access-to-actor: true + - name: Setup upterm session + uses: lhotari/action-upterm@v1 + with: + ## limits ssh access and adds the ssh public key for the user which triggered the workflow ie holashchand + limit-access-to-actor: true - name: Build and test run: make test - name: Check space after tests From 063313886180e85d0af64baa8ec6cab01ecd5fff Mon Sep 17 00:00:00 2001 From: Holash Chand Date: Tue, 13 Aug 2024 18:03:48 +0530 Subject: [PATCH 3/4] added docker-compose v1 --- .github/workflows/maven.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 808f5cf2c..40b5a75b4 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -32,6 +32,11 @@ jobs: - name: Check space before tests run: df -h # debug step + - name: Install Docker Compose 1.29.2-1 + run: | + curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + chmod +x /usr/local/bin/docker-compose + docker-compose --version - name: Setup upterm session uses: lhotari/action-upterm@v1 with: From a447f4c71bded51f139df95fa606c6d776f0a74b Mon Sep 17 00:00:00 2001 From: Holash Chand Date: Tue, 13 Aug 2024 18:05:58 +0530 Subject: [PATCH 4/4] Removed debug mode --- .github/workflows/maven.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 40b5a75b4..b6b1ddaad 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -37,11 +37,11 @@ jobs: curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose docker-compose --version - - name: Setup upterm session - uses: lhotari/action-upterm@v1 - with: - ## limits ssh access and adds the ssh public key for the user which triggered the workflow ie holashchand - limit-access-to-actor: true +# - name: Setup upterm session +# uses: lhotari/action-upterm@v1 +# with: +# ## limits ssh access and adds the ssh public key for the user which triggered the workflow ie holashchand +# limit-access-to-actor: true - name: Build and test run: make test - name: Check space after tests