openedx / openedx/forum

Type cast IDs from string to int

Open
#198 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core contributor
Dominant language
Python
Stars
5
Forks
26
Avg merge
7d 11h
Merged PRs (30d)
2

Description

During the migration from forum v1 to v2, support for 2 database backends namely, mongodb and mysql, were added which meant having mongo hashes being converted to strings in Open edX and being sent to forum apis. Since, forum is going to deprecate the mongodb backend soon (work is ongoing), it won't be needing the support for mongo ids and mysql ids simultaneously. The discussion module in edx-platform and forum apis therefore, can be simplified to not type cast ids from str to int and to str again. This will clean up a lot of code in both repositories.

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 locating the discussion module in edx-platform and the corresponding forum API code, then trace where IDs are cast between strings and integers for MongoDB and MySQL. Done means removing the obsolete dual-backend ID conversions consistently in both repositories and confirming the affected forum API behavior still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend, databases
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.