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 #2

Merged
merged 1 commit into from
Dec 25, 2023

Conversation

ArturGaspar
Copy link
Member

Description

Backports openedx#75.

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

Copy link
Member

@viadanna viadanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

  • I tested this on a sandbox
  • I read through the code
  • Includes documentation

@ArturGaspar ArturGaspar merged commit 82fd645 into opencraft-release/2.1.0 Dec 25, 2023
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