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

adjust s3 prefix for downloaded files #1290

Merged
merged 1 commit into from
Nov 29, 2024
Merged

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Nov 29, 2024

Important

Adjusts S3 prefix for downloaded files to use AWS_S3_BUCKET_UPLOADS with DOWNLOAD_FILE_PREFIX in s3.py.

  • Behavior:
    • Adjusts S3 URI for downloaded files in save_downloaded_files and get_downloaded_files in s3.py to use AWS_S3_BUCKET_UPLOADS with DOWNLOAD_FILE_PREFIX.
    • Removes AWS_S3_BUCKET_DOWNLOADS from config.py.
  • Constants:
    • Adds DOWNLOAD_FILE_PREFIX in constants.py set to "downloads".

This description was created by Ellipsis for 3f95cba. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 3f95cba in 1 minute and 19 seconds

More details
  • Looked at 62 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/config.py:55
  • Draft comment:
    Ensure that removing AWS_S3_BUCKET_DOWNLOADS does not affect other parts of the codebase that might rely on it.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_pFrL5fgJF07NGlg1


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

object_keys = await self.async_client.list_files(uri=uri)
if len(object_keys) == 0:
return []
object_uris: list[str] = []
for key in object_keys:
object_uri = f"s3://{settings.AWS_S3_BUCKET_DOWNLOADS}/{key}"
object_uri = f"s3://{settings.AWS_S3_BUCKET_UPLOADS}/{key}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Include DOWNLOAD_FILE_PREFIX in the object_uri construction to maintain consistency with the new S3 path structure.

Suggested change
object_uri = f"s3://{settings.AWS_S3_BUCKET_UPLOADS}/{key}"
object_uri = f"s3://{settings.AWS_S3_BUCKET_UPLOADS}/{DOWNLOAD_FILE_PREFIX}/{key}"

@LawyZheng LawyZheng merged commit fe0f971 into main Nov 29, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/adjust-upload-prefix branch November 29, 2024 09:06
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