learningequality / learningequality/studio

Discover conditions under which prerequisite ContentNode are not found during publishing. [ #2827]

Open
#3,065 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

TODO: needs clarification
Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

hi, i still have these error (localprodserver), and continue to publish but without generating .sqlite3 file for channel

ERROR:contentcuration.utils.publish:Unable to find prerequisite ContentNode matching query does not exist.
ERROR:contentcuration.utils.publish:Unable to find prerequisite ContentNode matching query does not exist.

and sometimes (these when i publish a channel with devserver and then localprodserver to be imported from kolibri) :

WARNING Not Found: /api/content/contentnode_granular/47566d498094573389a14c0e438d78ae/
WARNING "GET /api/content/contentnode_granular/47566d498094573389a14c0e438d78ae/?1617537774473=1617537774473 HTTP/1.1" 404 81

  1. migrate step:

Running migrations:
Applying content.0001_initial... OK
Applying content.0002_auto_20180327_1414... OK
Applying content.0003_contentnode_coach_content... OK
Applying content.0004_auto_20180910_2342... OK
Applying content.0005_auto_20190424_1709... OK
Applying content.0006_auto_20191028_2325... OK
Applying content.0007_auto_20200613_0050... OK
Applying content.0008_channelmetadata_tagline... OK
Applying content.0009_contentnode_options... OK
ERROR:contentcuration.utils.publish:Unable to find prerequisite ContentNode matching query does not exist.
ERROR:contentcuration.utils.publish:Unable to find prerequisite ContentNode matching query does not exist.

  1. publish channel
    [2021-04-04 10:04:28,235: INFO/ForkPoolWorker-1] Prepared the export database.
    [2021-04-04 10:04:28,735: INFO/ForkPoolWorker-1] Generated the channel metadata.
    [2021-04-04 10:04:28,747: ERROR/ForkPoolWorker-1] Unable to find prerequisite ContentNode matching query does not exist.
    [2021-04-04 10:04:28,749: ERROR/ForkPoolWorker-1] Unable to find prerequisite ContentNode matching query does not exist.
    [2021-04-04 10:04:28,750: ERROR/ForkPoolWorker-1] Unable to find prerequisite ContentNode matching query does not exist.
    [2021-04-04 10:04:28,750: ERROR/ForkPoolWorker-1] Unable to find prerequisite ContentNode matching query does not exist.
    [2021-04-04 10:04:28,894: INFO/ForkPoolWorker-1] Successfully copied to databases/66a31fdbdd745c7c9e499206f3c4cced.sqlite3

  2. when trying to download from kolibri
    Not Found: /content/databases/66a31fdbdd745c7c9e499206f3c4cced.sqlite3
    WARNING:django.request:Not Found: /content/databases/66a31fdbdd745c7c9e499206f3c4cced.sqlite3
    Not Found: /content/databases/66a31fdbdd745c7c9e499206f3c4cced.sqlite3
    WARNING:django.request:Not Found: /content/databases/66a31fdbdd745c7c9e499206f3c4cced.sqlite3

Observed behavior

Expected behavior

User-facing consequences

Errors and logs

01:10 info: something happened
01:12 error: something bad happened

Additional information

Steps to reproduce the issue

  1. 2 VMs in local envirement (1 kolibri and 1 studio)
  2. yarn run localprodserver to have studio in LAN
  3. create a channel and published
  4. try to import a channel from kolibri (yarn run build --> kolibri start )

Usage Details

  • OS:
  • Browser:
  • URL:
  • Other information that may be relevant:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two-VM workflow in the listed steps, including localprodserver publishing and Kolibri import, while capturing the publish and migration logs. Trace when prerequisite ContentNode records are looked up and compare that with the missing contentnode_granular response. Done means the conditions causing the missing prerequisites are identified and the expected channel database is available for import.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlite
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.