owid / etl

A compute graph for loading and transforming OWID's data
https://docs.owid.io/projects/etl
MIT License
58 stars 18 forks source link

wizard: chart-diff shows charts as new if deleted in prod #2811

Closed lucasrodes closed 2 weeks ago

lucasrodes commented 3 weeks ago

One-liner

If someone deletes a chart in PRODUCTION, and your staging server was created prior to that, the chart might still exist in the server and be therefore shown in chart-diff.

Context & details

I detected this in the context of Pablo's work here: https://github.com/owid/etl/pull/2782

lucasrodes commented 2 weeks ago

I've attempted to fix this by comparing teh updatedAt field with the charts table creation time. If it is earlier than DB creation time, we can assume that the chart was not created in staging and is actually a chart that existed when we branched out, but was later deleted in master.

lucasrodes commented 2 weeks ago

this should be fixed by https://github.com/owid/etl/pull/2782