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-1558 Pull Storage definition from site configuration each time there would be a file process #10

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

Nekenhei
Copy link

Tickets

Description

This PR removes the storage definition from when the xblock is initialized in the platform and instead, checks the storage definition each time there would be a file action such uploads, downloads, etc.

Changes Made

  • Remove storage definition prior to Xblock package being initialized
  • Add storage definition pull each time a method would process a file request

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 configuration, 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"
    }
}
  • If possible, add a print statement here and confirms that the storage definition is checked each time there would be a file process like this upload method
  • Files shall be processed thru the desire 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 credentials 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.

Unit Testing

As per the missing dependencies and challenges with Tox definition, the unit testing shall be executed thru the paltaform shell. More documentation about it can be found here.

@Nekenhei Nekenhei requested a review from Squirrel18 December 10, 2024 19:57
@Nekenhei Nekenhei merged commit 4808b38 into pearson-release/olive.main Dec 10, 2024
0 of 2 checks passed
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.

2 participants