-
Notifications
You must be signed in to change notification settings - Fork 2
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: Capture node_data
directly alongside feeback
#3156
Conversation
🤖 Hasura Change Summary compared a subset of table metadata including permissions: Updated Tables (1)
|
Removed vultr server and associated DNS entries |
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.
Code looks good & plan sounds solid! Agree since it's a new column, it's an easy to manage manual migration for existing records (with comfort we can remove/retry if any surprises) 👍
LEFT JOIN | ||
flows f ON f.id = fb.flow_id | ||
LEFT JOIN | ||
teams t ON t.id = fb.team_id; |
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.
💯
Update: SQL executed on production, getting expected results and |
What does this PR do?
node_data
column tofeedback
tablenode_data
column when feedback is loggedfeedback_summary
view to read from this columnContext
The current
feedback_summary
view in pretty slow running, likely due to the filtered join per-row to thepublished_flows
table. This solution stores the node data directly alongside the feedback, thus mitigating this issue (hopefully!).Local testing is good - significantly faster to query the view now.
Next steps...
Once the following changes are live on production, I'm proposing to run the following SQL to populate the new column. I'm opting to do this manually instead of as a Hasura migration as it will be slightly easier to manage and monitor, and it's pretty low-risk (we're just populating a new column).
I've tested this locally with a copy of feedback data, however the sync script just copies a single published flow so it only populates a few records.
This matches the current join on the flow, as seen here -
planx-new/hasura.planx.uk/migrations/1715784133713_run_sql_migration/up.sql
Lines 37 to 49 in 4eeea8f