Opened 8 years ago

Closed 7 years ago

#13348 closed task (fixed)

[Pootle 2.7] Tracking ticket to update to Pootle 2.7

Reported by: nielx Owned by: haiku-web
Priority: normal Milestone:
Component: Website/Pootle Version:
Keywords: Cc:
Blocked By: #12869, #13306 Blocking:
Platform: All

Description (last modified by nielx)

This ticket is to track the steps to update to Pootle 2.7.

Roughly, there are the following to dos:

  • Write a script that updates the catalogs from the database
  • Check which configurations will need to change from 2.5 to 2.6 to 2.7 (see comment:4)
  • Test the intermediate upgrade to 2.6
  • Test the final upgrade to 2.7

Change History (12)

comment:1 by nielx, 8 years ago

Blocked By: 9743 added

comment:2 by nielx, 8 years ago

Blocked By: 12869 added

comment:3 by nielx, 8 years ago

Blocked By: 13306 added

comment:4 by nielx, 8 years ago

Description: modified (diff)

Settings we configure:

  • 10-base.conf
    • TIME_ZONE
    • SECRET_KEY
    • ALLOWED_HOSTS
  • 20-backends.conf
    • DATABASES
    • CACHES
  • 30-site.conf
    • ADMINS
    • CAN_REGISTER
    • DEFAULT_FROM_EMAIL
    • CONTACT_EMAIL
    • CAN_CONTACT
  • 40-apps.conf
    • POOTLE_ENABLE_API
  • 60-translation.conf
    • PODIRECTORY
    • MARKUP_FILTER
    • MT_BACKENDS
    • LOOKUP_BACKENDS
    • CONTRIBUTORS_EXCLUDED_NAMES
    • CONTRIBUTORS_EXCLUDED_PROJECT_NAMES

These settings are not in the deprecated settings list of the Pootle documentation, and they are still available in their original configuration files.

Version 0, edited 8 years ago by nielx (next)

comment:5 by nielx, 8 years ago

New required software

Redis is now required.

I set it up with the default configuration.

comment:6 by nielx, 8 years ago

Note to self

Pootle 2.5.1.3 depends on Django 1.4, which only works with django-assets 0.8

Last edited 8 years ago by nielx (previous) (diff)

comment:7 by nielx, 8 years ago

On the initial upgrade to 2.6.2 I run into this problem: https://github.com/translate/pootle/issues/4068

Problematic migrations:

  • pootle/apps/pootle_app/migrations/0008_drop_votes_table.py
  • pootle/apps/pootle_tagging/migrations/0002_autodel_goaldel_itemwithgoal.py
  • pootle/apps/pootle_tagging/migrations/0003_del_tagdel_taggeditem.py

To prevent the bugs from happening, perform the following in python manage.py shell, before upgrading the source to Pootle 2.6.2

from django.contrib.contenttypes.models import ContentType
ct = ContentType.objects.filter(app_label="voting").get()
ct.delete()
ct = ContentType.objects.filter(app_label="pootle_tagging")
for c in ct:
    c.delete()
ct = ContentType.objects.filter(app_label="taggit")
for c in ct:
    c.delete()
Last edited 8 years ago by nielx (previous) (diff)

comment:8 by nielx, 8 years ago

Notes on 2.7

  • After the upgrade to 2.7.6 there is a problem with stray *.pyc files
  • The database connector needs to be changed to transaction_hooks.backends.postgresql_psycopg2
  • The rqworker needs to be started

Commands to fix the stray *pyc files:

sudo find . -name \*.pyc -delete

The settings files that need to be changed/updated are:

  • 90-local.conf
  • 91-local-secrets-*.conf

Commands to be run to upgrade the database:

python manage.py migrate accounts 0002 --fake
python manage.py migrate pootle_translationproject 0002 --fake
python manage.py migrate
python manage.py calculate_checks
python manage.py refresh_stats
Last edited 7 years ago by nielx (previous) (diff)

comment:9 by nielx, 7 years ago

Notes on running 2.7

Also an updated wsgi is necessary, with the following change incorporated.

comment:11 by nielx, 7 years ago

The update has been deployed

comment:12 by nielx, 7 years ago

Blocked By: 9743 removed
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.