Skip to content

[TE-6238] Prepend ./ when collecting selectors for RSpec#573

Draft
nprizal wants to merge 1 commit into
mainfrom
naufan/te-6238/update-rspec-get-selectors
Draft

[TE-6238] Prepend ./ when collecting selectors for RSpec#573
nprizal wants to merge 1 commit into
mainfrom
naufan/te-6238/update-rspec-get-selectors

Conversation

@nprizal

@nprizal nprizal commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

RSpec's selector based splitting was sending selectors without RSpec's native ./ prefix, so they didn't match test.selector.primary on the Test Engine side. This meant test plans came back with no historical duration, since nothing matched.

GetSelectors() now prepends ./ to each discovered file, matching the format RSpec itself reports.

Context

Found this while testing selector based splitting for rspec in buildkite/buildkite (build) — the test plan came back without historical duration. test.selector.primary is currently set manually from the file name RSpec reports (see test_engine_helper.rb), which includes RSpec's ./ prefix, but bktec wasn't including it when requesting the plan.

The sentiment is that we want test.selector.primary to stay "pure", so we're not applying location prefix to selectors for splitting purposes, even though we still want to support location prefix for result reporting. This is discussed further in this doc.

Testing

Updated TestRspecGetSelectors to assert the ./ prefix is included.

@nprizal nprizal self-assigned this Jul 1, 2026
@nprizal nprizal marked this pull request as ready for review July 1, 2026 23:44
@nprizal nprizal requested a review from a team as a code owner July 1, 2026 23:44

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug fix with a focused test covering the changed RSpec selector format, and no API surface change beyond the selector values sent for RSpec splitting.

Want to dig deeper? The full session log is attached to this Buildkite build. Download the session file and open a new pi session with it:

Download the buildsworth logs from build 2203, then answer my questions about the findings.

@nprizal nprizal marked this pull request as draft July 2, 2026 02:33
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