Skip to content

Fix group filters for dynamic builds - #3926

Open
jcfr wants to merge 1 commit into
Kitware:masterfrom
jcfr:jcfr/fix-dynamic-group-filter
Open

Fix group filters for dynamic builds#3926
jcfr wants to merge 1 commit into
Kitware:masterfrom
jcfr:jcfr/fix-dynamic-group-filter

Conversation

@jcfr

@jcfr jcfr commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Dynamic build rows are displayed under the target build group selected by their rule, but group-name filters were evaluated against the source build group.
This could return a row whose displayed group did not match the requested filter, while filtering for the displayed dynamic group could omit that row.

Apply group-name predicates to the dynamic rule's target group and continue applying all other predicates to the source build.

Implementation

For each dynamic build-group rule:

  • substitute the displayed target group for g.name predicates;
  • bind the target group name as a query parameter;
  • retain build name, site, date, and other filters on the source build.

Tests

Added a dedicated integration test using a Nightly source build and a Latest target group, with the rule constrained by parent group, site, and build name. It verifies that:

  • filtering for the source group does not leak a row displayed under the dynamic target group;
  • filtering for the target group returns the dynamic row;
  • an additional non-matching build-name filter still excludes the row.

The regression test fails without patching the controller and passes with this change.

Validation:

  • PHP style check
  • PHP static analysis
  • Full CTest suite: 279/279 tests passed

Dynamic build rows are displayed under the target group selected by their rule, but group-name filters were evaluated against the source build group. This could return rows under a group that did not match the requested filter.

Evaluate group-name predicates against the displayed dynamic group while retaining other predicates on the source build. Add a self-contained integration test covering filters for both source and dynamic groups.
@williamjallen

Copy link
Copy Markdown
Collaborator

@jcfr Thanks for this contribution.

I'm pretty confused about both the problem you're trying to solve and your current implementation. Can you provide an example demonstrating the behavior you're trying to address?

@jcfr

jcfr commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Here is a concrete example.

A build named demo-nightly-build is submitted to the Nightly group. A dynamic group named Latest Results has a rule selecting that same build, so without filters the build is legitimately displayed under both groups.

When filtering with Group Name = Nightly, the expected result is only the section displayed as Nightly. Before this change, CDash also returns the Latest Results section. Conversely, filtering for Latest Results returns nothing.

filtering with Group Name = Nightly

Before After
image image

Filtering for Latest Results

Before After
image image

In this demo, Latest Results is a dynamic build group of type Latest:

image

The underlying issue is that getDynamicBuilds() first selects the source build. The generated group-name predicate references g.name, which is the source group (Nightly). After that query, CDash labels the result with the dynamic rule’s target group (Latest Results).

As a result, the filter is evaluated against one group name while the response is displayed under another. This change evaluates group-name predicates against the dynamic target group, while retaining build name, site, date, and other predicates on the source build.

@jcfr

jcfr commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Next week, I will revisit the implementation to make the distinction between the source and displayed dynamic groups clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants