Skip to content

fix(115-open): handle missing path info#2563

Open
syscc wants to merge 1 commit into
OpenListTeam:mainfrom
syscc:fix-115-open-get-folder-info-array
Open

fix(115-open): handle missing path info#2563
syscc wants to merge 1 commit into
OpenListTeam:mainfrom
syscc:fix-115-open-get-folder-info-array

Conversation

@syscc
Copy link
Copy Markdown

@syscc syscc commented Jun 2, 2026

Summary / 摘要

Update github.com/OpenListTeam/115-sdk-go to v0.2.4, which fixes path-based /open/folder/get_info responses where 115 returns data as an array.

OpenList now maps the SDK-level sdk.ErrObjectNotFound to OpenList's internal errs.ObjectNotFound, so internal/op.MakeDir can continue past the existence check and call the actual mkdir API.

  • This PR has breaking changes.
    / 此 PR 包含破坏性变更。
  • This PR changes public API, config, storage format, or migration behavior.
    / 此 PR 修改了公开 API、配置、存储格式或迁移行为。
  • This PR requires corresponding changes in related repositories.
    / 此 PR 需要关联仓库同步修改。

Related repository PRs / 关联仓库 PR:

Related Issues / 关联 Issue

Fixes #2562

Testing / 测试

  • go test ./...
  • Manual test / 手动测试:
    • Reproduced the original failure on Docker v4.2.2 via /api/fs/get and /api/fs/mkdir against a missing /115open/... path.
    • Confirmed existing /115open paths still resolve via /api/fs/get.
    • Ran go list -m github.com/OpenListTeam/115-sdk-go and confirmed v0.2.4.
    • Ran gofmt -w drivers/115_open/driver.go.
    • Ran git diff --check.

go test was not run locally because the local task constraint forbids generating compiled test artifacts/caches. No project binary build was performed.

Checklist / 检查清单

  • I have read CONTRIBUTING.
    / 我已阅读 CONTRIBUTING
  • I confirm this contribution follows the repository license, contribution policy, and code of conduct.
    / 我确认此贡献符合仓库许可证、贡献规范和行为准则。
  • I have formatted the changed code with gofmt, go fmt, or prettier where applicable.
    / 我已按适用情况使用 gofmt, go fmtprettier 格式化变更代码。
  • I have requested review from relevant maintainers or code owners where applicable.
    / 我已在适用情况下请求相关维护者或代码所有者审查。

AI Disclosure / AI 使用声明

  • This PR includes AI-assisted content.
    / 此 PR 包含 AI 辅助内容。

Tools used / 使用工具:

  • ChatGPT
  • Codex
  • GitHub Copilot
  • Claude
  • Gemini
  • Other (please specify) / 其他(请注明):

Usage scope / 使用范围:

  • Code generation / 代码生成

  • Refactoring / 重构

  • Documentation / 文档

  • Tests / 测试

  • Translation / 翻译

  • Review assistance / 审查辅助

  • I have reviewed and validated all AI-assisted content included in this PR.
    / 我已审核并验证此 PR 中的所有 AI 辅助内容。

  • I have ensured that all AI-assisted commits include Co-Authored-By attribution.
    / 我已确保所有 AI 辅助提交都包含 Co-Authored-By 归属信息。

  • I can reproduce all AI-assisted content included in this PR without any AI tools.
    / 我可以在没有任何 AI 工具的情况下重现此 PR 中包含的所有 AI 辅助内容。

@jyxjjj
Copy link
Copy Markdown
Member

jyxjjj commented Jun 2, 2026

请使用正确的PR模板

@jyxjjj jyxjjj added bug invalid Invalid Content/Cannot Reproduce go Module: Driver Driver-Related Issue/PR labels Jun 2, 2026
Copy link
Copy Markdown
Member

@jyxjjj jyxjjj left a comment

Choose a reason for hiding this comment

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

这里的改动属于过度封装:没有真正解决原问题,而是通过新增抽象把问题绕过去了。这样会增加理解和维护成本,也可能掩盖底层缺陷。

建议直接修复根因,而不是引入额外封装来规避问题。

另外,根据代码风格特征以及未使用 PR 模板的情况,该 PR 存在较高概率使用了 AI 辅助生成内容。在继续评审前,请先按照我们的 AI Disclosure Policy 完成相应披露。

@jyxjjj
Copy link
Copy Markdown
Member

jyxjjj commented Jun 2, 2026

建议考虑是否可以从 SDK 侧修复,而非在 OpenList Driver 中单独实现兼容逻辑。这样不仅能够让所有调用方共享修复结果,也能避免相同问题未来在其他位置重复出现。

Zhu 本身也是我们的 Core Dev 之一,我已经将他指派到该 PR。建议先尝试向对应 SDK 仓库提交修复并完成合并,再回到 OpenList 更新依赖解决此问题。

@syscc
Copy link
Copy Markdown
Author

syscc commented Jun 2, 2026

Thanks for the review. You are right that this should be fixed in 115-sdk-go instead of adding OpenList-driver-side compatibility logic.

AI disclosure: this PR was prepared with substantial assistance from OpenAI Codex. Scope: code change, issue reproduction summary, and PR description drafting. I reviewed the generated change and verified it with gofmt and git diff --check. I did not run go test locally because the local project testing constraint forbids generating compiled test artifacts.

I will move the root-cause fix to OpenListTeam/115-sdk-go first, then come back here and update this PR to only bump the SDK dependency after the SDK fix is available.

@syscc
Copy link
Copy Markdown
Author

syscc commented Jun 2, 2026

SDK-side root-cause fix has been submitted here:

This PR should not continue with the current driver-side workaround. After the SDK fix is reviewed/merged and a usable SDK version is available, I will update this OpenList PR to remove the driver-side response parsing code and only bump github.com/OpenListTeam/115-sdk-go, plus any necessary not-found error mapping if required by the SDK API.

@syscc syscc changed the title fix: handle missing 115 Open path info fix(115-open): handle missing path info Jun 2, 2026
@syscc syscc marked this pull request as draft June 2, 2026 12:19
@syscc syscc marked this pull request as ready for review June 2, 2026 12:54
@jyxjjj jyxjjj removed invalid Invalid Content/Cannot Reproduce Module: Driver Driver-Related Issue/PR labels Jun 2, 2026
Co-authored-by: OpenAI Codex <codex@openai.com>
@syscc syscc force-pushed the fix-115-open-get-folder-info-array branch from 6d5b60f to 451bc62 Compare June 2, 2026 16:05
@syscc
Copy link
Copy Markdown
Author

syscc commented Jun 4, 2026

The SDK-side fix has been merged and released as github.com/OpenListTeam/115-sdk-go v0.2.4.

This PR has been updated accordingly:

  • removed the previous driver-side response parsing workaround
  • bumped github.com/OpenListTeam/115-sdk-go to v0.2.4
  • only maps sdk.ErrObjectNotFound to OpenList's internal errs.ObjectNotFound
  • CI checks are passing

@jyxjjj @SheltonZhu could you please re-review when convenient? The previous CHANGES_REQUESTED review is still blocking merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 115 网盘开放平台新建文件夹报错

3 participants