Page MenuHomePhabricator

Drop support for Vega 1.5
Closed, ResolvedPublic

Description

Eventually, we will want to start migrating to a latest version of Vega. Before we complete that, we need to deprecate and drop support for Vega 1.5 so we will not have a huge technical debt of supporting three Vega version (1.5, 2.6, 5.x).

The goal of this task is to flush out any last remaining usage of Vega 1.5 across the Wikimedia projects, migrate them to 2.6 definitions and then remove support for Vega 1.5.

  • announce in tech news this will happen
  • make initial measure of the prevalence of remaining usage of Vega 1.5 and identify wiki and templates needing support for migration.
  • flush out straggles by logging client side errors
  • drop Vega 1.5 and mop up.

How help to fix old syntax?

  1. @Seddon collects problematic pages lower on this page
  2. You can also use insource: "graph version 1" in search across all pages in your project or check this category - https://www.wikidata.org/wiki/Q21705175
  3. Decide if you need this page and if it makes sense to update it
  4. Most often it is enough to remove data. in field: https://pl.wikipedia.org/w/index.php?title=Sejm_Rzeczypospolitej_Polskiej_VII_kadencji&diff=prev&oldid=69935436
  5. Or you can replace with modules: https://ru.wikipedia.org/w/index.php?diff=129411182&oldid=76542710
  6. More info here: https://www.mediawiki.org/wiki/Extension:Graph/Vega_2.0
  7. More info here too: https://web.archive.org/web/20160201003310/https://github.com/vega/vega/wiki/Upgrading-to-2.0
  8. Old Vega 2 editor with examples: http://vega.github.io/vega-editor/?mode=vega

Event Timeline

VulpesVulpes825 renamed this task from Drop support for Vega 1.0 to Drop support for Vega 1.5.Aug 17 2020, 4:31 PM
VulpesVulpes825 updated the task description. (Show Details)
SELECT uri_host, COUNT(*) FROM wmf.webrequest
WHERE year = 2021 AND month = 9 AND day = 10
AND uri_path = '/w/load.php'
AND uri_query LIKE '%vega1%'
GROUP BY uri_host

A typical days data

fr.wikipedia.org99
pl.wikipedia.org56
it.wikipedia.org14
no.wikipedia.org3
fr.wikibooks.org1
ru.wikipedia.org1
meta.wikimedia.org1
es.wikipedia.org1

Other sporadic instances from other days

my.wikipedia.org
www.mediawiki.org
en.wikipedia.org
fr.wiktionary.org
outreach.wikimedia.org
he.wikipedia.org

It seems that the remaining Vega 1.5 usages are simple bar graphs, which should be easily upgraded by using the Module:Graph or manual updates.

An easier solution is to generate an error message when version number is 1 and ask editors for upgrades, considering how low the usage of Vega 1.5 is at this point.

Change 755513 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/Graph@master] Remove vega1 from Graph extension

https://gerrit.wikimedia.org/r/755513

Change 755513 abandoned by TheDJ:

[mediawiki/extensions/Graph@master] Remove vega1 from Graph extension

Reason:

https://gerrit.wikimedia.org/r/755513

Iniquity subscribed.

Tech/News Proposed Copy
Vega 1.5 support is planned to be disabled in the near future, so some charts may break.

@Seddon can you update info about this change, please? :)

Thanks!

Pages requiring fixing:
ruwiki

[] https://ru.wikipedia.org/wiki/%D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA:%D0%90%D0%BB%D0%B5%D0%BA%D1%81%D0%B0%D0%BD%D0%B4%D1%80%D0%9F346545
[] https://ru.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:%D0%A4%D0%BE%D1%80%D1%83%D0%BC/%D0%90%D1%80%D1%85%D0%B8%D0%B2/%D0%A2%D0%B5%D1%85%D0%BD%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9/2015/06

Fixed for ruwiki :)

Hiyo. For Tech News, I'm not entirely sure what to write...

From the comments above, it looks like you've found and fixed ALL the existing instances already - is that accurate?

Additionally, it's not currently clear to me what editors need to look for in order to detect a problem, and if they find any, then how they should best fix it.
E.g. I looked at some of the pages linked above, and found these 2 examples in the page-histories:

Is one of those more preferable than the other? (Maybe they're only different because one is via a template? Maybe they're both equally-future-proof for the "[version] 5.13" mentioned in the Task Description?)

I also found this old page, which might be relevant(?): https://www.mediawiki.org/wiki/Extension:Graph/Vega_2.0


Ideally, readers need to understand the context, the problem, and how they can help.
For Tech News, something like this might work? (if accurate?!)

The Vega software that creates data visualizations in pages, such as graphs, will be upgraded to version 5 in the future. Pages that still use the very old version 1.0/1.5 syntax may stop working properly. Most existing uses have been found and updated, but you can help to check, and to update any local documentation. Examples of how to find and fix these pages are available.

That last sentence could be a link to this task?
Plus, someone could add a very short section at the top of the Task Description here, giving:

  1. links to example-searches (maybe an insource:... search?)
  2. links to example-fixes (so that they have a quick-reference), and
  3. possibly one or more documentation pages (anything specific from within https://www.mediawiki.org/wiki/Extension:Graph#Useful_links ?).

TLDR: Please help to draft a clear message for Tech News, and to update the Task Description with any extra details needed. Thank you!
(I'll postpone the Tech News entry until the following week's edition, so we have ~6 days to get it done clearly. :)

Hiyo. For Tech News, I'm not entirely sure what to write...

From the comments above, it looks like you've found and fixed ALL the existing instances already - is that accurate?

Additionally, it's not currently clear to me what editors need to look for in order to detect a problem, and if they find any, then how they should best fix it.
E.g. I looked at some of the pages linked above, and found these 2 examples in the page-histories:

Is one of those more preferable than the other? (Maybe they're only different because one is via a template? Maybe they're both equally-future-proof for the "[version] 5.13" mentioned in the Task Description?)

I also found this old page, which might be relevant(?): https://www.mediawiki.org/wiki/Extension:Graph/Vega_2.0


Ideally, readers need to understand the context, the problem, and how they can help.
For Tech News, something like this might work? (if accurate?!)

The Vega software that creates data visualizations in pages, such as graphs, will be upgraded to version 5 in the future. Pages that still use the very old version 1.0/1.5 syntax may stop working properly. Most existing uses have been found and updated, but you can help to check, and to update any local documentation. Examples of how to find and fix these pages are available.

That last sentence could be a link to this task?
Plus, someone could add a very short section at the top of the Task Description here, giving:

  1. links to example-searches (maybe an insource:... search?)
  2. links to example-fixes (so that they have a quick-reference), and
  3. possibly one or more documentation pages (anything specific from within https://www.mediawiki.org/wiki/Extension:Graph#Useful_links ?).

TLDR: Please help to draft a clear message for Tech News, and to update the Task Description with any extra details needed. Thank you!
(I'll postpone the Tech News entry until the following week's edition, so we have ~6 days to get it done clearly. :)

Hello! Thanks for such a detailed explanation! I'll think about it and come back if no one writes before.

This comment was removed by Seddon.

March 2023 Fix Targets part 1 (English and Multilingual Wiki's)

Derived from:

referers = wmf.spark.run("""
SELECT referer FROM wmf.webrequest
WHERE year = 2023 AND month = 3
AND uri_path = '/w/load.php'
AND uri_query LIKE '%vega1%'
GROUP BY referer
""")

Commons

enwiki

mediawiki

metawiki

wikidata

@Quiddity I like your version of note, but with some fixes:

The Vega software that creates data visualizations in pages, such as graphs, will be upgraded to newest version in the future. Graphs that still use the very old version 1.5 syntax may stop working properly. Most existing uses have been found and updated, but you can help to check, and to update any local documentation. Examples of how to find and fix these graphs are available.

March 2023 Fix Targets part 1 (English and Multilingual Wiki's)

Derived from:

referers = wmf.spark.run("""
SELECT referer FROM wmf.webrequest
WHERE year = 2023 AND month = 3
AND uri_path = '/w/load.php'
AND uri_query LIKE '%vega1%'
GROUP BY referer
""")

Commons

enwiki

mediawiki

metawiki

wikidata

Hi, I think all fixed or notified :)

Thanks @Iniquity! Starting from next week I will start running the query daily.

If we can get through a week or two weeks without any instances in the web requests I think we can start feeling more confident about moving forward with the deprecation.

Thanks @Iniquity! Starting from next week I will start running the query daily.

If we can get through a week or two weeks without any instances in the web requests I think we can start feeling more confident about moving forward with the deprecation.

Hi :) Have you run the query?

There's a problem with rendering graphs on plwiki recently. Many graphs don't show at all, for example in: https://pl.wikipedia.org/wiki/Ren_(pierwiastek)#Rynek (the graph should be generated by {{Wykres}} after the second paragraph in that section). There hasn't been any edits to the graph template and module. Is it related to this task?

It seems that at first the <graph> tag was emitted directly to the page content and purging results in just nothing in place of the graph. The pre-purge page content:

image.png (453×1 px, 59 KB)

@Msz2001, graphs are disabled at the moment following a security issue tracked in currently non-public T334895

Change 910060 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/Graph@master] Remove Vega 1 and Vega 2 libraries from extension

https://gerrit.wikimedia.org/r/910060

Change 910060 merged by jenkins-bot:

[mediawiki/extensions/Graph@master] Remove Vega 1 and Vega 2 libraries from extension

https://gerrit.wikimedia.org/r/910060

The security issue forced a decision here. The old versions have been removed from the Graph extension so support has effectively been dropped. We've also added error logging in place to catch graphs that are written in older schemas.

  • In T335048 we are exploring ways to help community update graphs more efficiently. I will let the error logging drive whether we do anything further for Vega 1.5. Please follow T335048 for further information regarding that.
  • In T335127 we will make sure we have any tagging for graphs using outdated schemas to help locate any problems.

I really hope that is sufficient please let me know if not.