mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-23 21:04:39 -05:00
chore(execution): remove unused ExecutionRepository.update() method
This commit is contained in:
@@ -151,8 +151,6 @@ public interface ExecutionRepositoryInterface extends QueryBuilderInterface<Exec
|
||||
|
||||
Execution save(Execution execution);
|
||||
|
||||
Execution update(Execution execution);
|
||||
|
||||
default Function<String, String> sortMapping() throws IllegalArgumentException {
|
||||
return s -> s;
|
||||
}
|
||||
|
||||
@@ -619,22 +619,6 @@ public abstract class AbstractExecutionRepositoryTest {
|
||||
assertThat(result.stream().filter(executionCount -> executionCount.getNamespace().equals(NAMESPACE)).findFirst().get().getCount()).isEqualTo(14L);
|
||||
}
|
||||
|
||||
@Test
|
||||
protected void update() {
|
||||
var tenant = TestsUtils.randomTenant(this.getClass().getSimpleName());
|
||||
Execution execution = ExecutionFixture.EXECUTION_1(tenant);
|
||||
executionRepository.save(execution);
|
||||
|
||||
Label label = new Label("key", "value");
|
||||
Execution updated = execution.toBuilder().labels(List.of(label)).build();
|
||||
executionRepository.update(updated);
|
||||
|
||||
Optional<Execution> validation = executionRepository.findById(tenant, updated.getId());
|
||||
assertThat(validation.isPresent()).isTrue();
|
||||
assertThat(validation.get().getLabels().size()).isEqualTo(1);
|
||||
assertThat(validation.get().getLabels().getFirst()).isEqualTo(label);
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldFindLatestExecutionGivenState() {
|
||||
var tenant = TestsUtils.randomTenant(this.getClass().getSimpleName());
|
||||
@@ -1207,7 +1191,7 @@ inject(tenant);
|
||||
executionRepository.delete(savedB);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
protected void shouldFindExecutionByTrigger() {
|
||||
// GIVEN
|
||||
@@ -1215,7 +1199,7 @@ inject(tenant);
|
||||
Execution execution = ExecutionFixture.EXECUTION_1(tenant);
|
||||
|
||||
TriggerId trigger = TriggerId.of(execution.getTenantId(), execution.getNamespace(), execution.getFlowId(), "trigger");
|
||||
|
||||
|
||||
execution = execution
|
||||
.toBuilder()
|
||||
.trigger(ExecutionTrigger
|
||||
|
||||
@@ -829,21 +829,6 @@ public abstract class AbstractJdbcExecutionRepository extends AbstractJdbcCrudRe
|
||||
return Execution.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Execution update(Execution execution) {
|
||||
return this.jdbcRepository
|
||||
.getDslContextWrapper()
|
||||
.transactionResult(configuration -> {
|
||||
DSL.using(configuration)
|
||||
.update(this.jdbcRepository.getTable())
|
||||
.set(this.jdbcRepository.persistFields((execution)))
|
||||
.where(field("key").eq(execution.getId()))
|
||||
.execute();
|
||||
|
||||
return execution;
|
||||
});
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public Execution delete(Execution execution) {
|
||||
|
||||
Reference in New Issue
Block a user