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

Fix: google storage init with sa and download #5054

Merged
merged 3 commits into from
Jun 13, 2024

Conversation

kazukitakamatsu
Copy link
Contributor

@kazukitakamatsu kazukitakamatsu commented Jun 10, 2024

Description

Fixed two problems when using Google Storage (STORAGE_TYPE=google-storage).

  • When Service Account is specified, an error occurs when invoking init.
  • Error occurs when worker calls download when uploading files, etc.

Fixes # (issue)

  • none

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • manual test
  1. Create a Google Storage bucket
  2. Create Service Account
  3. Set a key to the created Service Account
  4. Download and Base64 encode the key
  5. Specify STORAGE_TYPE, GOOGLE_STORAGE_BUCKET_NAME, GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64 in environment variables

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
  • optional I have added tests that prove my fix is effective or that my feature works
  • optional New and existing unit tests pass locally with my changes

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐍 python 🐞 bug Something isn't working labels Jun 10, 2024
@JohnJyong JohnJyong self-requested a review June 13, 2024 07:35
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 13, 2024
@crazywoola crazywoola merged commit 3f18369 into langgenius:main Jun 13, 2024
5 checks passed
dengpeng pushed a commit to dengpeng/dify that referenced this pull request Jun 16, 2024
HuberyHuV1 pushed a commit to HuberyHuV1/dify that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants