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

feat: step towards feature folders for replay backend #17484

Merged
merged 9 commits into from
Sep 18, 2023

Conversation

pauldambra
Copy link
Member

Backend files for replay are spread allover the place. We use feature folders in the front-end code. Let's step towards that for the backend by gathering the replay files in one place in posthog and ee

@pauldambra pauldambra marked this pull request as draft September 17, 2023 08:39
Comment on lines +75 to +76
e,
extras={"attempt_count": attempt_count, "operation": "get_realtime_snapshots"},
Copy link
Member Author

Choose a reason for hiding this comment

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

obey mypy

Copy link
Member Author

Choose a reason for hiding this comment

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

mypy went to town in this file...

We should probably switch to operate entirely on lists or entirely on generators when we delete the old session recording code

Comment on lines +154 to +158
if isinstance(_events, Generator):
# we check the first item in the events below so need to be dealing with a list
events = list(_events)
else:
events = _events
Copy link
Member Author

Choose a reason for hiding this comment

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

we sometimes pass a generator into this function, and then check events[0] but generators aren't subscriptable... so mypy was very unhappy with us

@pauldambra pauldambra marked this pull request as ready for review September 17, 2023 13:59
Copy link
Contributor

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

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

The git file length diff is odd (+4133, -195). Wondering if there is a file that should have been removed that isn't or a snapshot or something?

Other than this is great tidying 👍

@pauldambra
Copy link
Member Author

@fuziontech this doesn't change anything about the session recording/replay migrations, just moves them. I've checked I can nuke and recreate locally

@pauldambra pauldambra merged commit a87b247 into master Sep 18, 2023
60 checks passed
@pauldambra pauldambra deleted the feat/step-towards-feature-folders branch September 18, 2023 12:36
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