Skip to content

Conversation

@gaobinlong
Copy link
Contributor

@gaobinlong gaobinlong commented Nov 12, 2025

Description

Trim collaborator ID when adding collaborators for workspace, if the leading whitespace or trailing whitespace are not trimmed, the collaborator may not work.

Issues Resolved

Resolves #10907

Screenshot

image

Testing the changes

  1. In the modal of adding collaborators, input some ID with leading whitespace or trailing whitespace, these spaces will be automatically remove.
  2. Check the collaborator ID in the .kibana index, any whitespace in prefix or suffix are removed.

Changelog

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@github-actions
Copy link
Contributor

ℹ️ Manual Changeset Creation Reminder

Please ensure manual commit for changeset file 10908.yml under folder changelogs/fragments to complete this PR.

If you want to use the available OpenSearch Changeset Bot App to avoid manual creation of changeset file you can install it in your forked repository following this link.

For more information about formatting of changeset files, please visit OpenSearch Auto Changeset and Release Notes Tool.

Signed-off-by: Binlong Gao <[email protected]>
@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.75%. Comparing base (889338b) to head (73264a0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10908      +/-   ##
==========================================
- Coverage   60.75%   60.75%   -0.01%     
==========================================
  Files        4533     4533              
  Lines      122209   122211       +2     
  Branches    20483    20483              
==========================================
+ Hits        74251    74252       +1     
  Misses      42719    42719              
- Partials     5239     5240       +1     
Flag Coverage Δ
Linux_1 26.57% <100.00%> (+<0.01%) ⬆️
Linux_2 38.92% <ø> (ø)
Linux_3 39.44% <ø> (-0.01%) ⬇️
Linux_4 33.74% <ø> (ø)
Windows_1 26.58% <100.00%> (+<0.01%) ⬆️
Windows_2 38.90% <ø> (ø)
Windows_3 39.45% <ø> (+<0.01%) ⬆️
Windows_4 33.74% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

SuZhou-Joe
SuZhou-Joe previously approved these changes Nov 12, 2025
@SuZhou-Joe
Copy link
Member

Wondering if we should trim the id in server side.

Hailong-am
Hailong-am previously approved these changes Nov 12, 2025
@gaobinlong gaobinlong dismissed stale reviews from Hailong-am and SuZhou-Joe via b3294da November 13, 2025 02:11
@gaobinlong
Copy link
Contributor Author

Wondering if we should trim the id in server side.

At first time, I want to implement this in server side, but found that we cannot differentiate new added collaborators and existing collaborators because the update workspace API only supports full update, not partial update, this will cause an issue that any existing collaboratorIds containing leading whitespace or trailing whitespace will be trimmed, this maybe a breaking change I think.

@Hailong-am
Copy link
Collaborator

ci group 16 failure not related to this change.

@Hailong-am Hailong-am merged commit 127fd2e into opensearch-project:main Nov 13, 2025
81 of 82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] workspace collaborator ID not trimmed cause unexpected behavior

5 participants