Markdown article importer messes up article tree

Bug #1506861 reported by Daniel Holbach
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Developer Portal
Fix Released
Critical
Daniel Holbach

Bug Description

In a postgres environment articles end up in the wrong place in the article tree.

I created a debug branch which should make things a bit easier to debug and retry quickly.

Instructions to reproduce
Prerequisites

$ bzr branch lp:~developer-ubuntu-com-dev/developer-ubuntu-com/debug-md-importer
$ cd debug-md-importer
$ virtualenv ./env
$ ./env/bin/pip install -r requirements.txt
$ ./env/bin/pip install django psycopg2

This branch mostly just adds some test data, debug messages and some convenience scripts.

To change from sqlite (default) to postgres apply a diff like http://pastebin.ubuntu.com/12798510/ to your developer_portal/settings.py and

$ sudo apt install python-pip python-dev libpq-dev postgresql postgresql-contrib
$ sudo -u postgres psql -c "CREATE USER developerportal_user WITH PASSWORD '123abc';"

The issue itself
Run
$ ./postgres-retry.sh
in a postgres setting and
$ ./sqlite-retry.sh
 in the sqlite setting.

The script will create a new db from scratch, run the importer with debug messages and run runserver for you, so you can easily check in the pages list how the structure changed.

Current state of things:
sqlite does fine and postgres has the article tree messed up.

Tags: site-dev

Related branches

tags: added: site-dev
Changed in developer-ubuntu-com:
importance: Undecided → Critical
description: updated
description: updated
description: updated
Changed in developer-ubuntu-com:
assignee: nobody → Daniel Holbach (dholbach)
status: New → In Progress
Changed in developer-ubuntu-com:
status: In Progress → Fix Committed
Revision history for this message
Daniel Holbach (dholbach) wrote :

It works in a local postgres environment, but not on staging...

Changed in developer-ubuntu-com:
status: Fix Committed → In Progress
Changed in developer-ubuntu-com:
status: In Progress → Fix Committed
Changed in developer-ubuntu-com:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.