Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove users upsert behavior #31822

Closed
wants to merge 9 commits into from

Conversation

matheusbsilva137
Copy link
Member

@matheusbsilva137 matheusbsilva137 commented Feb 23, 2024

Proposed changes (including videos or screenshots)

  • Remove user upsert behavior from users.update endpoint (by making _id field required);
  • Deprecate insertOrUpdateUser Meteor method;
  • Fix users.update and users.create params check to accept the settings field, which was already expected by them internally (this allow users to set their language preference, for example);
  • Fix users.update params check to accept the language field, which was already expected by its internal flow.

Issue(s)

Steps to test or reproduce

Further comments

CORE-79

Copy link

changeset-bot bot commented Feb 23, 2024

🦋 Changeset detected

Latest commit: 00cea1e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 31 packages
Name Type
@rocket.chat/meteor Minor
@rocket.chat/core-typings Minor
@rocket.chat/rest-typings Minor
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/gazzodown Major
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Major
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/api-client Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/models Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-client Major
@rocket.chat/ui-video-conf Major
@rocket.chat/uikit-playground Patch
@rocket.chat/web-ui-registration Major
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.49%. Comparing base (1f93a8a) to head (00cea1e).
Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #31822   +/-   ##
========================================
  Coverage    54.48%   54.49%           
========================================
  Files         2275     2275           
  Lines        50138    50141    +3     
  Branches     10226    10226           
========================================
+ Hits         27319    27324    +5     
+ Misses       20338    20336    -2     
  Partials      2481     2481           
Flag Coverage Δ
e2e 53.43% <ø> (+0.01%) ⬆️
e2e-api 39.90% <ø> (ø)
unit 76.47% <ø> (ø)

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

@matheusbsilva137 matheusbsilva137 changed the title chore: Remove users upsert behavior fix: Remove users upsert behavior Feb 23, 2024
@matheusbsilva137 matheusbsilva137 added this to the 6.7 milestone Feb 23, 2024
@matheusbsilva137 matheusbsilva137 marked this pull request as ready for review February 23, 2024 19:18
@matheusbsilva137 matheusbsilva137 requested review from a team as code owners February 23, 2024 19:18
Copy link
Member

@MarcosSpessatto MarcosSpessatto left a comment

Choose a reason for hiding this comment

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

I'd suggest creating different PRs for each of the purposes, one fix for each fix we are doing here ("accept the settings field" and another one for "accept the language field").

Then we should create a PR for the deprecation method (insertOrUpdateUser), and finally another PR for the "removal of upsert behavior".

@matheusbsilva137
Copy link
Member Author

Thanks for the suggestion, @MarcosSpessatto
Closing this in favor of #31889 , #31888 , #31886 and #31884

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.

2 participants