Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The releases of the Localized Drupal Distribution are multiplied. Just open the release combo.
Comment | File | Size | Author |
---|---|---|---|
#3 | L10nInstallReleases.png | 115.39 KB | Gábor Hojtsy |
Comments
Comment #1
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedComment #2
Gábor HojtsyWhaaaa, that looks pretty bad.
Comment #3
Gábor HojtsyWell, in fact, turns out to be "normal", just see how it happens:
This would only happen for distros built on drupal.org, because they have multiple download variants. Other project's don't do this. And we don't have many distros like that on drupal.org (yet). So at least this happens due to perfectly "normal" reasons, but needs to be special cased some way.
Comment #4
Gábor HojtsyRetitling for our current understanding. Moving to the queue where the fix/code needs to be written.
Comment #5
drummComment #6
drummThe releases that have been added by the newer REST release importing look good, so this only needs data cleanup.
Comment #7
drummHere's a draft of the queries to run:
Comment #8
Gábor HojtsyI think there is a certain value in parsing at least two variants of a distro (standalone and maybe the no-core one), so you get info on strings used in distros specifically (eg. when looking up the use of a string, eg. https://localize.drupal.org/translate/source-details/12 shows the string is both part of project module and drupal.org testing profile). It is admittedly a sizable data management penalty to pay for sure.
For reasons parsing the core distro, the installer in D8 and the l10n_update in D7 can only download one .po file in the installer ATM, and it would be the complete translation file for the distro (the .po packaged for the -core.tar.gz). Again, the clients may be made more efficient instead of the server needing to provide this variant too.
So these are the reasons this was not attended to in the past 4 years (apart of not having time that is :D). I think at least this would be best checked against how D8 core and l10n_update works with a distro and what translation it attempts to download for them. It may be that it only downloads the core translation anyway for the base Drupal version and no distro specific stuff (with an opportunity to download the module/profile translations later in the process). However profiles may be providing additional install screens, etc. so it needs to somehow work there.
Comment #9
Gábor HojtsyThat said, based on @drumm, this triplication of release info does not seem to be the case anymore since the REST export is used? So its not something we'd "keep" anyway, since it was only happening for a while, right?
@drumm: your draft queries would still leave data in l10n_server_line referring to files not existent anymore, that would also need to be cleaned up. Strings should not be cleaned up because the strings should appear in other projects anyway (the pure distro package and the core/module releases).
Comment #10
drummA good example is https://localize.drupal.org/translate/projects/cartaro/releases. 1.1 and above do not have the -core and -no-core files. The REST fetching looks like it hard-codes releases being named short_name-version. A followup issue could change this to prefer -core when available, and fallback to the usual naming.
Comment #11
drummI think it will get them all. The query I used, converted to SELECT:
And with instead joining via
l10n_server_file.fid
The same number number of rows would be affected.
Comment #12
drummStaging row counts before execution:
Comment #13
drummThe bulk of the ~1.5h time is taken in
l10n_server_line
. Splitting up those deletes might speed it up, or at least not lock the table for 1.5h.Comment #14
Gábor HojtsyWell, unless its done on cron or something cleaning up a few projects at a time (and then a few hours off), it will be blocking anyway. It may be best to get over with faster (especially if it helps packaging work again), eg. by downing the site for 2 hours or so.
Comment #15
drummIt doesn't seem to be locking out SELECTs, and each iteration takes less than 30s, often less than 10s. I don't think we need to do a downtime.
Comment #16
Gábor Hojtsyok, fine with me :)
Comment #17
drummAfter counts:
Comment #18
drumml10n_server_line, l10n_server_file, and l10n_server_error are higher than I was expecting. These are 2 extra copies of core, plus one extra copy of the modules, for each distort release, so it does make some sense.
Otherwise, this looks okay. Needs some click testing to double check, and packaging up in a hook_update_N().
Comment #19
drummSince this is Drupal.org-specific, putting the updates here.
Comment #21
drummComment #22
drummNow deployed.