Compare commits

...

2 Commits

Author SHA1 Message Date
Roman Acevedo
36da09f77e refactor: cleanup some warnings about @Deprecated not being useful 2025-09-19 17:14:42 +02:00
Roman Acevedo
64a418e0df refactor: cleanup CrudEvent warnins 2025-09-19 17:14:42 +02:00
5 changed files with 157 additions and 157 deletions

View File

@@ -759,12 +759,12 @@ public abstract class AbstractScheduler implements Scheduler {
var newExecution = execution.withTenantId(trigger.getTenantId());
try {
this.executionQueue.emit(newExecution);
this.executionEventPublisher.publishEvent(new CrudEvent<>(newExecution, CrudEventType.CREATE));
this.executionEventPublisher.publishEvent(CrudEvent.delete(newExecution));
} catch (QueueException e) {
try {
Execution failedExecution = newExecution.failedExecutionFromExecutor(e).getExecution().withState(State.Type.FAILED);
this.executionQueue.emit(failedExecution);
this.executionEventPublisher.publishEvent(new CrudEvent<>(failedExecution, CrudEventType.CREATE));
this.executionEventPublisher.publishEvent(CrudEvent.create(failedExecution));
} catch (QueueException ex) {
log.error("Unable to emit the execution", ex);
}

View File

@@ -424,20 +424,20 @@ public class ExecutionController {
public HttpResponse<?> deleteExecutionsByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the executions to include") @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A flow id filter") @Nullable @QueryValue String flowId,
@Deprecated @Parameter(description = "The start datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Deprecated @Parameter(description = "The end datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Deprecated @Parameter(description = "A time range filter relative to the current time", examples = {
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the executions to include", deprecated = true) @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A flow id filter", deprecated = true) @Nullable @QueryValue String flowId,
@Parameter(description = "The start datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Parameter(description = "The end datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Parameter(description = "A time range filter relative to the current time", examples = {
@ExampleObject(name = "Filter last 5 minutes", value = "PT5M"),
@ExampleObject(name = "Filter last 24 hours", value = "P1D")
}) @Nullable @QueryValue Duration timeRange,
@Deprecated @Parameter(description = "A state filter") @Nullable @QueryValue List<State.Type> state,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Deprecated @Parameter(description = "The trigger execution id") @Nullable @QueryValue String triggerExecutionId,
@Deprecated @Parameter(description = "A execution child filter") @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter,
}, deprecated = true) @Nullable @QueryValue Duration timeRange,
@Parameter(description = "A state filter", deprecated = true) @Nullable @QueryValue List<State.Type> state,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Parameter(description = "The trigger execution id", deprecated = true) @Nullable @QueryValue String triggerExecutionId,
@Parameter(description = "A execution child filter", deprecated = true) @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter,
@Parameter(description = "Whether to delete non-terminated executions") @Nullable @QueryValue(defaultValue = "false") Boolean includeNonTerminated,
@Parameter(description = "Whether to delete execution logs") @QueryValue(defaultValue = "true") Boolean deleteLogs,
@@ -599,7 +599,7 @@ public class ExecutionController {
}
executionQueue.emit(result);
eventPublisher.publishEvent(new CrudEvent<>(result, CrudEventType.CREATE));
eventPublisher.publishEvent(CrudEvent.create(result));
if (webhook.get().getWait()) {
var subscriberId = UUID.randomUUID().toString();
@@ -703,7 +703,7 @@ public class ExecutionController {
.ifPresent(propagator -> propagator.inject(Context.current(), executionWithInputs, ExecutionTextMapSetter.INSTANCE));
executionQueue.emit(executionWithInputs);
eventPublisher.publishEvent(new CrudEvent<>(executionWithInputs, CrudEventType.CREATE));
eventPublisher.publishEvent(CrudEvent.create(executionWithInputs));
if (!wait) {
return Mono.just(ExecutionResponse.fromExecution(
@@ -1002,20 +1002,20 @@ public class ExecutionController {
public HttpResponse<?> restartExecutionsByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the executions to include") @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A flow id filter") @Nullable @QueryValue String flowId,
@Deprecated @Parameter(description = "The start datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Deprecated @Parameter(description = "The end datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Deprecated @Parameter(description = "A time range filter relative to the current time", examples = {
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the executions to include", deprecated = true) @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A flow id filter", deprecated = true) @Nullable @QueryValue String flowId,
@Parameter(description = "The start datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Parameter(description = "The end datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Parameter(description = "A time range filter relative to the current time", examples = {
@ExampleObject(name = "Filter last 5 minutes", value = "PT5M"),
@ExampleObject(name = "Filter last 24 hours", value = "P1D")
}) @Nullable @QueryValue Duration timeRange,
@Deprecated @Parameter(description = "A state filter") @Nullable @QueryValue List<State.Type> state,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Deprecated @Parameter(description = "The trigger execution id") @Nullable @QueryValue String triggerExecutionId,
@Deprecated @Parameter(description = "A execution child filter") @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter
}, deprecated = true) @Nullable @QueryValue Duration timeRange,
@Parameter(description = "A state filter", deprecated = true) @Nullable @QueryValue List<State.Type> state,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Parameter(description = "The trigger execution id", deprecated = true) @Nullable @QueryValue String triggerExecutionId,
@Parameter(description = "A execution child filter", deprecated = true) @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter
) throws Exception {
filters = RequestUtils.getFiltersOrDefaultToLegacyMapping(
filters,
@@ -1245,20 +1245,20 @@ public class ExecutionController {
public HttpResponse<?> updateExecutionsStatusByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the executions to include") @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A flow id filter") @Nullable @QueryValue String flowId,
@Deprecated @Parameter(description = "The start datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Deprecated @Parameter(description = "The end datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Deprecated @Parameter(description = "A time range filter relative to the current time", examples = {
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the executions to include", deprecated = true) @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A flow id filter", deprecated = true) @Nullable @QueryValue String flowId,
@Parameter(description = "The start datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Parameter(description = "The end datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Parameter(description = "A time range filter relative to the current time", examples = {
@ExampleObject(name = "Filter last 5 minutes", value = "PT5M"),
@ExampleObject(name = "Filter last 24 hours", value = "P1D")
}) @Nullable @QueryValue Duration timeRange,
@Deprecated @Parameter(description = "A state filter") @Nullable @QueryValue List<State.Type> state,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Deprecated @Parameter(description = "The trigger execution id") @Nullable @QueryValue String triggerExecutionId,
@Deprecated @Parameter(description = "A execution child filter") @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter,
}, deprecated = true) @Nullable @QueryValue Duration timeRange,
@Parameter(description = "A state filter", deprecated = true) @Nullable @QueryValue List<State.Type> state,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Parameter(description = "The trigger execution id", deprecated = true) @Nullable @QueryValue String triggerExecutionId,
@Parameter(description = "A execution child filter", deprecated = true) @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter,
@Parameter(description = "The new state of the executions") @NotNull @QueryValue State.Type newStatus
) throws QueueException {
filters = RequestUtils.getFiltersOrDefaultToLegacyMapping(
@@ -1516,20 +1516,20 @@ public class ExecutionController {
public HttpResponse<?> resumeExecutionsByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the executions to include") @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A flow id filter") @Nullable @QueryValue String flowId,
@Deprecated @Parameter(description = "The start datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Deprecated @Parameter(description = "The end datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Deprecated @Parameter(description = "A time range filter relative to the current time", examples = {
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the executions to include", deprecated = true) @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A flow id filter", deprecated = true) @Nullable @QueryValue String flowId,
@Parameter(description = "The start datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Parameter(description = "The end datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Parameter(description = "A time range filter relative to the current time", examples = {
@ExampleObject(name = "Filter last 5 minutes", value = "PT5M"),
@ExampleObject(name = "Filter last 24 hours", value = "P1D")
}) @Nullable @QueryValue Duration timeRange,
@Deprecated @Parameter(description = "A state filter") @Nullable @QueryValue List<State.Type> state,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Deprecated @Parameter(description = "The trigger execution id") @Nullable @QueryValue String triggerExecutionId,
@Deprecated @Parameter(description = "A execution child filter") @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter
}, deprecated = true) @Nullable @QueryValue Duration timeRange,
@Parameter(description = "A state filter", deprecated = true) @Nullable @QueryValue List<State.Type> state,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Parameter(description = "The trigger execution id", deprecated = true) @Nullable @QueryValue String triggerExecutionId,
@Parameter(description = "A execution child filter", deprecated = true) @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter
) throws Exception {
filters = RequestUtils.getFiltersOrDefaultToLegacyMapping(
filters,
@@ -1625,20 +1625,20 @@ public class ExecutionController {
public HttpResponse<?> pauseExecutionsByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the executions to include") @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A flow id filter") @Nullable @QueryValue String flowId,
@Deprecated @Parameter(description = "The start datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Deprecated @Parameter(description = "The end datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Deprecated @Parameter(description = "A time range filter relative to the current time", examples = {
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the executions to include", deprecated = true) @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A flow id filter", deprecated = true) @Nullable @QueryValue String flowId,
@Parameter(description = "The start datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Parameter(description = "The end datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Parameter(description = "A time range filter relative to the current time", examples = {
@ExampleObject(name = "Filter last 5 minutes", value = "PT5M"),
@ExampleObject(name = "Filter last 24 hours", value = "P1D")
}) @Nullable @QueryValue Duration timeRange,
@Deprecated @Parameter(description = "A state filter") @Nullable @QueryValue List<State.Type> state,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Deprecated @Parameter(description = "The trigger execution id") @Nullable @QueryValue String triggerExecutionId,
@Deprecated @Parameter(description = "A execution child filter") @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter
}, deprecated = true) @Nullable @QueryValue Duration timeRange,
@Parameter(description = "A state filter", deprecated = true) @Nullable @QueryValue List<State.Type> state,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Parameter(description = "The trigger execution id", deprecated = true) @Nullable @QueryValue String triggerExecutionId,
@Parameter(description = "A execution child filter", deprecated = true) @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter
) throws Exception {
filters = RequestUtils.getFiltersOrDefaultToLegacyMapping(
filters,
@@ -1669,20 +1669,20 @@ public class ExecutionController {
public HttpResponse<?> killExecutionsByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the executions to include") @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A flow id filter") @Nullable @QueryValue String flowId,
@Deprecated @Parameter(description = "The start datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Deprecated @Parameter(description = "The end datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Deprecated @Parameter(description = "A time range filter relative to the current time", examples = {
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the executions to include", deprecated = true) @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A flow id filter", deprecated = true) @Nullable @QueryValue String flowId,
@Parameter(description = "The start datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Parameter(description = "The end datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Parameter(description = "A time range filter relative to the current time", examples = {
@ExampleObject(name = "Filter last 5 minutes", value = "PT5M"),
@ExampleObject(name = "Filter last 24 hours", value = "P1D")
}) @Nullable @QueryValue Duration timeRange,
@Deprecated @Parameter(description = "A state filter") @Nullable @QueryValue List<State.Type> state,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Deprecated @Parameter(description = "The trigger execution id") @Nullable @QueryValue String triggerExecutionId,
@Deprecated @Parameter(description = "A execution child filter") @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter
}, deprecated = true) @Nullable @QueryValue Duration timeRange,
@Parameter(description = "A state filter", deprecated = true) @Nullable @QueryValue List<State.Type> state,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Parameter(description = "The trigger execution id", deprecated = true) @Nullable @QueryValue String triggerExecutionId,
@Parameter(description = "A execution child filter", deprecated = true) @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter
) throws QueueException {
filters = RequestUtils.getFiltersOrDefaultToLegacyMapping(
filters,
@@ -1713,20 +1713,20 @@ public class ExecutionController {
public HttpResponse<?> replayExecutionsByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the executions to include") @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A flow id filter") @Nullable @QueryValue String flowId,
@Deprecated @Parameter(description = "The start datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Deprecated @Parameter(description = "The end datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Deprecated @Parameter(description = "A time range filter relative to the current time", examples = {
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the executions to include", deprecated = true) @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A flow id filter", deprecated = true) @Nullable @QueryValue String flowId,
@Parameter(description = "The start datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Parameter(description = "The end datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Parameter(description = "A time range filter relative to the current time", examples = {
@ExampleObject(name = "Filter last 5 minutes", value = "PT5M"),
@ExampleObject(name = "Filter last 24 hours", value = "P1D")
}) @Nullable @QueryValue Duration timeRange,
@Deprecated @Parameter(description = "A state filter") @Nullable @QueryValue List<State.Type> state,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Deprecated @Parameter(description = "The trigger execution id") @Nullable @QueryValue String triggerExecutionId,
@Deprecated @Parameter(description = "A execution child filter") @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter,
}, deprecated = true) @Nullable @QueryValue Duration timeRange,
@Parameter(description = "A state filter", deprecated = true) @Nullable @QueryValue List<State.Type> state,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Parameter(description = "The trigger execution id", deprecated = true) @Nullable @QueryValue String triggerExecutionId,
@Parameter(description = "A execution child filter", deprecated = true) @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter,
@Parameter(description = "If latest revision should be used") @Nullable @QueryValue(defaultValue = "false") Boolean latestRevision
) throws Exception {
@@ -2016,20 +2016,20 @@ public class ExecutionController {
public HttpResponse<?> setLabelsOnTerminatedExecutionsByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the executions to include") @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A flow id filter") @Nullable @QueryValue String flowId,
@Deprecated @Parameter(description = "The start datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Deprecated @Parameter(description = "The end datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Deprecated @Parameter(description = "A time range filter relative to the current time", examples = {
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the executions to include", deprecated = true) @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A flow id filter", deprecated = true) @Nullable @QueryValue String flowId,
@Parameter(description = "The start datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Parameter(description = "The end datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Parameter(description = "A time range filter relative to the current time", examples = {
@ExampleObject(name = "Filter last 5 minutes", value = "PT5M"),
@ExampleObject(name = "Filter last 24 hours", value = "P1D")
}) @Nullable @QueryValue Duration timeRange,
@Deprecated @Parameter(description = "A state filter") @Nullable @QueryValue List<State.Type> state,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Deprecated @Parameter(description = "The trigger execution id") @Nullable @QueryValue String triggerExecutionId,
@Deprecated @Parameter(description = "A execution child filter") @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter,
}, deprecated = true) @Nullable @QueryValue Duration timeRange,
@Parameter(description = "A state filter") @Nullable @QueryValue List<State.Type> state,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Parameter(description = "The trigger execution id", deprecated = true) @Nullable @QueryValue String triggerExecutionId,
@Parameter(description = "A execution child filter", deprecated = true) @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter,
@RequestBody(description = "The labels to add to the execution") @Body @NotNull @Valid List<Label> setLabels
) {
@@ -2133,21 +2133,21 @@ public class ExecutionController {
public HttpResponse<?> unqueueExecutionsByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the executions to include") @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A flow id filter") @Nullable @QueryValue String flowId,
@Deprecated @Parameter(description = "The start datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Deprecated @Parameter(description = "The end datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Deprecated @Parameter(description = "A time range filter relative to the current time", examples = {
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the executions to include", deprecated = true) @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A flow id filter", deprecated = true) @Nullable @QueryValue String flowId,
@Parameter(description = "The start datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Parameter(description = "The end datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Parameter(description = "A time range filter relative to the current time", examples = {
@ExampleObject(name = "Filter last 5 minutes", value = "PT5M"),
@ExampleObject(name = "Filter last 24 hours", value = "P1D")
}) @Nullable @QueryValue Duration timeRange,
@Deprecated @Parameter(description = "A state filter") @Nullable @QueryValue List<State.Type> state,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Deprecated @Parameter(description = "The trigger execution id") @Nullable @QueryValue String triggerExecutionId,
@Deprecated @Parameter(description = "A execution child filter") @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter,
@Parameter(description = "The new state of the unqueued executions") @Nullable @QueryValue State.Type newState
@Parameter(description = "A state filter", deprecated = true) @Nullable @QueryValue List<State.Type> state,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Parameter(description = "The trigger execution id", deprecated = true) @Nullable @QueryValue String triggerExecutionId,
@Parameter(description = "A execution child filter", deprecated = true) @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter,
@Parameter(description = "The new state of the unqueued executions", deprecated = true) @Nullable @QueryValue State.Type newState
) throws Exception {
filters = RequestUtils.getFiltersOrDefaultToLegacyMapping(
filters,
@@ -2247,20 +2247,20 @@ public class ExecutionController {
public HttpResponse<?> forceRunExecutionsByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the executions to include") @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A flow id filter") @Nullable @QueryValue String flowId,
@Deprecated @Parameter(description = "The start datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Deprecated @Parameter(description = "The end datetime") @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Deprecated @Parameter(description = "A time range filter relative to the current time", examples = {
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the executions to include", deprecated = true) @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A flow id filter", deprecated = true) @Nullable @QueryValue String flowId,
@Parameter(description = "The start datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime startDate,
@Parameter(description = "The end datetime", deprecated = true) @Nullable @Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") @QueryValue ZonedDateTime endDate,
@Parameter(description = "A time range filter relative to the current time", examples = {
@ExampleObject(name = "Filter last 5 minutes", value = "PT5M"),
@ExampleObject(name = "Filter last 24 hours", value = "P1D")
}) @Nullable @QueryValue Duration timeRange,
@Deprecated @Parameter(description = "A state filter") @Nullable @QueryValue List<State.Type> state,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Deprecated @Parameter(description = "The trigger execution id") @Nullable @QueryValue String triggerExecutionId,
@Deprecated @Parameter(description = "A execution child filter") @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter
}, deprecated = true) @Nullable @QueryValue Duration timeRange,
@Parameter(description = "A state filter", deprecated = true) @Nullable @QueryValue List<State.Type> state,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Parameter(description = "The trigger execution id", deprecated = true) @Nullable @QueryValue String triggerExecutionId,
@Parameter(description = "A execution child filter", deprecated = true) @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter
) throws Exception {
filters = RequestUtils.getFiltersOrDefaultToLegacyMapping(
filters,

View File

@@ -231,10 +231,10 @@ public class FlowController {
@Parameter(description = "The sort of current page") @Nullable @QueryValue List<String> sort,
@Parameter(description = "Filters") @QueryFilterFormat() List<QueryFilter> filters,
// Deprecated params
@Deprecated @Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the flows to include", deprecated = true) @Nullable @QueryValue List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the flows to include", deprecated = true) @Nullable @QueryValue List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels
) throws HttpStatusException {
filters = mapLegacyQueryParamsToNewFilters(filters, query, scope, namespace, labels);
@@ -263,7 +263,7 @@ public class FlowController {
@Parameter(description = "The current page") @QueryValue(defaultValue = "1") @Min(1) int page,
@Parameter(description = "The current page size") @QueryValue(defaultValue = "10") @Min(1) int size,
@Parameter(description = "The sort of current page") @Nullable @QueryValue List<String> sort,
@Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace
) throws HttpStatusException {
return PagedResults.of(flowRepository.findSourceCode(PageableUtils.from(page, size, sort), query, tenantService.resolveTenant(), namespace));
@@ -587,7 +587,7 @@ public class FlowController {
@Get(uri = "distinct-namespaces")
@Operation(tags = {"Flows"}, summary = "List all distinct namespaces")
public List<String> listDistinctNamespaces(
@Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query
) {
return flowRepository.findDistinctNamespace(tenantService.resolveTenant(), query);
}
@@ -711,10 +711,10 @@ public class FlowController {
public HttpResponse<byte[]> exportFlowsByQuery(
@Parameter(description = "Filters") @QueryFilterFormat() List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the flows to include") @Nullable @QueryValue List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the flows to include") @Nullable @QueryValue List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels
) throws IOException {
filters = mapLegacyQueryParamsToNewFilters(filters, query, scope, namespace, labels);
@@ -749,10 +749,10 @@ public class FlowController {
public HttpResponse<BulkResponse> deleteFlowsByQuery(
@Parameter(description = "Filters") @QueryFilterFormat() List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the flows to include") @Nullable @QueryValue List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the flows to include") @Nullable @QueryValue List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels
) {
filters = mapLegacyQueryParamsToNewFilters(filters, query, scope, namespace, labels);
@@ -792,10 +792,10 @@ public class FlowController {
public HttpResponse<BulkResponse> disableFlowsByQuery(
@Parameter(description = "Filters") @QueryFilterFormat() List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the flows to include") @Nullable @QueryValue List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the flows to include") @Nullable @QueryValue List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels
) {
filters = mapLegacyQueryParamsToNewFilters(filters, query, scope, namespace, labels);
@@ -824,10 +824,10 @@ public class FlowController {
public HttpResponse<BulkResponse> enableFlowsByQuery(
@Parameter(description = "Filters") @QueryFilterFormat() List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "The scope of the flows to include") @Nullable @QueryValue List<FlowScope> scope,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Deprecated @Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the flows to include") @Nullable @QueryValue List<FlowScope> scope,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "A labels filter as a list of 'key:value'", deprecated = true) @Nullable @QueryValue @Format("MULTI") List<String> labels
) {
filters = mapLegacyQueryParamsToNewFilters(filters, query, scope, namespace, labels);

View File

@@ -124,7 +124,7 @@ public class NamespaceController<N extends Namespace> {
@ExecuteOn(TaskExecutors.IO)
@Operation(tags = {"Namespaces"}, summary = "Search for namespaces")
public PagedResults<N> searchNamespaces(
@Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The current page") @QueryValue(defaultValue = "1") @Min(1) int page,
@Parameter(description = "The current page size") @QueryValue(defaultValue = "10") @Min(1) int size,
@Parameter(description = "The sort of current page") @Nullable @QueryValue List<String> sort,

View File

@@ -207,8 +207,8 @@ public class TriggerController {
public MutableHttpResponse<?> unlockTriggersByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace
) {
filters = RequestUtils.getFiltersOrDefaultToLegacyMapping(
filters,
@@ -394,8 +394,8 @@ public class TriggerController {
public MutableHttpResponse<?> pauseBackfillByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace
) throws QueueException {
// Updating the backfill within the flux does not works
List<Trigger> triggers = triggerRepository
@@ -433,8 +433,8 @@ public class TriggerController {
public MutableHttpResponse<?> unpauseBackfillByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace
) throws QueueException {
filters = RequestUtils.getFiltersOrDefaultToLegacyMapping(
filters,
@@ -502,8 +502,8 @@ public class TriggerController {
public MutableHttpResponse<?> deleteBackfillByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace
) throws QueueException {
filters = RequestUtils.getFiltersOrDefaultToLegacyMapping(
filters,
@@ -546,8 +546,8 @@ public class TriggerController {
public MutableHttpResponse<?> disabledTriggersByQuery(
@Parameter(description = "Filters") @QueryFilterFormat List<QueryFilter> filters,
@Deprecated @Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Deprecated @Parameter(description = "A namespace filter prefix") @Nullable @QueryValue String namespace,
@Parameter(description = "A string filter", deprecated = true) @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "A namespace filter prefix", deprecated = true) @Nullable @QueryValue String namespace,
@Parameter(description = "The disabled state") @QueryValue(defaultValue = "true") Boolean disabled
) throws QueueException {