Skip to content

[release] Read test filters from both release-test-filters and release-test-attr-regex-filters#56039

Merged
aslonnie merged 1 commit intomasterfrom
khluu/use_prev_metadata
Aug 28, 2025
Merged

[release] Read test filters from both release-test-filters and release-test-attr-regex-filters#56039
aslonnie merged 1 commit intomasterfrom
khluu/use_prev_metadata

Conversation

@khluu
Copy link
Copy Markdown
Contributor

@khluu khluu commented Aug 28, 2025

release-test-attr-regex-filters is the metadata being used in the input box for Release pipeline which we need to make it backward compatible still after adding release-test-filters

p
Signed-off-by: kevin <kevin@anyscale.com>
@khluu khluu requested a review from aslonnie August 28, 2025 07:46
@khluu khluu requested a review from a team as a code owner August 28, 2025 07:46
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds backward compatibility for test filters by reading from release-test-attr-regex-filters as a fallback to release-test-filters. The change is correct, but it continues a pattern of overwriting filters which can be problematic. I've added a comment with a suggestion to merge filters instead, which would make the filtering logic more robust and intuitive.

Comment on lines 193 to 200
if test_name_filter:
settings["test_filters"] = get_test_filters("name:" + test_name_filter)

test_filters = get_buildkite_prompt_value("release-test-filters")
test_filters = get_buildkite_prompt_value(
"release-test-filters"
) or get_buildkite_prompt_value("release-test-attr-regex-filters")
if test_filters:
settings["test_filters"] = get_test_filters(test_filters)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The current logic overwrites test_filters if multiple filter sources are provided (e.g., release-test-name and release-test-filters). This can lead to unexpected behavior if a user intends for the filters to be combined. For example, if release-test-name is set to 'test_A' and release-test-filters is set to 'team:core', only the 'team:core' filter will be applied. The filter on the test name will be lost.

While this overwriting pattern is also present in update_settings_from_environment, it would be more robust and less error-prone to merge the filters. This would allow for more complex and intuitive filtering.

I suggest refactoring this block to ensure filters are merged. The proposed change also handles potential string values for test_filters coming from update_settings_from_environment and improves code formatting for readability.

Suggested change
if test_name_filter:
settings["test_filters"] = get_test_filters("name:" + test_name_filter)
test_filters = get_buildkite_prompt_value("release-test-filters")
test_filters = get_buildkite_prompt_value(
"release-test-filters"
) or get_buildkite_prompt_value("release-test-attr-regex-filters")
if test_filters:
settings["test_filters"] = get_test_filters(test_filters)
# Ensure test_filters is a dictionary to allow merging.
if not isinstance(settings.get("test_filters"), dict):
settings["test_filters"] = get_test_filters(settings.get("test_filters") or "")
if test_name_filter:
settings["test_filters"].update(get_test_filters("name:" + test_name_filter))
test_filters_str = (
get_buildkite_prompt_value("release-test-filters")
or get_buildkite_prompt_value("release-test-attr-regex-filters")
)
if test_filters_str:
settings["test_filters"].update(get_test_filters(test_filters_str))

@ray-gardener ray-gardener bot added core Issues that should be addressed in Ray Core devprod release-test release test labels Aug 28, 2025
@aslonnie aslonnie added the go add ONLY when ready to merge, run all tests label Aug 28, 2025
@aslonnie aslonnie merged commit 2064742 into master Aug 28, 2025
5 checks passed
@aslonnie aslonnie deleted the khluu/use_prev_metadata branch August 28, 2025 16:59
tohtana pushed a commit to tohtana/ray that referenced this pull request Aug 29, 2025
…e-test-attr-regex-filters (ray-project#56039)

`release-test-attr-regex-filters` is the metadata being used in the
input box for Release pipeline which we need to make it backward
compatible still after adding `release-test-filters`

Signed-off-by: kevin <kevin@anyscale.com>
Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
tohtana pushed a commit to tohtana/ray that referenced this pull request Aug 29, 2025
…e-test-attr-regex-filters (ray-project#56039)

`release-test-attr-regex-filters` is the metadata being used in the
input box for Release pipeline which we need to make it backward
compatible still after adding `release-test-filters`

Signed-off-by: kevin <kevin@anyscale.com>
Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
gangsf pushed a commit to gangsf/ray that referenced this pull request Sep 2, 2025
…e-test-attr-regex-filters (ray-project#56039)

`release-test-attr-regex-filters` is the metadata being used in the
input box for Release pipeline which we need to make it backward
compatible still after adding `release-test-filters`

Signed-off-by: kevin <kevin@anyscale.com>
Signed-off-by: Gang Zhao <gang@gang-JQ62HD2C37.local>
sampan-s-nayak pushed a commit to sampan-s-nayak/ray that referenced this pull request Sep 8, 2025
…e-test-attr-regex-filters (ray-project#56039)

`release-test-attr-regex-filters` is the metadata being used in the
input box for Release pipeline which we need to make it backward
compatible still after adding `release-test-filters`

Signed-off-by: kevin <kevin@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
jugalshah291 pushed a commit to jugalshah291/ray_fork that referenced this pull request Sep 11, 2025
…e-test-attr-regex-filters (ray-project#56039)

`release-test-attr-regex-filters` is the metadata being used in the
input box for Release pipeline which we need to make it backward
compatible still after adding `release-test-filters`

Signed-off-by: kevin <kevin@anyscale.com>
Signed-off-by: jugalshah291 <shah.jugal291@gmail.com>
wyhong3103 pushed a commit to wyhong3103/ray that referenced this pull request Sep 12, 2025
…e-test-attr-regex-filters (ray-project#56039)

`release-test-attr-regex-filters` is the metadata being used in the
input box for Release pipeline which we need to make it backward
compatible still after adding `release-test-filters`

Signed-off-by: kevin <kevin@anyscale.com>
Signed-off-by: yenhong.wong <yenhong.wong@grabtaxi.com>
dstrodtman pushed a commit that referenced this pull request Oct 6, 2025
…e-test-attr-regex-filters (#56039)

`release-test-attr-regex-filters` is the metadata being used in the
input box for Release pipeline which we need to make it backward
compatible still after adding `release-test-filters`

Signed-off-by: kevin <kevin@anyscale.com>
Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
…e-test-attr-regex-filters (ray-project#56039)

`release-test-attr-regex-filters` is the metadata being used in the
input box for Release pipeline which we need to make it backward
compatible still after adding `release-test-filters`

Signed-off-by: kevin <kevin@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core devprod go add ONLY when ready to merge, run all tests release-test release test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants