Bug #16984

Enable missing cronjobs for Weblate

Added by hefee 2019-08-16 22:07:33 . Updated 2019-08-23 15:49:09 .

Status:
Resolved
Priority:
Normal
Assignee:
intrigeri
Category:
Target version:
Start date:
Due date:
% Done:

0%

Feature Branch:
Type of work:
Sysadmin
Blueprint:

Starter:
Affected tool:
Translation Platform
Deliverable for:

Description

As I learned from translate-server.git:weblate.mdwn why we need to run

manage.py updatechecks —all

and

manage.py rebuild_index —all

once a day. So we should add this (again) to cronjob list.


Subtasks


History

#1 Updated by hefee 2019-08-16 22:07:55

  • Target version set to Tails_3.16

#2 Updated by hefee 2019-08-16 22:15:33

  • Feature Branch changed from hefee/add-missing-weblate-cronjobs to salsa.debian.org:/hefee/puppet-tails.git:hefee/add-missing-weblate-cronjobs

#3 Updated by intrigeri 2019-08-17 15:04:14

  • Status changed from Confirmed to In Progress
  • Assignee changed from intrigeri to hefee

Hi @hefee!

Woohoo, I’m glad to see things moving forward on the translation platform front \o/ :)

> manage.py updatechecks —all

https://weblate.readthedocs.io/en/weblate-2.20/admin/management.html#updatechecks reads “This could be useful only on upgrades which do major changes to checks”.
So running it daily seems overkill to me: we don’t upgrade Weblate that often. I propose we instead add this command to our upgrading doc (creating it if it does not exist yet :) What do you think?

> manage.py rebuild_index —all

tl;dr: I don’t understand why we should do that and I’ve not seen any justification anywhere so far.

https://weblate.readthedocs.io/en/weblate-2.20/admin/management.html#rebuild-index reads “This might be lengthy operation if you have a huge set of translation units”, which is somewhat concerning.

translate-server.git:weblate.mdwn does not explain why we would want to run this daily, it merely describes what this command does, which is not particularly helpful. Note that the aforementioned doc of ours does not mention update_index (which we run every 4 hours) at all, so I suspect that some early prototype of the thing did not do incremental search index updates, but instead fully rebuilt it daily, which would explain what that doc says. (Maybe some older Weblate did not support update_index yet?)

#4 Updated by hefee 2019-08-18 22:52:20

  • Assignee changed from hefee to emmapeel

intrigeri wrote:
> Hi @hefee!
>
> Woohoo, I’m glad to see things moving forward on the translation platform front \o/ :)
>
> > manage.py updatechecks —all
>
> https://weblate.readthedocs.io/en/weblate-2.20/admin/management.html#updatechecks reads “This could be useful only on upgrades which do major changes to checks”.
> So running it daily seems overkill to me: we don’t upgrade Weblate that often. I propose we instead add this command to our upgrading doc (creating it if it does not exist yet :) What do you think?

Yes the doc is quite clear, that it shouldn’t be need to run it that regularity. But do we need to reun it, because checks may have changed?

> > manage.py rebuild_index —all
>
> tl;dr: I don’t understand why we should do that and I’ve not seen any justification anywhere so far.
>
> https://weblate.readthedocs.io/en/weblate-2.20/admin/management.html#rebuild-index reads “This might be lengthy operation if you have a huge set of translation units”, which is somewhat concerning.

ah yes I forgotten, that we run update_index within the cron.sh. I’m on your page, that this should be enough.

> translate-server.git:weblate.mdwn does not explain why we would want to run this daily, it merely describes what this command does, which is not particularly helpful. Note that the aforementioned doc of ours does not mention update_index (which we run every 4 hours) at all, so I suspect that some early prototype of the thing did not do incremental search index updates, but instead fully rebuilt it daily, which would explain what that doc says. (Maybe some older Weblate did not support update_index yet?)

@emmapeel: can you give use insides, if we need to run rebuild_index and updatechecks ince a day? Why those ended up in the weblate.mdwn documentation?

#5 Updated by intrigeri 2019-08-19 05:51:15

hefee wrote:
> intrigeri wrote:
>> Hi @hefee!
>>
>> Woohoo, I’m glad to see things moving forward on the translation platform front \o/ :)
>>
>> > manage.py updatechecks —all
>>
>> https://weblate.readthedocs.io/en/weblate-2.20/admin/management.html#updatechecks reads “This could be useful only on upgrades which do major changes to checks”.
>> So running it daily seems overkill to me: we don’t upgrade Weblate that often. I propose we instead add this command to our upgrading doc (creating it if it does not exist yet :) What do you think?

> Yes the doc is quite clear, that it shouldn’t be need to run it that regularity. But do we need to reun it, because checks may have changed?

I guess we should run it once now, as a follow-up to the last upgrade (to 2.20) we did. Objections?

#6 Updated by hefee 2019-08-20 19:15:49

intrigeri wrote:
> I guess we should run it once now, as a follow-up to the last upgrade (to 2.20) we did. Objections?

@intrigeri - no objection from my side and I think it can’t hurt to run it once.

#7 Updated by intrigeri 2019-08-21 08:43:57

> intrigeri wrote:
>> I guess we should run it once now, as a follow-up to the last upgrade (to 2.20) we did. Objections?

> @intrigeri - no objection from my side and I think it can’t hurt to run it once.

@hefee, OK, let’s do this during our work session tomorrow :)

#8 Updated by emmapeel 2019-08-22 08:16:58

hefee wrote:

> @emmapeel: can you give use insides, if we need to run rebuild_index and updatechecks ince a day? Why those ended up in the weblate.mdwn documentation?

The updatechecks need to be updated often, I think. Now they are doing OK, but for a while there were strings in for example https://translate.tails.boum.org/checks/?language=it&project=tails that stayed on the list even when the problems were solved.

Now the strings appearing at https://translate.tails.boum.org/checks/?language=it&project=tails look correct.

Also, I am not sure we need to lock the interface for this scripts to run, I think they can run in the background.

I don’t know about the implications of the index not being updated.

I also think the Rabbit agent thing of the last edition does some of this indexing.

#9 Updated by emmapeel 2019-08-22 09:25:23

One thing I noticed today when the ‘gamification for masochists’ got momentarily lifted by the admins, is that now when doing a change on a string the checks are done immediately after.

For example if I approve a suggestion, and I come back to the string, the checks for the newly approved string are ready and there are no false checks.

So, maybe that was something that was not working before and make the checks be outdated, and make the ‘update all checks’ needed.

#10 Updated by intrigeri 2019-08-22 10:19:09

Hi @emmapeel,

> The updatechecks need to be updated often, I think. Now they are doing OK, but for a while there were strings in for example https://translate.tails.boum.org/checks/?language=it&project=tails that stayed on the list even when the problems were solved.

This looks like there was a a bug in Weblate. Perhaps it’s been fixed since:

> Now the strings appearing at https://translate.tails.boum.org/checks/?language=it&project=tails look correct.

Was this corrected today (presumably by us running updatechecks --all by hand) or earlier?

If “earlier”: then presumably this was a bug in Weblate, that got fixed already, no maybe we don’t need to apply an expensive workaround.

If “today”: then the bug in Weblate is not fixed and we should probably:

  1. Apply the workaround, i.e. run updatechecks from time to time. It’s expensive though: it’s been eating a full CPU core since 2+ hours and is not done yet. So I would say monthly.
  2. Next time you see such a problem, please point me to it so I can gather info and report this upstream, in the hope that some day we can drop the expensive workaround.

#11 Updated by intrigeri 2019-08-22 10:21:24

> One thing I noticed today when the ‘gamification for masochists’ got momentarily lifted by the admins,

Clarification: the only thing that changed is that in some cases when you would have seen a 403 forbidden before, you now see a 500 error.

> is that now when doing a change on a string the checks are done immediately after.
> For example if I approve a suggestion, and I come back to the string, the checks for the newly approved string are ready and there are no false checks.
> So, maybe that was something that was not working before and make the checks be outdated, and make the ‘update all checks’ needed.

Oh great! This indeed suggests the bug was fixed and we can avoid running updatechecks ourselves, apart of post-upgrade.

So my understanding is that the only thing left to do here is: document that we must run updatechecks after applying an upgrade.

Sounds good?

#12 Updated by hefee 2019-08-22 13:18:05

intrigeri wrote:
> > One thing I noticed today when the ‘gamification for masochists’ got momentarily lifted by the admins,
>
> Clarification: the only thing that changed is that in some cases when you would have seen a 403 forbidden before, you now see a 500 error.
>
> > is that now when doing a change on a string the checks are done immediately after.
> > For example if I approve a suggestion, and I come back to the string, the checks for the newly approved string are ready and there are no false checks.
> > So, maybe that was something that was not working before and make the checks be outdated, and make the ‘update all checks’ needed.
>
> Oh great! This indeed suggests the bug was fixed and we can avoid running updatechecks ourselves, apart of post-upgrade.
>
> So my understanding is that the only thing left to do here is: document that we must run updatechecks after applying an upgrade.
>
> Sounds good?

yes sounds good.

#13 Updated by emmapeel 2019-08-22 13:18:41

intrigeri wrote:
> Hi @emmapeel,

> Was this corrected today (presumably by us running updatechecks --all by hand) or earlier?
>
> If “earlier”: then presumably this was a bug in Weblate, that got fixed already, no maybe we don’t need to apply an expensive workaround.
>
> If “today”: then the bug in Weblate is not fixed and we should probably:

It could have been fixed months ago, really. I haven’t noticed until today when I was looking very closely.

#14 Updated by hefee 2019-08-22 13:30:18

  • Status changed from In Progress to Needs Validation
  • Assignee changed from emmapeel to intrigeri
  • Feature Branch deleted (salsa.debian.org:/hefee/puppet-tails.git:hefee/add-missing-weblate-cronjobs)

I updated translation-server.git according to what we have discussed here.

#15 Updated by intrigeri 2019-08-23 15:49:09

  • Status changed from Needs Validation to Resolved

@hefee, LGTM!

Note that some of the doc you’ve started to update in that private repo looks suspiciously like bits of https://tails.boum.org/blueprint/translation_platform/, that I have updated already in July and August. I don’t know where this information duplication comes from (and I don’t care, really) but I figured this could save you some time and avoid duplicate work :)