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

chore: Remove v2 rrweb checks #1080

Merged
merged 8 commits into from
Mar 18, 2024
Merged

chore: Remove v2 rrweb checks #1080

merged 8 commits into from
Mar 18, 2024

Conversation

benjackwhite
Copy link
Collaborator

@benjackwhite benjackwhite commented Mar 14, 2024

Changes

Follow up after #1078 is fully released

WARNING: We should only merge this once the recorder.js is 100% rolled out to the CDN as rrweb2

  • Removes all the extra loader code checking for the file to already have been loaded, instead just looking for the window rrweb method

Checklist

  • Tests for new code (see advice on the tests we use)
  • Accounted for the impact of any changes across different browsers
  • Accounted for backwards compatibility of any changes (no breaking changes in posthog-js!)

@benjackwhite benjackwhite requested a review from daibhin March 14, 2024 08:25
@benjackwhite benjackwhite added the bump patch Bump patch version when this PR gets merged label Mar 14, 2024
@benjackwhite benjackwhite marked this pull request as ready for review March 14, 2024 08:26
Copy link

github-actions bot commented Mar 14, 2024

Size Change: -807 B (0%)

Total Size: 940 kB

Filename Size Change
dist/array.full.js 224 kB -207 B (0%)
dist/array.js 124 kB -200 B (0%)
dist/es.js 124 kB -200 B (0%)
dist/module.js 124 kB -200 B (0%)
ℹ️ View Unchanged
Filename Size
dist/exception-autocapture.js 12.1 kB
dist/recorder-v2.js 106 kB
dist/recorder.js 106 kB
dist/surveys-module-previews.js 62 kB
dist/surveys.js 58.3 kB

compressed-size-action

@benjackwhite benjackwhite requested a review from pauldambra March 14, 2024 08:49
Copy link
Contributor

@daibhin daibhin left a comment

Choose a reason for hiding this comment

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

Looks good whenever the other PR is merged and the CDN is ready. How long would you expect the cache to take?

@pauldambra
Copy link
Member

How long would you expect the cache to take?

It should be a five minute cache. You can check the headers on the JS response. I guess maybe we'd need to check multiple URLs at the moment 🤷

Base automatically changed from dn-chore/remove-v1-rrweb-loading to main March 15, 2024 11:14
@daibhin
Copy link
Contributor

daibhin commented Mar 15, 2024

Confirmed that https://internal-e.posthog.com/static/recorder.js now contains the v2 config:

...
{return{name:kn,observer:wn,options:e}};Jt&&(Jt.rrweb={record:At,version:"v2",rrwebVersion:"2.0.0-alpha.11"},Jt.rrwebConsoleRecord={getRecordConsolePlugin:function(e){return{name:"rrweb/console@1",observer:Ft,options:e}}},Jt.getRecordNetworkPlugin=Mn),e.NETWORK_PLUGIN_NAME=kn,e.default=At,e.findLast=ln,e.getRecordNetworkPlugin=Mn,e.patch=un,Object.defineProperty(e,"__esModule",{value:!0})}({});
//# sourceMappingURL=recorder.js.map

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

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

LGTM

feels like a monday morning rather than a friday afternoon change 🙈 but don't let me block

@daibhin
Copy link
Contributor

daibhin commented Mar 18, 2024

Happy to merge this one now @benjackwhite?

@benjackwhite benjackwhite merged commit 0e1bc8c into main Mar 18, 2024
13 checks passed
@benjackwhite benjackwhite deleted the chore/remove-v1-recordings branch March 18, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants