Skip to content

fix(go): shared chatbot session id length - #16559

Merged
JinHai-CN merged 4 commits into
infiniflow:mainfrom
Harry-Hz-Zhang:fix/chatbot-session-id-length
Jul 2, 2026
Merged

JinHai-CN merged 4 commits into
infiniflow:mainfrom
Harry-Hz-Zhang:fix/chatbot-session-id-length

Conversation

@Harry-Hz-Zhang

Copy link
Copy Markdown
Contributor

Summary

  • use the project-standard 32-character ID generator when creating shared chatbot sessions
  • fix MySQL insert failures caused by writing 36-character UUID strings into api_4_conversation.id

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. labels Jul 2, 2026
@Harry-Hz-Zhang Harry-Hz-Zhang added the ci Continue Integration label Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 52348d78-5b5c-406f-b8cc-6bd1a78d32a1

📥 Commits

Reviewing files that changed from the base of the PR and between 0b9ab12 and a02333f.

📒 Files selected for processing (1)
  • internal/service/bot_completion.go

📝 Walkthrough

Walkthrough

Removed the direct dependency on github.com/google/uuid in bot_completion.go, replacing uuid.NewString() with common.GenerateUUID() for generating new chat session IDs when creating API4Conversation records.

Changes

UUID Generation Update

Layer / File(s) Summary
Replace uuid dependency
internal/service/bot_completion.go
Removed github.com/google/uuid import and switched session ID generation from uuid.NewString() to common.GenerateUUID().

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

A tiny hop, a swap so neat,
uuid packed its bags, retreat!
common.GenerateUUID takes the stage,
one less import on the page.
Thump-thump, ship it — clean and light! 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately reflects the main change: switching chatbot session IDs to the project-standard shorter format.
Description check ✅ Passed The description includes the required Summary and clearly states the change and its MySQL motivation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Harry-Hz-Zhang
Harry-Hz-Zhang marked this pull request as draft July 2, 2026 06:20
@Harry-Hz-Zhang
Harry-Hz-Zhang marked this pull request as ready for review July 2, 2026 06:24
@Harry-Hz-Zhang
Harry-Hz-Zhang marked this pull request as draft July 2, 2026 06:30
@Harry-Hz-Zhang
Harry-Hz-Zhang marked this pull request as ready for review July 2, 2026 06:30
@Harry-Hz-Zhang
Harry-Hz-Zhang marked this pull request as draft July 2, 2026 08:27
@Harry-Hz-Zhang
Harry-Hz-Zhang marked this pull request as ready for review July 2, 2026 08:27
@Harry-Hz-Zhang
Harry-Hz-Zhang marked this pull request as draft July 2, 2026 08:38
@Harry-Hz-Zhang
Harry-Hz-Zhang marked this pull request as ready for review July 2, 2026 08:39
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.16%. Comparing base (404ef4c) to head (b7e1f0f).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16559   +/-   ##
=======================================
  Coverage   93.16%   93.16%           
=======================================
  Files          10       10           
  Lines         717      717           
  Branches      118      118           
=======================================
  Hits          668      668           
  Misses         29       29           
  Partials       20       20           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JinHai-CN
JinHai-CN merged commit d31640a into infiniflow:main Jul 2, 2026
5 of 9 checks passed
xugangqiang pushed a commit to xugangqiang/ragflow that referenced this pull request Jul 3, 2026
## Summary
- use the project-standard 32-character ID generator when creating
shared chatbot sessions
- fix MySQL insert failures caused by writing 36-character UUID strings
into `api_4_conversation.id`
xugangqiang pushed a commit to xugangqiang/ragflow that referenced this pull request Jul 6, 2026
## Summary
- use the project-standard 32-character ID generator when creating
shared chatbot sessions
- fix MySQL insert failures caused by writing 36-character UUID strings
into `api_4_conversation.id`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants