-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sumac] feat: migrate from Ruby to forum v2 Python app #48
Conversation
cd4e4f7
to
11d1ef1
Compare
(./manage.py lms waffle_flag --list | grep forum_v2.enable_forum_v2) || ./manage.py lms waffle_flag --create --everyone forum_v2.enable_forum_v2 | ||
(./manage.py lms waffle_flag --list | grep forum_v2.enable_mysql_backend) || ./manage.py lms waffle_flag --create --everyone forum_v2.enable_mysql_backend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where will the migration of content from mongo to MySQL take place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question :) For now I've left it as a manual step. Basically, people would have to run:
./manage.py lms forum_migrate_course_from_mongodb_to_mysql --no-toggle all
./manage.py lms waffle_flag --create --everyone forum_v2.enable_forum_v2
./manage.py lms forum_delete_course_from_mongodb all
Source: https://github.com/edly-io/forum/?tab=readme-ov-file#migration-from-mongodb-to-mysql
But ideally these steps should be performed automatically as part of tutor local upgrade --from=redwood
. But the problem is that currently there exists no filter for that. We should probably create a UPGRADE_TASKS
filter.
Happy to see this change, which it shall fruther simplify the maintance and of the platform. |
I hope this answers most of the part. |
@Faraz32123 yes I got this part to my understanding once opreator choose to run Also my inquriy is whether I need to test cs_comments_service or not, and also I assume we can't merge this PR as it's, or is it planned to be merged later after the release of summac? |
yes, there's a way back as long as user don't run this command
According to the description that regis added in this PR, we should merge this change in sumac branch.
|
But then if we merge as it's to Summa opreator will not be able to to run forum_v1, (the ruby service), or am I missing something? |
And also consider this scenario:
They didn't delete mongodb data, so they shall be able to switch back but data/changes in step 2 will not be reflected back in mongodb I suppose. This is of course an edge case, but I think we need to mention all of these cases and scenarios in the release notes. |
Yeah, that's totally fine! We don't expect users to switch back to V1 again and there's no way to migrate data from mysql to mongo.
I think to answer this, let's hear it from @regisb, because I was answering it you according to our initial requirements(there might be a twist in it now) and local testing of forum with edx-platform. Although I think Forum_V1 settings should remain there for a while so that it can be tested by the community. Regis can tell better :) |
RUN git remote add edly https://github.com/edly-io/edx-platform \ | ||
&& git fetch edly edly/forumv2 \ | ||
&& git merge edly/edly/forumv2""", | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applying/merging that path caused an error on tutor sumac branch: 255.9 fatal: refusing to merge unrelated histories
May be edx/forumv2 brnach needs to be rebased on top of open-release/sumac.master
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright I think the above error is because tutor makes a shalllow clone, so I tried 1) git merge edly/edly/forumv2 --allow-unrelated-histories
, but then there is a huge a merge conflcit. So then I noticed edly branch is quite update to with master/sumac, so I tried git checkout edly/edly/forumv2
but then there I got pypi dependency conflict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let you know after updating(resolving dependency conflict) the edly/forum branch with upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dependency Issues were resolved, forgot to add it here as well. You can test it...
@ghassanmas regarding your question, I had a chat with regis. So, right now we are not going to support forum_V1 in the tutor-forum plugin. And if users want to run forum V1, they may have to create a separate plugin and this tutor-forum plugin will remain as it is now :) |
11d1ef1
to
0a5913b
Compare
Obviously, this is a very important change. But it drastically simplifies this plugin, in the sense that we no longer have to run a separate Ruby container.
0a5913b
to
48687c8
Compare
(./manage.py lms waffle_flag --list | grep forum_v2.enable_forum_v2) || ./manage.py lms waffle_flag --create --everyone forum_v2.enable_forum_v2 | ||
(./manage.py lms waffle_flag --list | grep forum_v2.enable_mysql_backend) || ./manage.py lms waffle_flag --create --everyone forum_v2.enable_mysql_backend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add below to the init task of forum... although migrations will run during launch, just a suggestion.
(./manage.py lms showmigrations forum | grep '\[ \]') && ./manage.py lms migrate forum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for this condition ./manage.py lms showmigrations forum | grep '\[ \]'
, it'll throw an error in init jobs if there are no new migrations to apply. The idea was to add ./manage.py lms migrate forum
for forum app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But those migrations will be automatically taken care of during lms init, right? I don't see the need to migrate the forum app individually.
I am going to merge this PR. Since ES was removed as part of Meilisearch migration (overhangio/tutor#1141), tutor-forum is failing on sandbox deploy (https://github.com/overhangio/openedx-release-demo/actions/runs/11657227578/job/32454473726). Any nits can be addressed via a followup PR. |
Obviously, this is a very important change. But it drastically simplifies this plugin, in the sense that we no longer have to run a separate Ruby container.
Obviously, this is a very important change. But it drastically simplifies this plugin, in the sense that we no longer have to run a separate Ruby container.
Obviously, this is a very important change. But it drastically simplifies this plugin, in the sense that we no longer have to run a separate Ruby container.
Obviously, this is a very important change. But it drastically simplifies this plugin, in the sense that we no longer have to run a separate Ruby container.
Obviously, this is a very important change. But it drastically simplifies this plugin, in the sense that we no longer have to run a separate Ruby container.
Note that this branch should actually be merged in the "sumac" branch, not nightly. This is pending on the creation of the "sumac" branch.EDIT: PR has ben rebased on top of the sumac branch.