Skip to content
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

Apply separate-recorder branch change to latest upstream change #1

Closed
wants to merge 6 commits into from

Conversation

kyungeunni
Copy link

⚠️ Draft PR to demonstrate the strategy, not intended to merge it into main

Related tickets

Context

We manage this repository as a dependency of synthetics-recorder. We forked and modified the original playwright in order to enable a certain feature for the recorder.

The modified version is maintained in separate-recorder branch currently, but it has been outdated for a while and it became cumbersome to apply the patch from upstream as their development velocity was so fast that we hadn't had a chance to incrementally update it. The main reason being Playwright changed its structure significantly(from monolith to monorepo) it didn't seem to an simple fix.
Another issue we had with the separate-recorder branch is that it includes compiled lib/* js files as part of the branch so it is not easy to maintain having thousands of lines of diffs every time we merge the upstream changes.

What does this change do

This branch contains the essential modification we had in the separate-recorder branch, plus a further modification in order to make it compatible with the latest upstream changes. I've tried to use this one locally and I could see it recorded the actions successfully! (code generation needs a bit more work as they change the data structure, but it is a minor change on the recorder side)

Proposal: The approach for maintaining the modification with continuous updates

  1. Squash all the commits that we have here into one commit
  2. Do not merge this branch to main, rather keep this branch separated, call it synthetics-recorder or similar.
  3. Whenever fetch upstream main to elastic/playwright:main, pull the changes from main(rebase).
  4. Find what version of playwright synthetics agent is using. Then checkout to the version and create a new branch from their, ${version}-recorder or similar, and cherry pick the commit from synthetics-recorder into the newly created branch.
  5. Uncomment # !packages/playwright-core/lib/ in .gitignore, run npm run build and see the js files are generated for playwirght-core. Commit all of them and push it to remote.
  6. When synthetics agent uses newer version of the playwright, repeat the step 4 and 5

In short, we will maintain two separated branches, one that contains the modification(synthetics-recorder) and another one that contains the generated lib files for the target version (${version}-recorder)

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