Skip to content

Fix misleading error for empty adaptive subsets#1292

Merged
ono-max merged 2 commits intov1from
fix-err-msg
Apr 30, 2026
Merged

Fix misleading error for empty adaptive subsets#1292
ono-max merged 2 commits intov1from
fix-err-msg

Conversation

@ono-max
Copy link
Copy Markdown
Contributor

@ono-max ono-max commented Apr 22, 2026

Adaptive Dynamic Subset can return an empty subset when the model decides no tests in that suite are relevant to the code change.

Until now, the CLI treated any empty subset as:

Error: no tests found matching the path.

That's confusing for users even though that empty subset is valid. I got this feedback from users, so I'd like to fix this problem.

Comment thread launchable/commands/subset.py Outdated
Comment on lines +629 to +633
if len(subset_result.rest) == 0:
warn_and_exit_if_fail_fast_mode("Error: no tests found matching the path.")
return
else:
click.echo(click.style("No tests were selected for this code change.", fg="yellow"), err=True)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Konboi

What do you think about this change?

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.

If this kind of use case exists, it can’t really be helped, can it?
That said, I don’t think this would come up in normal scenarios. If we want to be safer, we could limit it to cases where the adaptive dynamic subset is enabled.
Alternatively, we could add a comment noting that this issue may occur when using the adaptive dynamic subset.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Updated based on your suggestion: e499c91

Copy link
Copy Markdown
Contributor

@Konboi Konboi left a comment

Choose a reason for hiding this comment

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

I left a comment however not to block your progress, I'll approve this PR

@ono-max ono-max merged commit 9ae5d7d into v1 Apr 30, 2026
13 checks passed
@ono-max ono-max deleted the fix-err-msg branch April 30, 2026 06:58
@github-actions github-actions Bot mentioned this pull request Apr 30, 2026
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