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

PADV-1557 Add storage backend capabilities to SGA Xblock #7

Closed
wants to merge 1 commit into from

Conversation

Nekenhei
Copy link

@Nekenhei Nekenhei commented Nov 6, 2024

Tickets

Description

This PR add the feature to the SGA Xblock to be able to manage the AWS S3 buckets when Xblock settings are defined. If there are not settings, it would relay on Django's default storage.

Changes Made

  • Override actual definition of used storage into the Xblock SGA module
  • Create custom backend that provides interface for the Xblock to use an storage defined.

How To Test

  • Please follow Xblock's doc to use the SGA as it used to work, nothing shall change in terms of user experience when uploading or downloading files.
  • Through the site configurations, set the following settings format using the keys provided by AWS S3 for a given bucket.
"SGA_STORAGE_SETTINGS": {
"STORAGE_CLASS": "your.desire.storage.backend,
"STORAGE_KWARGS":  {
      "key": "value"
  }
}
  • Files shall be processed thru the desite storage.

Annotations

Broken dependencies and CI process

CI process of unit testing and linting is failing due to dependencies issues. It also restrict the possibility to run it locally despite of the presence of a Tox defined workflow to do so. This is because it expects the workflows and credentails from upstream, not pearson. That could be cover in future PRs, but is not the purpose of this one so it won't be reviewed.

Lack of openedx_wrapper

As you might realize, the openedx site configurations helper is import directly into the SGA module without the use of a wrapper, which conflicts with our code quality standards. This is because most of the platform imports are doing in the same way and looking forward to port this in the upstream repository we shall not use any different approach but the one the repository has.

Upstream port

This feature is a port coming from the upstream repository
Testing cases and feature documentation would be available in next PR where we adjust the upstream feature to the site-awareness desire behavior of the Xblock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant