Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ List getSubsetOfExecutions(
@Query("executionIds") String executionIds,
@Query("limit") Integer limit,
@Query("statuses") String statuses,
@Query("expand") boolean expand);
@Query("expand") boolean expand,
@Query("includeNestedExecutions") boolean includeNestedExecutions);

@Headers("Accept: application/json")
@GET("/applications/{application}/pipelines/search")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
@RestController
public class ExecutionsController {

private OrcaServiceSelector orcaServiceSelector;
private final OrcaServiceSelector orcaServiceSelector;

@Autowired
public ExecutionsController(OrcaServiceSelector orcaServiceSelector) {
Expand Down Expand Up @@ -62,15 +62,23 @@ List getLatestExecutionsByConfigIds(
description =
"Expands each execution object in the resulting list. If this value is missing, it is defaulted to true.")
@RequestParam(value = "expand", defaultValue = "true")
boolean expand) {
boolean expand,
@Parameter(
description =
"Expands the pipeline refs to be real pipeline references AND the execution data. For backwards compliant calls when pipeline ref is turned on. Set to true or false lowercase as needed. Defaults to false or a property on fallback")
@RequestParam(
value = "includeNestedExecutions",
defaultValue = "${orca.defaults.includeNestedExecutionsByDefault:false}")
boolean includeNestedExecutions) {
if ((executionIds == null || executionIds.trim().isEmpty())
&& (pipelineConfigIds == null || pipelineConfigIds.trim().isEmpty())) {
return Collections.emptyList();
}

return orcaServiceSelector
.select()
.getSubsetOfExecutions(pipelineConfigIds, executionIds, limit, statuses, expand);
.getSubsetOfExecutions(
pipelineConfigIds, executionIds, limit, statuses, expand, includeNestedExecutions);
}

@Operation(
Expand Down
Loading