owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.35k stars 227 forks source link

🔨 add migration to add chart_diff_conflicts table #3745

Closed lucasrodes closed 3 days ago

lucasrodes commented 3 days ago

In our new workflow, we need some way to track chart conflicts* between PROD and staging servers.

Currently, we define a conflict if the updatedAt field of a chart is greater in PROD than in STAGING.

If we take a look at the diagram below, we observe that the current method only captures scenario 1.

image

To capture scenario 2, we need to be smarter. I've been thinking of a logical expression, but I believe there is none. Therefore, the idea now is to track in a table if a conflict was resolved. A conflict will be identified by the chart ID and timestamp of edit in PROD.

*A chart conflict happens when one user edits a chart in PROD and another in STAGING, after branching out. Similar to git-conflict.

Related: https://github.com/owid/owid-grapher/pull/3584

owidbot commented 3 days ago
Quick links (staging server): Site Admin Wizard

Login: ssh owid@staging-site-tmp-table-conflicts-staging

SVG tester: Number of differences (default views): 0 ✅ Number of differences (all views): 0 ✅

Edited: 2024-06-25 17:26:09 UTC Execution time: 1.11 seconds