From 40e66149b39281a24074b070314e473125244221 Mon Sep 17 00:00:00 2001 From: Daniel Widdis Date: Fri, 27 Dec 2024 11:35:00 -0800 Subject: [PATCH] Fix some CI Signed-off-by: Daniel Widdis --- .github/workflows/test_bwc.yml | 16 ++++++++++++++++ .github/workflows/test_security.yml | 16 ++++++++++++++++ .../FlowFrameworkTenantAwareRestTestCase.java | 4 ++-- .../rest/RestWorkflowTenantAwareIT.java | 1 + 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_bwc.yml b/.github/workflows/test_bwc.yml index d5b31b7a5..247b0b184 100644 --- a/.github/workflows/test_bwc.yml +++ b/.github/workflows/test_bwc.yml @@ -20,6 +20,22 @@ jobs: runs-on: ubuntu-latest steps: + # TEMPORARY until this is on Maven + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: temurin + - name: Checkout Metadata Client + uses: actions/checkout@v4 + with: + repository: dbwiddis/opensearch-remote-metadata-sdk + ref: main + path: opensearch-remote-metadata-sdk + - name: Publish to maven local + working-directory: opensearch-remote-metadata-sdk + run: ./gradlew publishToMavenLocal + # end TEMPORARY code - name: Setup Java ${{ matrix.java }} uses: actions/setup-java@v4 with: diff --git a/.github/workflows/test_security.yml b/.github/workflows/test_security.yml index d3db98a00..9b36146c5 100644 --- a/.github/workflows/test_security.yml +++ b/.github/workflows/test_security.yml @@ -34,6 +34,22 @@ jobs: options: --user root steps: + # TEMPORARY until this is on Maven + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: temurin + - name: Checkout Metadata Client + uses: actions/checkout@v4 + with: + repository: dbwiddis/opensearch-remote-metadata-sdk + ref: main + path: opensearch-remote-metadata-sdk + - name: Publish to maven local + working-directory: opensearch-remote-metadata-sdk + run: ./gradlew publishToMavenLocal + # end TEMPORARY code - name: Checkout Flow Framework uses: actions/checkout@v3 - name: Setup Java ${{ matrix.java }} diff --git a/src/test/java/org/opensearch/flowframework/FlowFrameworkTenantAwareRestTestCase.java b/src/test/java/org/opensearch/flowframework/FlowFrameworkTenantAwareRestTestCase.java index 72126c8d5..c76ba6bb0 100644 --- a/src/test/java/org/opensearch/flowframework/FlowFrameworkTenantAwareRestTestCase.java +++ b/src/test/java/org/opensearch/flowframework/FlowFrameworkTenantAwareRestTestCase.java @@ -33,8 +33,8 @@ import static java.util.Collections.emptyMap; import static java.util.Collections.singletonList; import static org.opensearch.common.xcontent.XContentType.JSON; -import static org.opensearch.flowframework.common.CommonValue.*; -import static org.opensearch.flowframework.common.FlowFrameworkSettings.*; +import static org.opensearch.flowframework.common.CommonValue.TENANT_ID_HEADER; +import static org.opensearch.flowframework.common.FlowFrameworkSettings.FLOW_FRAMEWORK_MULTI_TENANCY_ENABLED; public abstract class FlowFrameworkTenantAwareRestTestCase extends FlowFrameworkRestTestCase { diff --git a/src/test/java/org/opensearch/flowframework/rest/RestWorkflowTenantAwareIT.java b/src/test/java/org/opensearch/flowframework/rest/RestWorkflowTenantAwareIT.java index ba9f3383e..5eea23fec 100644 --- a/src/test/java/org/opensearch/flowframework/rest/RestWorkflowTenantAwareIT.java +++ b/src/test/java/org/opensearch/flowframework/rest/RestWorkflowTenantAwareIT.java @@ -46,6 +46,7 @@ public void testWorkflowCRUD() throws Exception { response = makeRequest(tenantRequest, GET, WORKFLOW_PATH + workflowId); assertOK(response); map = responseToMap(response); + logger.error("DEBUG: " + map.toString()); assertEquals("noop", map.get("name")); if (multiTenancyEnabled) { assertEquals(tenantId, map.get(TENANT_ID_FIELD));