-
Notifications
You must be signed in to change notification settings - Fork 20
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
chore: update dependency @elastic/synthetics and Playwright #285
Conversation
26762d3
to
86fff83
Compare
86fff83
to
c2ea3de
Compare
/test |
/test all |
ec8a1fa
to
d76501f
Compare
5c91e17
to
9b58314
Compare
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.
Did a first pass of the code, Looks great 🎉
I will try to run and test locally.
README.md
Outdated
await page2.click(':nth-match(a:has-text("babel-minify"), 3)'); | ||
await page2.close(); | ||
}); | ||
2. Confirm the Playwright version from Synthetics agent's `package.json`, we will refer it as `v${NEW_VERSION}`. Checkout to `NEW_VERSION` tag, and create a new branch from there: |
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.
This is confusing and assumes Synthetics agent PW version with the branch version which is not we are doing with the rebasing. Instead it would be the latest version of Microsoft playwright that was released.
I do understand the intention here that we can keep a versioning scheme, But then we would have to assume the synthetics agent is always updated to the PW latest version.
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.
We might need to sync on this, but maybe we have a different approach on this.
Are you saying that the recorder should use the latest PW (let's say 1.24
or even higher that is not released) whereas the synthetics agent uses an older version(1.20.1 as of today)? I thought the intention was to use the same version of the playwright on both sides so we don't have any surprises.
For this PR what I did was:
- fetch
main
from upstream (PW latest version is 1.25.0-next) - create a dev branch that is sync up with the main and an extra commit with the modification for the recorder
- Synthetics agent is using 1.20.1, so I checkout to
v1.20.1
, create a new branch named1.20.1-recorder
, and then cherry-pick the commit from the dev branch - Use
1.20.1-recorder
branch from the recorder
But from my understanding, you are suggesting we do:
- fetch
main
from upstream (PW latest version is 1.25.0-next) - create a dev branch that is sync up with the main and an extra commit with the modification for the recorder
- Use dev branch from the recorder
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.
Myself and Kyungeun Synced on this separately, It was a misunderstanding in my part. The outcome is to update the docs with bit more detail so we can give more clarity around what versioning scheme we want to follow.
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.
I've updated the doc, let me know what you think! 🙏
closes #262 and #263
relates to elastic/playwright#1
Summary
This PR updates a couple of dependencies, the latest @elastic/synthetics agent (0.0.1-beta.31) and playwright version that the agent is using.
This update is especially exciting as Synthetics Recorder now generates scripts with Locator API 🎉
Some notable changes:
npm-force-resolutions
preinstall hook as it pollutes the npm install behaviour(since npm@7)ActionInContext
andStep
to make it compatible with the newer Playwright. These type definitions will be deleted once synthetics agent exports the compatible type definition againHow to validate this change
Pull this branch and run
npm ci
and runnpm run dev
. Confirm that everything works as before, also note that the generated code now containspage.locator(...)
.TODO
Find out what has changed to the signal url when recording the script. It's making the test fail as it waits for the navigation to the URL with the specific querystring which usually generated randomly on each navigation.edit: _The same behaviour is observed in the main branch as well so thus it is not related to the playwright version update. will address it separately
Next Steps