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

feat: valid S3 expiration time #75

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

ArturGaspar
Copy link
Contributor

Description

Recommender XBlock will currently generate invalid URLs if used with S3 backend. This fixes that.

Using the filesystem backend should be unaffected as it ignores the timeout parameter (https://github.com/openedx/django-pyfs/blob/v3.4.1/djpyfs/djpyfs.py#L116).

Testing instructions

  1. Configure openedx-django-pyfs to use S3
    DJFS = {
        'type': 's3fs',
        'bucket': AWS_STORAGE_BUCKET_NAME,
        'prefix': 'pyfs/',
        # Note that explicitly passing credentials requires openedx-django-pyfs >= 3.4.1
        'aws_access_key_id': AWS_ACCESS_KEY_ID,
        'aws_secret_access_key': AWS_SECRET_ACCESS_KEY
    }
  2. Add a resource in the XBlock, include a screenshot
  3. See that the screenshot is displayed
  4. Configure openedx-django-pyfs to use the local filesystem
    DJFS = {
        'type': 'osfs',
        'directory_root': '/tmp/pyfs',
        'url_root': '/static/djpyfs'
    }
  5. Add a resource in the XBlock, include a screenshot
  6. See that the screenshot is displayed

Other information

Private-ref: https://tasks.opencraft.com/browse/BB-8077

@openedx-webhooks
Copy link

Thanks for the pull request, @ArturGaspar! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Dec 19, 2023
@mphilbrick211
Copy link

Hi @ArturGaspar - is this all set for review?

@ArturGaspar
Copy link
Contributor Author

@mphilbrick211 Yes.

@mphilbrick211
Copy link

Hi @openedx/2u-arbi-bom! This is ready for review.

@awais786
Copy link
Contributor

@ArturGaspar Please bump the version.

@ArturGaspar
Copy link
Contributor Author

@awais786 Done.

@UsamaSadiq UsamaSadiq merged commit c05fd61 into openedx:master Jan 22, 2024
3 checks passed
@openedx-webhooks
Copy link

@ArturGaspar 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants