@ExecuteOn(TaskExecutors.IO)
    @Delete(uri = "logs/{executionId}")
    @Operation(tags = {"Logs"}, summary = "Delete logs for a specific execution, taskrun or task")
    public void delete(
        @Parameter(description = "The execution id") @PathVariable String executionId,
        @Parameter(description = "The min log level filter") @Nullable @QueryValue Level minLevel,
        @Parameter(description = "The taskrun id") @Nullable @QueryValue String taskRunId,
        @Parameter(description = "The task id") @Nullable @QueryValue String taskId,
        @Parameter(description = "The attempt number") @Nullable @QueryValue Integer attempt
    ) {
        logRepository.deleteByQuery(tenantService.resolveTenant(), executionId, taskId, taskRunId, minLevel, attempt);
    }
@Test
    void deleteByQuery() {
        LogEntry log1 = logEntry(Level.INFO);
        LogEntry log2 = log1.toBuilder().message("another message").build();
        LogEntry log3 = logEntry(Level.DEBUG);
        logRepository.save(log1);
        logRepository.save(log2);
        logRepository.save(log3);

        HttpResponse<?> delete = client.toBlocking().exchange(
            HttpRequest.DELETE("/api/v1/logs/" + log1.getNamespace() + "/" + log1.getFlowId())
        );
        assertThat(delete.getStatus(), is(HttpStatus.OK));

        List<LogEntry> logs = client.toBlocking().retrieve(
            HttpRequest.GET("/api/v1/logs/" + log1.getExecutionId()),
            Argument.of(List.class, LogEntry.class)
        );
        assertThat(logs.size(), is(0));
    }