[TE-6238] Prepend ./ when collecting selectors for RSpec#573
Draft
nprizal wants to merge 1 commit into
Draft
Conversation
There was a problem hiding this comment.
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.
gchan
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
RSpec's selector based splitting was sending selectors without RSpec's native
./prefix, so they didn't matchtest.selector.primaryon 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.primaryis currently set manually from the file name RSpec reports (see test_engine_helper.rb), which includes RSpec's./prefix, butbktecwasn't including it when requesting the plan.The sentiment is that we want
test.selector.primaryto 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
TestRspecGetSelectorsto assert the./prefix is included.