From 21db7d0794366ef7efa9798de5f3b063d6a440b4 Mon Sep 17 00:00:00 2001 From: Gustavo Teixeira Date: Thu, 21 Sep 2023 17:10:15 -0300 Subject: [PATCH 1/5] Implement experiment run name update functionality Added functionality to update the name of an experiment run by modifying the methods in FutureExperimentRunServiceImpl and FutureExperimentRunDAO classes. The changes permit the updating of the experiment run name in the database. This functionality was implemented in response to the need for modification of experiment run details after their creation. Also, optimized the import statements in FutureExperimentRunDAO class for better readability and maintenance. --- .../experimentRun/FutureExperimentRunDAO.java | 125 +++++------------- .../FutureExperimentRunServiceImpl.java | 11 +- 2 files changed, 40 insertions(+), 96 deletions(-) diff --git a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java index 9a247fe5b8..615f2dad6d 100644 --- a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java +++ b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java @@ -1,67 +1,15 @@ package ai.verta.modeldb.experimentRun; -import ai.verta.common.Artifact; -import ai.verta.common.CodeVersion; -import ai.verta.common.KeyValue; -import ai.verta.common.KeyValueQuery; +import ai.verta.common.*; import ai.verta.common.ModelDBResourceEnum.ModelDBServiceResourceTypes; -import ai.verta.common.OperatorEnum; -import ai.verta.common.Pagination; -import ai.verta.common.ValueTypeEnum; -import ai.verta.modeldb.AddExperimentRunTags; -import ai.verta.modeldb.CloneExperimentRun; -import ai.verta.modeldb.CommitArtifactPart; -import ai.verta.modeldb.CommitMultipartArtifact; -import ai.verta.modeldb.CreateExperimentRun; -import ai.verta.modeldb.DeleteArtifact; -import ai.verta.modeldb.DeleteExperimentRunAttributes; -import ai.verta.modeldb.DeleteExperimentRunTags; -import ai.verta.modeldb.DeleteExperimentRuns; -import ai.verta.modeldb.DeleteHyperparameters; -import ai.verta.modeldb.DeleteMetrics; -import ai.verta.modeldb.DeleteObservations; -import ai.verta.modeldb.ExperimentRun; +import ai.verta.modeldb.*; import ai.verta.modeldb.ExperimentRun.Builder; -import ai.verta.modeldb.Feature; -import ai.verta.modeldb.FindExperimentRuns; -import ai.verta.modeldb.GetArtifacts; -import ai.verta.modeldb.GetAttributes; -import ai.verta.modeldb.GetCommittedArtifactParts; -import ai.verta.modeldb.GetDatasets; -import ai.verta.modeldb.GetExperimentRunCodeVersion; -import ai.verta.modeldb.GetExperimentRunsByDatasetVersionId; -import ai.verta.modeldb.GetExperimentRunsInExperiment; -import ai.verta.modeldb.GetHyperparameters; -import ai.verta.modeldb.GetMetrics; -import ai.verta.modeldb.GetObservations; -import ai.verta.modeldb.GetTags; -import ai.verta.modeldb.GetUrlForArtifact; -import ai.verta.modeldb.GetVersionedInput; -import ai.verta.modeldb.LogArtifacts; -import ai.verta.modeldb.LogAttributes; -import ai.verta.modeldb.LogDatasets; -import ai.verta.modeldb.LogEnvironment; -import ai.verta.modeldb.LogExperimentRunCodeVersion; -import ai.verta.modeldb.LogHyperparameters; -import ai.verta.modeldb.LogMetrics; -import ai.verta.modeldb.LogObservations; -import ai.verta.modeldb.LogVersionedInput; -import ai.verta.modeldb.ModelDBConstants; -import ai.verta.modeldb.ModelDBMessages; -import ai.verta.modeldb.Observation; -import ai.verta.modeldb.UpdateExperimentRunDescription; -import ai.verta.modeldb.VersioningEntry; import ai.verta.modeldb.common.CommonUtils; import ai.verta.modeldb.common.artifactStore.ArtifactStoreDAO; import ai.verta.modeldb.common.authservice.RoleServiceUtils; import ai.verta.modeldb.common.authservice.UACApisUtil; import ai.verta.modeldb.common.connections.UAC; -import ai.verta.modeldb.common.exceptions.AlreadyExistsException; -import ai.verta.modeldb.common.exceptions.InternalErrorException; -import ai.verta.modeldb.common.exceptions.InvalidArgumentException; -import ai.verta.modeldb.common.exceptions.ModelDBException; -import ai.verta.modeldb.common.exceptions.NotFoundException; -import ai.verta.modeldb.common.exceptions.PermissionDeniedException; +import ai.verta.modeldb.common.exceptions.*; import ai.verta.modeldb.common.futures.FutureExecutor; import ai.verta.modeldb.common.futures.FutureJdbi; import ai.verta.modeldb.common.futures.FutureUtil; @@ -71,50 +19,16 @@ import ai.verta.modeldb.common.subtypes.MapSubtypes; import ai.verta.modeldb.config.MDBConfig; import ai.verta.modeldb.entities.ExperimentRunEntity; -import ai.verta.modeldb.experimentRun.subtypes.ArtifactHandler; -import ai.verta.modeldb.experimentRun.subtypes.AttributeHandler; -import ai.verta.modeldb.experimentRun.subtypes.CodeVersionFromBlobHandler; -import ai.verta.modeldb.experimentRun.subtypes.CodeVersionHandler; -import ai.verta.modeldb.experimentRun.subtypes.CreateExperimentRunHandler; -import ai.verta.modeldb.experimentRun.subtypes.DatasetHandler; -import ai.verta.modeldb.experimentRun.subtypes.EnvironmentHandler; -import ai.verta.modeldb.experimentRun.subtypes.FeatureHandler; -import ai.verta.modeldb.experimentRun.subtypes.FilterPrivilegedDatasetsHandler; -import ai.verta.modeldb.experimentRun.subtypes.FilterPrivilegedVersionedInputsHandler; -import ai.verta.modeldb.experimentRun.subtypes.HyperparametersFromConfigHandler; -import ai.verta.modeldb.experimentRun.subtypes.KeyValueBaseHandler; -import ai.verta.modeldb.experimentRun.subtypes.ObservationHandler; -import ai.verta.modeldb.experimentRun.subtypes.PredicatesHandler; -import ai.verta.modeldb.experimentRun.subtypes.SortingHandler; -import ai.verta.modeldb.experimentRun.subtypes.TagsHandler; -import ai.verta.modeldb.experimentRun.subtypes.VersionInputHandler; +import ai.verta.modeldb.experimentRun.subtypes.*; import ai.verta.modeldb.utils.RdbmsUtils; import ai.verta.modeldb.versioning.BlobDAO; import ai.verta.modeldb.versioning.CommitDAO; import ai.verta.modeldb.versioning.EnvironmentBlob; import ai.verta.modeldb.versioning.RepositoryDAO; -import ai.verta.uac.Action; +import ai.verta.uac.*; import ai.verta.uac.Empty; -import ai.verta.uac.IsSelfAllowed; -import ai.verta.uac.ModelDBActionEnum; -import ai.verta.uac.ResourceType; -import ai.verta.uac.Resources; -import ai.verta.uac.ServiceEnum; import com.google.protobuf.Value; -import com.google.rpc.Code; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Calendar; -import java.util.Collections; -import java.util.Comparator; -import java.util.Date; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.UUID; +import java.util.*; import java.util.stream.Collectors; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -1519,8 +1433,7 @@ public InternalFuture getVersionedInputs(GetVersionedInput requ () -> { // Validate request parameter if (request.getDatasetVersionId().isEmpty()) { - throw new ModelDBException( - "DatasetVersion Id should not be empty", Code.INVALID_ARGUMENT); + throw new InvalidArgumentException("DatasetVersion Id should not be empty"); } }, executor); @@ -1876,4 +1789,28 @@ public void deleteLogVersionedInputs(Session session, List repoIds) { query.executeUpdate(); LOGGER.debug("ExperimentRun versioning deleted successfully"); } + + public InternalFuture updateExperimentRunName(UpdateExperimentRunName request) { + final var runId = request.getId(); + final var name = request.getName(); + final var now = Calendar.getInstance().getTimeInMillis(); + + return checkPermission( + Collections.singletonList(runId), ModelDBActionEnum.ModelDBServiceActions.UPDATE) + .thenCompose( + unused -> + jdbi.withHandle( + handle -> { + String updateQueryString = + "UPDATE experiment_run SET name=:name, date_updated=:date_updated WHERE id=:runId"; + handle + .createUpdate(updateQueryString) + .bind("name", name) + .bind("date_updated", now) + .bind("runId", runId) + .execute(); + return Empty.newBuilder().build(); + }), + executor); + } } diff --git a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunServiceImpl.java b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunServiceImpl.java index a5d03e0b3e..7d8f423631 100644 --- a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunServiceImpl.java +++ b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunServiceImpl.java @@ -218,8 +218,15 @@ public void getExperimentRunByName( public void updateExperimentRunName( UpdateExperimentRunName request, StreamObserver responseObserver) { - responseObserver.onError( - Status.UNIMPLEMENTED.withDescription(ModelDBMessages.UNIMPLEMENTED).asRuntimeException()); + try { + final var response = + futureExperimentRunDAO + .updateExperimentRunName(request) + .thenApply(unused -> UpdateExperimentRunName.Response.newBuilder().build(), executor); + FutureGrpc.ServerResponse(responseObserver, response, executor); + } catch (Exception e) { + CommonUtils.observeError(responseObserver, e); + } } @Override From b5f8c56039e9b341449604bdda6bafd6d7e64f9b Mon Sep 17 00:00:00 2001 From: Gustavo Teixeira Date: Thu, 21 Sep 2023 18:28:15 -0300 Subject: [PATCH 2/5] Update experiment run name functionality Implemented new methods updateModifiedTimestampV2 and updateVersionNumberV2 in FutureExperimentRunDAO for update operation of experiment run name. Refactored updateExperimentRunName method to use the new implementations. Optimal import statements also added as part of readability improvement. Aim is to provide efficient way of updating experiment run name after creation. --- .../experimentRun/FutureExperimentRunDAO.java | 47 +++++++++++++++---- .../FutureExperimentRunServiceImpl.java | 6 ++- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java index 615f2dad6d..05aded01a9 100644 --- a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java +++ b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java @@ -10,10 +10,7 @@ import ai.verta.modeldb.common.authservice.UACApisUtil; import ai.verta.modeldb.common.connections.UAC; import ai.verta.modeldb.common.exceptions.*; -import ai.verta.modeldb.common.futures.FutureExecutor; -import ai.verta.modeldb.common.futures.FutureJdbi; -import ai.verta.modeldb.common.futures.FutureUtil; -import ai.verta.modeldb.common.futures.InternalFuture; +import ai.verta.modeldb.common.futures.*; import ai.verta.modeldb.common.handlers.TagsHandlerBase; import ai.verta.modeldb.common.query.QueryFilterContext; import ai.verta.modeldb.common.subtypes.MapSubtypes; @@ -369,6 +366,8 @@ public InternalFuture> getTags(GetTags request) { .thenSupply(() -> tagsHandler.getTags(runId).toInternalFuture(), executor); } + // TODO: refactor all usages to use updateVersionNumberV2 + @Deprecated private InternalFuture updateModifiedTimestamp(String runId, Long now) { return jdbi.useHandle( handle -> { @@ -385,6 +384,24 @@ private InternalFuture updateModifiedTimestamp(String runId, Long now) { }); } + private Future updateModifiedTimestampV2(String runId, Long now) { + return jdbi.run( + handle -> { + try (var findQuery = + handle.createQuery("SELECT date_updated FROM experiment_run WHERE id=:run_id")) { + final var currentDateUpdated = findQuery.bind("run_id", runId).mapTo(Long.class).one(); + final var dateUpdated = Math.max(currentDateUpdated, now); + try (var updateQuery = + handle.createUpdate( + "update experiment_run set date_updated=:date_updated where id=:run_id")) { + updateQuery.bind("run_id", runId).bind("date_updated", dateUpdated).execute(); + } + } + }); + } + + // TODO: refactor all usages to use updateVersionNumberV2 + @Deprecated private InternalFuture updateVersionNumber(String erId) { return jdbi.useHandle( handle -> { @@ -396,6 +413,17 @@ private InternalFuture updateVersionNumber(String erId) { }); } + private Future updateVersionNumberV2(String erId) { + return jdbi.run( + handle -> { + try (var updateQuery = + handle.createUpdate( + "update experiment_run set version_number=(version_number + 1) where id=:er_id")) { + updateQuery.bind("er_id", erId).execute(); + } + }); + } + private InternalFuture getEntityPermissionBasedOnResourceTypes( List entityIds, ModelDBActionEnum.ModelDBServiceActions action, @@ -1790,16 +1818,17 @@ public void deleteLogVersionedInputs(Session session, List repoIds) { LOGGER.debug("ExperimentRun versioning deleted successfully"); } - public InternalFuture updateExperimentRunName(UpdateExperimentRunName request) { + public Future updateExperimentRunName(UpdateExperimentRunName request) { final var runId = request.getId(); final var name = request.getName(); final var now = Calendar.getInstance().getTimeInMillis(); return checkPermission( Collections.singletonList(runId), ModelDBActionEnum.ModelDBServiceActions.UPDATE) + .toFuture() .thenCompose( unused -> - jdbi.withHandle( + jdbi.run( handle -> { String updateQueryString = "UPDATE experiment_run SET name=:name, date_updated=:date_updated WHERE id=:runId"; @@ -1809,8 +1838,8 @@ public InternalFuture updateExperimentRunName(UpdateExperimentRunName req .bind("date_updated", now) .bind("runId", runId) .execute(); - return Empty.newBuilder().build(); - }), - executor); + })) + .thenCompose(unused -> updateModifiedTimestampV2(runId, now)) + .thenCompose(unused -> updateVersionNumberV2(runId)); } } diff --git a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunServiceImpl.java b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunServiceImpl.java index 7d8f423631..e5ee64b583 100644 --- a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunServiceImpl.java +++ b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunServiceImpl.java @@ -10,6 +10,7 @@ import ai.verta.modeldb.common.exceptions.InternalErrorException; import ai.verta.modeldb.common.exceptions.InvalidArgumentException; import ai.verta.modeldb.common.exceptions.NotFoundException; +import ai.verta.modeldb.common.futures.Future; import ai.verta.modeldb.common.futures.FutureExecutor; import ai.verta.modeldb.common.futures.FutureGrpc; import ai.verta.modeldb.common.futures.InternalFuture; @@ -222,8 +223,9 @@ public void updateExperimentRunName( final var response = futureExperimentRunDAO .updateExperimentRunName(request) - .thenApply(unused -> UpdateExperimentRunName.Response.newBuilder().build(), executor); - FutureGrpc.ServerResponse(responseObserver, response, executor); + .thenSupply(() -> Future.of(UpdateExperimentRunName.Response.getDefaultInstance())); + + FutureGrpc.serverResponse(responseObserver, response); } catch (Exception e) { CommonUtils.observeError(responseObserver, e); } From d3b53514963df90b5da594ca830d71592b52a4d5 Mon Sep 17 00:00:00 2001 From: Gustavo Teixeira Date: Thu, 21 Sep 2023 19:24:38 -0300 Subject: [PATCH 3/5] Add validation and tests for ExperimentRun's name update Added validation in FutureExperimentRunServiceImpl to ensure that the experiment run's name is not blank. An exception is thrown if a name argument isn't present when updating the experiment run's name. To ensure the proper implementation, added corresponding tests in ExperimentRunTest to verify correct results and the absence of any exceptions when the name is properly updated. Also tested the scenario when the name argument is missing. --- .../FutureExperimentRunServiceImpl.java | 8 +++++ .../ai/verta/modeldb/ExperimentRunTest.java | 34 +++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunServiceImpl.java b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunServiceImpl.java index e5ee64b583..d22691a2d8 100644 --- a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunServiceImpl.java +++ b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunServiceImpl.java @@ -1,5 +1,7 @@ package ai.verta.modeldb.experimentRun; +import static org.apache.commons.lang3.StringUtils.isBlank; + import ai.verta.common.CodeVersion; import ai.verta.common.KeyValueQuery; import ai.verta.common.OperatorEnum; @@ -220,6 +222,12 @@ public void updateExperimentRunName( UpdateExperimentRunName request, StreamObserver responseObserver) { try { + + if (isBlank(request.getName())) { + var errorMessage = "Name is not present"; + throw new InvalidArgumentException(errorMessage); + } + final var response = futureExperimentRunDAO .updateExperimentRunName(request) diff --git a/backend/server/src/test/java/ai/verta/modeldb/ExperimentRunTest.java b/backend/server/src/test/java/ai/verta/modeldb/ExperimentRunTest.java index 900c558502..9c4d54bcfe 100644 --- a/backend/server/src/test/java/ai/verta/modeldb/ExperimentRunTest.java +++ b/backend/server/src/test/java/ai/verta/modeldb/ExperimentRunTest.java @@ -7080,4 +7080,38 @@ public void logEnvironmentTest() { LOGGER.info("logEnvironment test stop................................"); } + + @Test + void shouldUpdateExperimentRunNameSuccessfully() { + var newName = "Run 007"; + + assertDoesNotThrow( + () -> + experimentRunServiceStub.updateExperimentRunName( + UpdateExperimentRunName.newBuilder() + .setId(experimentRun.getId()) + .setName(newName) + .build())); + + var foundExperimentRun = + experimentRunServiceStub + .getExperimentRunById( + GetExperimentRunById.newBuilder().setId(experimentRun.getId()).build()) + .getExperimentRun(); + + assertThat(foundExperimentRun).isNotNull(); + assertThat(foundExperimentRun.getName()).isEqualTo(newName); + } + + @Test + void shouldThrowExceptionWhenUpdateExperimentRunWithoutNameArgument() { + var exception = + assertThrows( + StatusRuntimeException.class, + () -> + experimentRunServiceStub.updateExperimentRunName( + UpdateExperimentRunName.newBuilder().setId(experimentRun.getId()).build())); + + assertThat(exception.getStatus().getDescription()).isEqualTo("Name is not present"); + } } From 3c3789a25840642269e1e57922b6bea84f91956a Mon Sep 17 00:00:00 2001 From: Gustavo Teixeira Date: Thu, 21 Sep 2023 19:37:41 -0300 Subject: [PATCH 4/5] Add versioning in ExperimentRun's name update Incremented the version number each time the name of the experiment run is updated. This enhancement was done to track the changes in the name over time. Removed unneeded methods `updateModifiedTimestampV2` and `updateVersionNumberV2` as the changes are handled within the `UPDATE` sql statement. Verified these changes in the `ExperimentRunTest` by asserting that the version number increases by one after a name update. --- .../experimentRun/FutureExperimentRunDAO.java | 39 +++---------------- .../ai/verta/modeldb/ExperimentRunTest.java | 8 ++++ 2 files changed, 14 insertions(+), 33 deletions(-) diff --git a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java index 05aded01a9..00927d5e6e 100644 --- a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java +++ b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java @@ -384,24 +384,6 @@ private InternalFuture updateModifiedTimestamp(String runId, Long now) { }); } - private Future updateModifiedTimestampV2(String runId, Long now) { - return jdbi.run( - handle -> { - try (var findQuery = - handle.createQuery("SELECT date_updated FROM experiment_run WHERE id=:run_id")) { - final var currentDateUpdated = findQuery.bind("run_id", runId).mapTo(Long.class).one(); - final var dateUpdated = Math.max(currentDateUpdated, now); - try (var updateQuery = - handle.createUpdate( - "update experiment_run set date_updated=:date_updated where id=:run_id")) { - updateQuery.bind("run_id", runId).bind("date_updated", dateUpdated).execute(); - } - } - }); - } - - // TODO: refactor all usages to use updateVersionNumberV2 - @Deprecated private InternalFuture updateVersionNumber(String erId) { return jdbi.useHandle( handle -> { @@ -413,17 +395,6 @@ private InternalFuture updateVersionNumber(String erId) { }); } - private Future updateVersionNumberV2(String erId) { - return jdbi.run( - handle -> { - try (var updateQuery = - handle.createUpdate( - "update experiment_run set version_number=(version_number + 1) where id=:er_id")) { - updateQuery.bind("er_id", erId).execute(); - } - }); - } - private InternalFuture getEntityPermissionBasedOnResourceTypes( List entityIds, ModelDBActionEnum.ModelDBServiceActions action, @@ -1831,15 +1802,17 @@ public Future updateExperimentRunName(UpdateExperimentRunName request) { jdbi.run( handle -> { String updateQueryString = - "UPDATE experiment_run SET name=:name, date_updated=:date_updated WHERE id=:runId"; + " UPDATE experiment_run " + + " SET name = :name, " + + " date_updated = :date_updated, " + + " version_number = (version_number + 1) " + + " WHERE id = :runId "; handle .createUpdate(updateQueryString) .bind("name", name) .bind("date_updated", now) .bind("runId", runId) .execute(); - })) - .thenCompose(unused -> updateModifiedTimestampV2(runId, now)) - .thenCompose(unused -> updateVersionNumberV2(runId)); + })); } } diff --git a/backend/server/src/test/java/ai/verta/modeldb/ExperimentRunTest.java b/backend/server/src/test/java/ai/verta/modeldb/ExperimentRunTest.java index 9c4d54bcfe..40890c5e31 100644 --- a/backend/server/src/test/java/ai/verta/modeldb/ExperimentRunTest.java +++ b/backend/server/src/test/java/ai/verta/modeldb/ExperimentRunTest.java @@ -7085,6 +7085,12 @@ public void logEnvironmentTest() { void shouldUpdateExperimentRunNameSuccessfully() { var newName = "Run 007"; + var previousExperimentRun = + experimentRunServiceStub + .getExperimentRunById( + GetExperimentRunById.newBuilder().setId(experimentRun.getId()).build()) + .getExperimentRun(); + assertDoesNotThrow( () -> experimentRunServiceStub.updateExperimentRunName( @@ -7101,6 +7107,8 @@ void shouldUpdateExperimentRunNameSuccessfully() { assertThat(foundExperimentRun).isNotNull(); assertThat(foundExperimentRun.getName()).isEqualTo(newName); + assertThat(foundExperimentRun.getVersionNumber()) + .isEqualTo(previousExperimentRun.getVersionNumber() + 1); } @Test From 5bb082665d59ca70b41a9df16016bfdb2588cd6c Mon Sep 17 00:00:00 2001 From: Gustavo Teixeira Date: Thu, 21 Sep 2023 19:39:36 -0300 Subject: [PATCH 5/5] removed deprecated --- .../ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java index 00927d5e6e..abafbc20d8 100644 --- a/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java +++ b/backend/server/src/main/java/ai/verta/modeldb/experimentRun/FutureExperimentRunDAO.java @@ -366,8 +366,6 @@ public InternalFuture> getTags(GetTags request) { .thenSupply(() -> tagsHandler.getTags(runId).toInternalFuture(), executor); } - // TODO: refactor all usages to use updateVersionNumberV2 - @Deprecated private InternalFuture updateModifiedTimestamp(String runId, Long now) { return jdbi.useHandle( handle -> {