eduNEXT / eox-tenant

Plugin for managing multiple tenants (organizations) within a single Open edX instance.
GNU Affero General Public License v3.0
7 stars 4 forks source link

feat: separate studio config and handler #185

Closed navinkarkera closed 7 months ago

navinkarkera commented 1 year ago

Description

Makes use of studio_configs field from TenantConfig table to keep studio configuration separate from LMS configs. It achieves the separation by having separate signal handlers for LMS and studio.

This is required due to conflicts between lms and studio settings. For example, repopulating third_party_auth plugin overrides few settings, one of which is SOCIAL_AUTH_STRATEGY. It needs to be set to auth_backends.strategies.EdxDjangoStrategy for studio and common.djangoapps.third_party_auth.strategy.ConfigurationModelStrategy for lms for third_party auth to work smoothly.

Testing instructions

Screenshots:
![image](https://github.com/eduNEXT/eox-tenant/assets/10894099/93fe7dfa-1c00-4b5f-b9df-27208ae50df2) ![image](https://github.com/eduNEXT/eox-tenant/assets/10894099/710cd901-462c-455d-ae97-c52cad3a5ca4)

Checklist for Merge

JuanDavidBuitrago commented 1 year ago

Hi @navinkarkera, thanks for your contribution.

@santiagosuarezedunext, Can you check this to review in one of ours sprints?

Asespinel commented 1 year ago

@santiagosuarezedunext friendly reminder to check this new feature

kaustavb12 commented 1 year ago

@santiagosuarezedunext @Asespinel Any updates on the review of this PR ?

Asespinel commented 1 year ago

@santiagosuarezedunext do we have this review on our future plans?

santiagosuarezedunext commented 1 year ago

@kaustavb12 @navinkarkera Sorry for the delay, our team is working on some priorities, I'm going to move this to the prioritized section and as soon as we finish what we're at we'll start by reviewing PRs. Thanks for the patience!

bra-i-am commented 8 months ago

hello @kaustavb12 @navinkarkera, I hope you are doing great. First of all, thank you so much for your interest in contributing to the improvement of this project and we're so sorry for the delay, only until now we have the time to give it the love it deserves.

I've been testing the proposed modifications. I think they are, alongside solving the use case you expose in the description, pretty convenient for improving the experience of handling the tenant configs for the STUDIO; we didn't need to solve the current implementation yet due to we manage the CMS as a tenant config and everything have gone okay according to our requirements.

I tested the PR using Tutor and most of the things worked as expected not only for your test case but also for the use cases we have in our sight. Nevertheless, there was a command that I wasn´t able to test that is edit_microsite_values because in the code of this PR is still appearing the legacy edit_tenant_values; I guess it will be necessary that you update this PR with the changes added in the PR https://github.com/eduNEXT/eox-tenant/pull/182/files to continue with the commands review.

By now, I'll be sharing this with my teammates so they can give their appreciation too.

Again, thank you so much.

navinkarkera commented 8 months ago

@bra-i-am Thanks! I have rebased with branch with latest changes from master. edit_tenant_values has been updated to edit_microsite_values. Let me know if you need any other changes.

MaferMazu commented 7 months ago

Hello @navinkarkera and @bra-i-am. Thanks to both for your contribution to this PR.

About the problem this PR intends to solve, "to keep studio configuration separate from LMS configs," we don't have it because in edunext we create a tenant for our Studio and add the configuration for our Studio in our lms_config. We also have a studio for our free clients in the SaaS; and we have some special cases, for that, we have a tenant for their studios.

I know we still have things to improve around cms_config and eox-tenant, but I think this change is a super breaking change for us. If we merge this, our configs around Studio will break because they are in lms_config, and Studio won't take it. I checked this, but, I will talk with @bra-i-am if there is a configuration I'm missing that could generate this problem.

On the other hand, we have another use case for having studio configs as tenants: We usually have different domains for clients that have custom Studios, for example, mafermazu.edunext.io as LMS and mafermazu-studio.edunext.io. In my understanding, in this PR, the difference between when to use the lms_config or cms_config is the port.

I tested this using Tutor, and it doesn't work well. As I said, I will request @bra-i-am's help to make this work, but I really think this is difficult to merge. I will tag people from our SaaS support and operations team.

@DeimerM @DonatoBD @BetoFandino, do you have thoughts on this? And please correct me if I made a mistake here.

MaferMazu commented 7 months ago

@navinkarkera, I could test it with @bra-i-am, but as I said, I think this PR is difficult to merge because of the problems this will add to our platform. Let's wait until the SaaS support and operation team bring an opinion.

MaferMazu commented 7 months ago

@navinkarkera I talked with the SaaS support and operation team, and they told me it is not too complicated to apply the change in our instances for this PR. Let's wait one or two weeks for review and proceed with this PR.

Thanks again for your patience.

MaferMazu commented 7 months ago

@navinkarkera, can you sign your commits? The base branch requires all commits to be signed.

navinkarkera commented 7 months ago

@MaferMazu Done.