WeKnora/internal/datasource/connector
Lyang77 fe444c851e
fix(feishu): add shared request pacing and improve HTTP 429 / error 99991400 retries in Feishu Wiki synchronization (#4039)
* fix(feishu): 修复同步请求限流与共享重试等待

* fix(feishu): 完善知识库限流冷却和导出轮询

Bound export polling by poll count so shared pacing and cooldowns retain the
same export ticket without causing false 60-second timeouts. Preserve the
feishu_timeout failure classification when the poll budget is exhausted.

Cap cooldowns, isolate reactive waits by API path, and use a configurable
10-second default when no valid retry hint is available. Refresh expired
tokens before rejoining the request gate to preserve pacing and new cooldowns.

Skip JSON decoding when the legacy rate-limit code is absent, derive the
prefilter from the shared protocol constant, and update configuration docs.
Isolate shared gates in tests and cover cooldowns, cancellation, API grouping,
concurrent token refresh, and timeout classification.

Validation: Feishu core tests pass; diff-scoped Feishu lint reports 0 issues;
gofmt and git diff --check pass. No live Feishu sync was run for this commit.

* fix(feishu): grant request gate slots in arrival order and improve rate-limit logs

- Reserve the next slot before sleeping so concurrent callers are paced in
  FIFO order instead of racing after a shared wake-up.
- Restore the error log for non-rate-limited HTTP 400 download failures.
- Include the API gate name in rate-limit warnings.

---------

Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-10-12 13:00:33 +08:00
..
confluence feat(confluence): add directory sync and private image assets (#3319) 2026-09-25 22:23:48 +08:00
dingtalk fix(datasource/dingtalk): tighten Validate sampling edges (#4079) 2026-10-10 20:32:05 +08:00
feishu fix(feishu): add shared request pacing and improve HTTP 429 / error 99991400 retries in Feishu Wiki synchronization (#4039) 2026-10-12 13:00:33 +08:00
gitlab fix(gitlab): 分页循环补重复页防护与跳数上限 (#3841) 2026-10-08 01:21:37 +08:00
ima fix(datasource): 语雀/Notion/IMA/飞书连接器 API 响应体补体积上限 (#3985) 2026-10-08 14:02:29 +08:00
notion fix(notion): 保留正文抓取失败时的同步游标 (#3693) 2026-10-09 10:43:59 +08:00
rss fix(rss): refresh titles and source links when article text is unchanged (#3824) 2026-10-08 14:02:56 +08:00
seafile feat(datasource): add Seafile data source connector (#3616) 2026-10-08 16:18:09 +08:00
yuque fix(datasource): 语雀/Notion/IMA/飞书连接器 API 响应体补体积上限 (#3985) 2026-10-08 14:02:29 +08:00