-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ts] migrate root test dir to project refs #99148
[ts] migrate root test dir to project refs #99148
Conversation
One of the PRs failed with the error:
@spalger The fix was trivial 152bdda, but I wonder if TS can help us avoid similar usage in future? |
Unfortunately I don't think there is anything that TS can do to help us here. |
c9ec614
to
b254db2
Compare
This comment has been minimized.
This comment has been minimized.
2e88357
to
2dcb164
Compare
Pinging @elastic/kibana-operations (Team:Operations) |
Pinging @elastic/kibana-qa (Team:QA) |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - code reviewed only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM operations team changes
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
💔 Backport failed
To backport manually run: |
Co-authored-by: spalger <spalger@users.noreply.github.com>
While working on #98337 and exploring the possibility of colocating tests with plugins I'm running into an issue because the
test/
project isn't using project refs. This change wasn't simple, it required that we stop using class expressions as the return value of Service/PageObject providers.Unfortunately this is a pattern that we use throughout the FTR providers so I'm working on PRs that migrate us away from this pattern and to a new pattern where services extend a base
FtrService
class, which provides a constructor that exposes the other services viathis.ctx.getService('...')
andthis.ctx.getPageObjects([...])
. See the discussion here about other possibilities we considered and their trade offs: #99148 (comment)This approach seems to have the fewest trade offs:
this.ctx.getService()
to fetch other service handles mapping dependent types appropriatelythis.
to reference other services which were previously available without the prefixTo help educate people of the change and to make review of this pretty massive API change more manageable I broke up the services into many smaller PRs which specific teams reviewed. This PR now includes all the PageObjects and a handful of remaining services in one final step as the conflicts caused by breaking the PR up were really hard to deal with and I think info about this change is starting to spread naturally.
Reviewers note
The vast majority of changes are just extracting classes from providers and remapping access to services/pageObjects to properties on
this
. Viewing the changes side-by-side and without whitespace will help you see the changes in this PR for just what they are.