[PR #20] [MERGED] fix(gcs): List returns relative path instead of full path #20

Closed
opened 2026-02-16 09:18:56 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-cloud-kit/pull/20
Author: @minodisk
Created: 1/29/2026
Status: Merged
Merged: 2/1/2026
Merged by: @41tair

Base: mainHead: fix/gcs-list-return-relative-path


📝 Commits (1)

  • 37ed7e2 fix(gcs): List returns relative path instead of full path

📊 Changes

2 files changed (+4 additions, -1 deletions)

View changed files

📝 oss/gcsblob/gcs.go (+1 -1)
📝 tests/oss/oss_test.go (+3 -0)

📄 Description

Summary

  • Fix GCS List method returning full paths (attrs.Name) instead of relative paths (key with prefix stripped)
  • Align behavior with other storage implementations (S3, Local, Azure, Aliyun, Tencent, Huawei, Volcengine)
  • Add test assertion to verify that List returns relative paths

Background

The original implementation in dify-plugin-daemon PR #237 correctly used key, but it was mistakenly changed to attrs.Name when ported to dify-cloud-kit.

Test plan

  • Verified GCS List method returns relative paths

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-cloud-kit/pull/20 **Author:** [@minodisk](https://github.com/minodisk) **Created:** 1/29/2026 **Status:** ✅ Merged **Merged:** 2/1/2026 **Merged by:** [@41tair](https://github.com/41tair) **Base:** `main` ← **Head:** `fix/gcs-list-return-relative-path` --- ### 📝 Commits (1) - [`37ed7e2`](https://github.com/langgenius/dify-cloud-kit/commit/37ed7e21d62308c46eede4a79d64b015f50fc183) fix(gcs): List returns relative path instead of full path ### 📊 Changes **2 files changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `oss/gcsblob/gcs.go` (+1 -1) 📝 `tests/oss/oss_test.go` (+3 -0) </details> ### 📄 Description ## Summary - Fix GCS `List` method returning full paths (`attrs.Name`) instead of relative paths (key with prefix stripped) - Align behavior with other storage implementations (S3, Local, Azure, Aliyun, Tencent, Huawei, Volcengine) - Add test assertion to verify that `List` returns relative paths ## Background The original implementation in dify-plugin-daemon [PR #237](https://github.com/langgenius/dify-plugin-daemon/pull/237) [correctly used `key`](https://github.com/langgenius/dify-plugin-daemon/pull/237/files#diff-1efde200d0fa3fafdd827478fdbca6e8b16dee52955cb3c93faab2849f7d95bfR136), but it was mistakenly changed to `attrs.Name` when ported to dify-cloud-kit. ## Test plan - [x] Verified GCS `List` method returns relative paths --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 09:18:56 -05:00
yindo closed this issue 2026-02-16 09:18:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-cloud-kit#20