diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-modelManager-sdlc/src/test/java/org/finos/legend/engine/language/pure/modelManager/sdlc/TestSDLCLoader.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-modelManager-sdlc/src/test/java/org/finos/legend/engine/language/pure/modelManager/sdlc/TestSDLCLoader.java index 69259cf3dc2..ebf7cb8cbf5 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-modelManager-sdlc/src/test/java/org/finos/legend/engine/language/pure/modelManager/sdlc/TestSDLCLoader.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-modelManager-sdlc/src/test/java/org/finos/legend/engine/language/pure/modelManager/sdlc/TestSDLCLoader.java @@ -58,6 +58,8 @@ public class TestSDLCLoader private static final MockTracer tracer = new MockTracer(); + private static final String CLIENT_VERSION = "v1_33_0"; + @BeforeClass public static void setUpClass() { @@ -85,7 +87,7 @@ public void testSdlcLoaderRetriesOnSomeHttpResponses() throws Exception configureWireMockForRetries(); SDLCLoader sdlcLoader = createSDLCLoader(); - PureModelContextData pmcdLoaded = sdlcLoader.load(Lists.fixedSize.empty(), pointer, "v1_32_0", tracer.activeSpan()); + PureModelContextData pmcdLoaded = sdlcLoader.load(Lists.fixedSize.empty(), pointer, CLIENT_VERSION, tracer.activeSpan()); Assert.assertNotNull(pmcdLoaded); Object tries = tracer.finishedSpans() @@ -109,7 +111,7 @@ public void testSdlcLoaderDoesNotRetryOnHardFailures() throws Exception try { - sdlcLoader.load(Lists.fixedSize.empty(), pointer, "v1_32_0", tracer.activeSpan()); + sdlcLoader.load(Lists.fixedSize.empty(), pointer, CLIENT_VERSION, tracer.activeSpan()); Assert.fail("Should throw"); } catch (EngineException e) @@ -131,7 +133,7 @@ public void testSdlcLoaderForWorkspacesWithoutDependency() throws Exception configureWireMockForRetries(); SDLCLoader sdlcLoader = createSDLCLoader(); - PureModelContextData pmcdLoaded = sdlcLoader.load(Lists.fixedSize.empty(), pointer, "v1_32_0", tracer.activeSpan()); + PureModelContextData pmcdLoaded = sdlcLoader.load(Lists.fixedSize.empty(), pointer, CLIENT_VERSION, tracer.activeSpan()); Assert.assertNotNull(pmcdLoaded); Assert.assertEquals(1, pmcdLoaded.getElements().size()); Assert.assertEquals("pkg::pkg::myClass", pmcdLoaded.getElements().get(0).getPath()); @@ -153,7 +155,7 @@ public void testSdlcLoaderForWorkspacesWithDependency() throws Exception ModelManager modelManager = new ModelManager(DeploymentMode.TEST, tracer, sdlcLoader); - PureModelContextData pmcdLoaded = modelManager.loadData(pointer, "v1_32_0", Lists.fixedSize.empty()); + PureModelContextData pmcdLoaded = modelManager.loadData(pointer, CLIENT_VERSION, Lists.fixedSize.empty()); Assert.assertNotNull(pmcdLoaded); Assert.assertEquals(2, pmcdLoaded.getElements().size()); @@ -204,19 +206,19 @@ private static void configureWireMockForRetries() throws JsonProcessingException PureModelContextData data = PureModelContextData.newPureModelContextData(new Protocol(), new PureModelContextPointer(), Lists.fixedSize.empty()); String pmcdJson = objectMapper.writeValueAsString(data); - WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion=v1_32_0") + WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion=" + CLIENT_VERSION) .inScenario("RETRY_FAILURES") .whenScenarioStateIs(Scenario.STARTED) .willReturn(WireMock.aResponse().withStatus(503).withBody("a failure")) .willSetStateTo("FAILED_1")); - WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion=v1_32_0") + WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion=" + CLIENT_VERSION) .inScenario("RETRY_FAILURES") .whenScenarioStateIs("FAILED_1") .willReturn(WireMock.aResponse().withStatus(503).withBody("a failure")) .willSetStateTo("FAILED_2")); - WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion=v1_32_0") + WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion=" + CLIENT_VERSION) .inScenario("RETRY_FAILURES") .whenScenarioStateIs("FAILED_2") .willReturn(WireMock.okJson(pmcdJson)) @@ -247,13 +249,13 @@ private static void configureWireMockForRetries() throws JsonProcessingException WireMock.stubFor(WireMock.get("/sdlc/api/projects/proj-1235/workspaces/workspaceAbc/revisions/HEAD/upstreamProjects") .willReturn(WireMock.okJson("[{\"projectId\": \"org.finos.legend.dependency:models\",\"versionId\": \"2.0.1\"}]"))); - WireMock.stubFor(WireMock.get("/alloy/projects/org.finos.legend.dependency/models/versions/2.0.1/pureModelContextData?clientVersion=v1_32_0") + WireMock.stubFor(WireMock.get("/alloy/projects/org.finos.legend.dependency/models/versions/2.0.1/pureModelContextData?clientVersion=" + CLIENT_VERSION) .willReturn(WireMock.okJson(pmcdJsonDep))); } private static void configureWireMockForNoRetries() throws JsonProcessingException { - WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion=v1_32_0") + WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion=" + CLIENT_VERSION) .willReturn(WireMock.aResponse().withStatus(400).withBody("a failure"))); } } diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/PureClientVersions.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/PureClientVersions.java index 5cd5f97d1da..5f722504544 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/PureClientVersions.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/PureClientVersions.java @@ -28,7 +28,7 @@ public class PureClientVersions assert !hasRepeatedVersions(versions) : "Repeated version id :" + versions.toBag().selectByOccurrences(i -> i > 1).toSet().makeString("[", ", ", "]"); } - public static String production = "v1_32_0"; + public static String production = "v1_33_0"; static boolean hasRepeatedVersions(ImmutableList versions) { diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/test/java/org/finos/legend/engine/protocol/test/TestProtocolUpdates.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/test/java/org/finos/legend/engine/protocol/test/TestProtocolUpdates.java index 550f911bbc6..6b4fbb5a5e2 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/test/java/org/finos/legend/engine/protocol/test/TestProtocolUpdates.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/test/java/org/finos/legend/engine/protocol/test/TestProtocolUpdates.java @@ -24,6 +24,6 @@ public class TestProtocolUpdates public void testProductionProtocolVersion() { String productionProtocolVersion = PureClientVersions.production; - Assert.assertEquals("v1_32_0", productionProtocolVersion); + Assert.assertEquals("v1_33_0", productionProtocolVersion); } }