Project

General

Profile

Bug #15625

Feature #10034: Translation web platform

Feature #15079: Integrate the platform with our Git and ikiwiki infrastructure

Feature #15077: Have a staging website to build planned languages, with a resilient build

Create ikiwiki-staging.setup for staging website

Added by u over 1 year ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Internationalization
Target version:
-
Start date:
01/05/2019
Due date:
% Done:

100%

Spent time:
1.70 h (Total: 2.20 h)
Feature Branch:
Type of work:
Code
Blueprint:
Starter:
Affected tool:

Description

This file should be added to our master branch. I will prepare this plus ask groente for review.


Subtasks

Bug #16302: Syslog and staging websiteRejected

Bug #16309: ikiwiki tries to pull/push from gitResolved


Related issues

Related to Tails - Bug #15675: Weblate's git repo contains manual modifications which are not translations Resolved 06/19/2018
Related to Tails - Feature #16225: merge hefee/dev/translation-server Resolved 12/14/2018

History

#1 Updated by u over 1 year ago

  • Status changed from Confirmed to In Progress

#2 Updated by u over 1 year ago

  • Feature Branch set to 451f:tails/feature/15625+ikiwiki-staging

#3 Updated by u over 1 year ago

  • Assignee changed from u to groente
  • % Done changed from 0 to 50
  • QA Check set to Ready for QA

Created the two files in 3a7596cf47.

#4 Updated by u over 1 year ago

If you wonder why these two files should be in Git even though they are possibly used only on the translation platform:

- we want to allow people to use these files on their local clones
- these files will make it easier to add new languages to Weblate and it's staging wiki.
- it will not make Weblate's git repo diverge from upstream as it currently does by modifying, but (luckily) not committing these files.

#5 Updated by u over 1 year ago

Any progress on the reviewing front? :)

#6 Updated by groente over 1 year ago

  • Assignee changed from groente to u
  • QA Check changed from Ready for QA to Info Needed

hey, sorry for the long wait. i have two questions:

- if you want people to use these files on their local clones, shouldn't there also be a --staging flag to the build-website script?

- won't weblate's git repo diverge from upstream anyway as it needs different url and destdir settings?

#7 Updated by u about 1 year ago

  • Assignee changed from u to groente

groente wrote:

hey, sorry for the long wait. i have two questions:

- if you want people to use these files on their local clones, shouldn't there also be a --staging flag to the build-website script?

I don't know.. maybe.

- won't weblate's git repo diverge from upstream anyway as it needs different url and destdir settings?

Yes it will but. We aim at merging stuff from Weblate back to main.git. Hence the currently diverging ikiwiki.setup on weblate.git needs to die. Instead, we need to have two clean ikiwiki.setup files, one used on main.git, one used by staging. weblate.git MUST not have a divering setup file. This is currently an aberration of manually fiddling with this :) Also see https://labs.riseup.net/code/issues/15675

Please tell me that staging's puppet setup does not use this abberation :) If it does, we need to fix this, and I hope we can fix this using the files in this ticket here #15625. Thanks!

#8 Updated by u about 1 year ago

I can currently not push to my repo and the branch is outdated. But it would be sufficient to

checkout -f my branch and merge with master.

#9 Updated by u about 1 year ago

  • Related to Bug #15675: Weblate's git repo contains manual modifications which are not translations added

#10 Updated by hefee about 1 year ago

Without a solution for ikiwiki-staging.setup, the staging wiki is not published corectly. Currently the destdir is set to staging/ instead of the needed /var/www/staging/

I'll fix this localy to have a propper build.

but we can control this by the cmdline interface of ikiwiki:

./build-website --set destdir=/var/www/staging

#11 Updated by hefee 11 months ago

#12 Updated by hefee 11 months ago

  • QA Check changed from Info Needed to Dev Needed
  • Feature Branch deleted (451f:tails/feature/15625+ikiwiki-staging)
With #16225 the cronjob itself takes care about the correct values for the staging build within suggestions-cronjob.sh.
But using the ikiwiki.setup from tails repo is not the best idea. Let's use the exact same setup, that is used for production:
  • install and use templates/website/ikiwiki.setup.erb
  • and with the overwrite of the parameters in suggestions-cronjob.sh it should run successfully.
    (or create a ikiwiki.setup with the extended language list and the correct destdir).

#13 Updated by groente 10 months ago

  • Assignee changed from groente to hefee
  • QA Check changed from Dev Needed to Ready for QA

there's now a puppet-generated ikiwiki.setup in /var/lib/weblate/config/ikiwiki.setup - can you check if that looks okay?

the languages are now commonly defined for both ikiwiki.setup and lang.json in puppet-tails:manifests/weblate/languages.pp

as for keeping this all out of the git repo, we still need to deal with the build-script that is inside the repo, i see two options:

1. put an adapted version of build-website in /var/lib/weblate/scripts
2. forget about the sanity check and have the cronjob call ikiwiki directly

I'm not sure how important the sanity check is, but option 2 would leave the whole setup quite a bit less hairy.

#14 Updated by groente 10 months ago

adapted the suggestions-cronjob.sh script to run the sanity-check that was called from the build-website script and conditionally run ikiwiki, using the ikiwiki.setup file in /var/lib/weblate/config.

let me know if you catch any errors in the cron output.

#15 Updated by hefee 10 months ago

  • Status changed from In Progress to Resolved
  • Assignee deleted (hefee)
  • QA Check changed from Ready for QA to Pass

looks fine.

Also available in: Atom PDF