Skip to content

fix: handle PermissionError for local_folder - #174

Merged
yoomlam merged 3 commits into
mainfrom
yl/handle-tmp-local_folder
Jan 30, 2026
Merged

fix: handle PermissionError for local_folder#174
yoomlam merged 3 commits into
mainfrom
yl/handle-tmp-local_folder

Conversation

@yoomlam

@yoomlam yoomlam commented Jan 30, 2026

Copy link
Copy Markdown
Collaborator

Ticket

Following up from this comment

Changes

If needed, set alternative /tmp local_folder before the for-loop

Testing

Preview environment for frontend

♻️ Environment destroyed ♻️

Preview environment for app

♻️ Environment destroyed ♻️

Copilot AI review requested due to automatic review settings January 30, 2026 17:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the RAG ingestion path by validating write permissions for the local_folder used for S3 downloads and falling back to /tmp when needed, while keeping the top-level local ingestion directory consistent with the prior fix in PR #173.

Changes:

  • In populate_vector_db, add a pre-check that attempts to create the configured local_folder, logging and switching to a /tmp/-based path on PermissionError.
  • Update download_s3_folder_to_local to accept an explicit local_folder parameter instead of deriving it from the S3 prefix, ensuring all regions download under the same top-level local folder.
  • Remove the per-region directory-creation and permission handling from download_s3_folder_to_local, centralizing that logic in populate_vector_db.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/ingestion/rag_utils.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@yoomlam
yoomlam merged commit 711831b into main Jan 30, 2026
13 of 14 checks passed
@yoomlam
yoomlam deleted the yl/handle-tmp-local_folder branch January 30, 2026 21:18
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.

3 participants