[PR #3246] [MERGED] fix: sanitizeNamespace #4237

Closed
opened 2026-02-22 18:35:25 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/3246
Author: @hakeemsyd
Created: 2/17/2025
Status: Merged
Merged: 2/17/2025
Merged by: @timothycarambat

Base: masterHead: fix/namespace_sanitization


📝 Commits (2)

  • f751b2b fix: sanitizeNamespace
  • 7fc573b Merge branch 'master' into fix/namespace_sanitization

📊 Changes

1 file changed (+75 additions, -25 deletions)

View changed files

📝 server/utils/vectorDbProviders/astra/index.js (+75 -25)

📄 Description

Bug fixes for sanitizing workspace names and handling Astra DB document chunk size limits in collections.

Pull Request Type

  • feat
  • [ x ] 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

N/A

What is in this change?

This PR addresses two key issues identified during testing:

Workspace Name Restriction:
Collections were failing to create when the workspace name contained special characters. This was due to the database constraint that only allows lowercase alphanumeric characters and underscores (_). This fix ensures that workspace names comply with the database restrictions.

Document Size Limitation in Astra DB:
An error occurred when trying to insert documents where the text property exceeded Astra DB’s 8000-byte limit. This fix implements checks and necessary adjustments to ensure that document sizes stay within the allowed limit, preventing insertMany command failures.

Additional Information

N/A

Developer Validations

  • [ x ] I ran yarn lint from the root of the repo & committed changes
  • [ x ] Relevant documentation has been updated
  • [ x ] I have tested my code functionality
  • [ x ] Docker build succeeds locally

🔄 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/Mintplex-Labs/anything-llm/pull/3246 **Author:** [@hakeemsyd](https://github.com/hakeemsyd) **Created:** 2/17/2025 **Status:** ✅ Merged **Merged:** 2/17/2025 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `fix/namespace_sanitization` --- ### 📝 Commits (2) - [`f751b2b`](https://github.com/Mintplex-Labs/anything-llm/commit/f751b2b8593819a47ef4bcb39296090dfd958887) fix: sanitizeNamespace - [`7fc573b`](https://github.com/Mintplex-Labs/anything-llm/commit/7fc573bc2a72e5e36a6cc5ebceb709a8c92d43db) Merge branch 'master' into fix/namespace_sanitization ### 📊 Changes **1 file changed** (+75 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/vectorDbProviders/astra/index.js` (+75 -25) </details> ### 📄 Description Bug fixes for sanitizing workspace names and handling Astra DB document chunk size limits in collections. ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [ x ] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues N/A ### What is in this change? This PR addresses two key issues identified during testing: Workspace Name Restriction: Collections were failing to create when the workspace name contained special characters. This was due to the database constraint that only allows lowercase alphanumeric characters and underscores (_). This fix ensures that workspace names comply with the database restrictions. Document Size Limitation in Astra DB: An error occurred when trying to insert documents where the text property exceeded Astra DB’s 8000-byte limit. This fix implements checks and necessary adjustments to ensure that document sizes stay within the allowed limit, preventing insertMany command failures. ### Additional Information N/A ### Developer Validations <!-- All of the applicable items should be checked. --> - [ x ] I ran `yarn lint` from the root of the repo & committed changes - [ x ] Relevant documentation has been updated - [ x ] I have tested my code functionality - [ x ] Docker build succeeds locally --- <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-22 18:35:25 -05:00
yindo closed this issue 2026-02-22 18:35:25 -05:00
yindo changed title from [PR #3246] fix: sanitizeNamespace to [PR #3246] [MERGED] fix: sanitizeNamespace 2026-06-05 15:17:32 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4237