Skip to content
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

[DEPR]: block_structure.storage_backing_for_cache in edx-platform #32

Open
feanil opened this issue Feb 24, 2022 · 7 comments
Open

[DEPR]: block_structure.storage_backing_for_cache in edx-platform #32

feanil opened this issue Feb 24, 2022 · 7 comments
Assignees
Labels
depr Proposal for deprecation & removal per OEP-21

Comments

@feanil
Copy link
Contributor

feanil commented Feb 24, 2022

Proposal Date

9 February 2021

Ticket Acceptance Date

1 March 2021

Technology Removal Date

TBD

First Open edX Named Release Without This Functionality

TBD

Rationale

See Removal Section

Removal

Removing: Toggle labeled 'block_structure.storage_backing_for_cache'. The toggle has the following annotation as a description:

When enabled, block structures are stored in a more permanent storage, like a database, which provides an additional backup for cache misses, instead having them regenerated. The regeneration of block structures is a time consuming process. Therefore, enaRemoving: Toggle labeled 'block_structure.storage_backing_for_cache'. The toggle has the following annotation as a description:

When enabled, block structures are stored in a more permanent storage, like a database, which provides an additional backup for cache misses, instead having them regenerated. The regeneration of block structures is a time consuming process. Therefore, enabling this switch is recommended for Production.

This toggle defaults to False, however in deprecation we intend to set it to True. We could not think of a reason not to have this toggle on, even in development.bling this switch is recommended for Production.

This toggle defaults to False, however in deprecation we intend to set it to True. We could not think of a reason not to have this toggle on, even in development.

Replacement

No replacement is intended as no use case can be found for it. You can, however, specify where the storage is set. You could, for instance, set it to AWS block storage, or to local disk. The setting BLOCK_STRUCTURES_SETTINGS['STORAGE_CLASS'] covers this need.

Deprecation

No response

Migration

No response

Additional Info

Original Conversation: https://github.com/edx/edx-platform/pull/26175/files#r565801078
Original Jira Issue: https://openedx.atlassian.net/browse/DEPR-145
Relates to #31

@feanil feanil added the depr Proposal for deprecation & removal per OEP-21 label Feb 24, 2022
@ormsbee ormsbee self-assigned this Jun 7, 2022
@feanil
Copy link
Contributor Author

feanil commented Aug 16, 2022

@dianakhuang
Copy link

When testing, we should confirm that when a Studio publish happens that we have a backend write to storage.

Ensure that the progress page work after Studio publish (and reflect Studio changes).

@ajamal-python
Copy link

ajamal-python commented Aug 16, 2023

@dianakhuang I am working on this ticket.
Do we need to remove "block_structure.storage_backing_for_cache" toggle or only set this value True?
I haven't found values of STORAGE_CLASS and STORAGE_KWARGS in BLOCK_STRUCTURES_SETTINGS in cms/envs/commons.py.
How to set "block_structure.storage_backing_for_cache" is True?

@dianakhuang
Copy link

@ajamal-python , we would like to remove the toggle entirely, and to have the code behave as if the value is set to true. Does that clarify the ticket?

@ajamal-python
Copy link

@dianakhuang , please clarify following points-
How to set "block_structure.storage_backing_for_cache" is True?
Do we need to add STORAGE_CLASS and STORAGE_KWARGS in BLOCK_STRUCTURES_SETTINGS in cms/envs/commons.py?

@dianakhuang
Copy link

@ajamal-python If you want to set it locally, you would need to enable it through a waffle flag in django admin.

I do believe we need to add STORAGE_CLASS and STORAGE_KWARGS to cms/envs/common.py.

@ajamal-python
Copy link

@dianakhuang when I set
STORAGE_CLASS='django.core.files.storage.FileSystemStorage',
STORAGE_KWARGS=dict(
location=MEDIA_ROOT,
base_url=MEDIA_URL,
),
in cms/envs/commons.py and lms/envs/commons.py , I am getting PermissionError: [Errno 13] Permission denied: '/edx/var'.
Log file is attached.Please check and guide me
7_Setup and run tests.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depr Proposal for deprecation & removal per OEP-21
Projects
Status: Removing
Development

No branches or pull requests

4 participants