posthog
                                
                                 posthog copied to clipboard
                                
                                    posthog copied to clipboard
                            
                            
                            
                        feat: Action steps refactor
Problem
We have ActionSteps as a separate model that is never used in any clever way.
It would be much simpler to have it all stored in the action itself as a json map. This would make it easier to load and reason on
Changes
- [x] Adds a new steps_jsonto the model
- [x] Maps stepsto create a new class from the related fields or the stored json
- [x] Moves all code over to use this new class
- [x] Adds migration code
- [x] Writes to both places, reading from the steps_json if it exists
- [x] Removes properties that weren't referenced anymore such as name
Split up PRs
- Part 1 - API - https://github.com/PostHog/posthog/pull/22091
- Part 2 - Plugin server - https://github.com/PostHog/posthog/pull/22092
- Part 3 - Deprecate old model https://github.com/PostHog/posthog/pull/22093
đ Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
How did you test this code?
đ Existing Issues For Review
Your pull request is modifying functions with the following pre-existing issues:
đ File: posthog/hogql/property.py
| Function | Unhandled Issue | 
|---|---|
| property_to_expr | TypeError: Property.init() missing 1 required positional argument: 'key' posthog.ta... Event Count:90 | 
| property_to_expr | Cohort.DoesNotExist: Cohort matching query does not exist. posthog.tasks.tasks.process_... Event Count:4 | 
| property_to_expr | NotImplementedError: property_to_expr for element selector only supports exact and is_not operators, not regex ... Event Count:4 | 
| property_to_expr | NotImplementedError: property_to_expr for element selector only supports exact and is_not operators, not icontains ... Event Count:2 | 
| property_to_expr | TypeError: Property.init() missing 1 required positional argument: 'key' posthog.ta... Event Count:1 | 
Did you find this useful? React with a đ or đ
Schema purity đ Practicality đ â
Size Change: -32 B (0%)
Total Size: 1.05 MB
âšī¸ View Unchanged
| Filename | Size | Change | 
|---|---|---|
| frontend/dist/toolbar.js | 1.05 MB | -32 B (0%) | 
đ¸ UI snapshots have been updated
1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
- chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
- webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ UI snapshots have been updated
1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
- chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
- webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
I love how many commits come after this one đ¤Ŗ