Ladsgroup added a comment.

  In T205094#6525519 <https://phabricator.wikimedia.org/T205094#6525519>, 
@WMDE-leszek wrote:
  
  > This seems to be finished. There is still a bunch questions I would have 
that this task does not seem to be explaining, e.g. how this "abstract schema" 
approach is guarding against production databases drifting from what the schema 
delivered with code prescribes - which seems to be called to as a reason for 
doing those changes; or what was the reasoning for introducing 
repo/sql/postgres files.
  >
  > But as this didn't seem to be an issue when the task was defined, I am 
closing this.
  
  I don't know if I understood you correctly but the abstract schema is going 
to help with finding drifts between production and dev code (T104459: Automate 
the check and fix of object, schema and data drifts between mediawiki HEAD, 
production masters and slaves <https://phabricator.wikimedia.org/T104459>) 
since parsing json for automated checks across the lots of databases is much 
easier and more accurate than parsing sql 
<https://github.com/Ladsgroup/db-analyzor-tools/blob/master/db_drift_checker.py#L118>.
 We are already working on it and potentially in the future, easy drift fixes 
for small wiki will be done automatically but for now, the abstract schema is 
extensively being used to report drifts (you can see for example our most 
recent adventure T260111: All sorts of random drifts in wikis in s3 
<https://phabricator.wikimedia.org/T260111>, for more, look at subtickets of 
the above ticket).
  
  The other point of having abstract schema is to have one source of truth, for 
example mediawiki core has different sql files for Postgres and MySQL and they 
look similar but they actually have drifted drastically (missing indexes, 
missing tables, etc., so far around 80 drifts have been fixed). The wikibase 
sql files are now generated automatically from one source of truth meaning they 
won't diverge (core even has tests for it now, we can write it for wikibase too)
  
  On a rather different topic: We will have abstract schema changes support in 
a couple of months (currently we have abstract schema but not abstract schema 
change), similar to what we have but you provide a json file (with snapshot of 
before and after of the abstract schema of the table) and it would produce the 
ALTER TABLES needed for each DBMS for you through a maintenance script.
  
  HTH

TASK DETAIL
  https://phabricator.wikimedia.org/T205094

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Ladsgroup
Cc: WMDE-leszek, Lucas_Werkmeister_WMDE, Izno, Michael, Ladsgroup, daniel, 
Addshore, Aklapper, Matthias_Geisler_WMDE, Jonas, Hazizibinmahdi, Akuckartz, 
Iflorez, darthmon_wmde, alaa_wmde, DannyS712, Nandana, Lahi, Gq86, Pablo-WMDE, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
Wikidata-bugs, aude, Dinoguy1000, Lydia_Pintscher, Mbch331, Jay8g
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to