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

chore!: Remove meteor/check from custom-user-status endpoints #32549

Closed

Conversation

matheusbsilva137
Copy link
Member

@matheusbsilva137 matheusbsilva137 commented Jun 3, 2024

Proposed changes (including videos or screenshots)

  • Remove meteor/check from custom-user-status endpoints by using the validateParams property.

Issue(s)

CORE-318

Steps to test or reproduce

Further comments

The intention for this PR is to improve code readability and make invalid params errors more standardized. No side effects are expected. We're considering this a breaking change since invalid params errors are being changed to follow the same standard when possible.

@matheusbsilva137 matheusbsilva137 added this to the 7.0 milestone Jun 3, 2024
Copy link
Contributor

dionisio-bot bot commented Jun 3, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR has conflicts, please resolve them before merging
  • This PR is missing the 'stat: QA assured' label
  • This PR is not mergeable
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Jun 3, 2024

⚠️ No Changeset found

Latest commit: d2ef9e6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.70%. Comparing base (b97c106) to head (d2ef9e6).
Report is 527 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           develop   #32549       +/-   ##
============================================
+ Coverage    58.59%   75.70%   +17.10%     
============================================
  Files         2739      432     -2307     
  Lines        65696    19919    -45777     
  Branches     14826     5084     -9742     
============================================
- Hits         38496    15079    -23417     
+ Misses       24420     4269    -20151     
+ Partials      2780      571     -2209     
Flag Coverage Δ
e2e ?
e2e-api ?
unit 75.70% <ø> (+0.03%) ⬆️

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

@matheusbsilva137 matheusbsilva137 marked this pull request as ready for review June 3, 2024 21:31
@matheusbsilva137 matheusbsilva137 requested review from a team as code owners June 3, 2024 21:31
@@ -35,14 +36,55 @@ const CustomUserStatusListSchema = {

export const isCustomUserStatusListProps = ajv.compile<CustomUserStatusListProps>(CustomUserStatusListSchema);

type CustomUserStatusCreateProps = { name: string; statusType?: UserStatus };
Copy link
Member

Choose a reason for hiding this comment

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

The validation expects statuses not 100% equal to this type as you can see here: https://github.com/RocketChat/Rocket.Chat/blob/develop/apps/meteor/app/user-status/server/methods/insertOrUpdateUserStatus.ts#L67

Are we good with this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've created a new CustomizableUserStatus type/enum to fix this

name: {
type: 'string',
},
statusType: {
Copy link
Member

Choose a reason for hiding this comment

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

nullable?

Copy link
Member Author

@matheusbsilva137 matheusbsilva137 Aug 27, 2024

Choose a reason for hiding this comment

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

This is a required field (as you can check here). Since this is upposed to be breaking, I believe we can fix this (make it required even though it didn't use to be)

name: {
type: 'string',
},
statusType: {
Copy link
Member

Choose a reason for hiding this comment

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

nullable?

Copy link
Member Author

@matheusbsilva137 matheusbsilva137 Aug 27, 2024

Choose a reason for hiding this comment

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

This is a required field (as you can check here). Since this is upposed to be breaking, I believe we can fix this (make it required even though it didn't use to be)

apps/meteor/tests/end-to-end/api/17-custom-user-status.js Outdated Show resolved Hide resolved
apps/meteor/tests/end-to-end/api/17-custom-user-status.js Outdated Show resolved Hide resolved
apps/meteor/tests/end-to-end/api/17-custom-user-status.js Outdated Show resolved Hide resolved
apps/meteor/tests/end-to-end/api/17-custom-user-status.js Outdated Show resolved Hide resolved
@ggazzo ggazzo requested a review from a team as a code owner June 11, 2024 13:15
@ggazzo ggazzo force-pushed the release-7.0.0 branch 2 times, most recently from ea82dad to 7e69ab1 Compare June 11, 2024 17:57
@ggazzo ggazzo force-pushed the release-7.0.0 branch 3 times, most recently from bc4fad7 to b484993 Compare June 24, 2024 11:48
@ggazzo ggazzo force-pushed the release-7.0.0 branch 2 times, most recently from b285fd4 to 39a6fe1 Compare July 16, 2024 15:10
@ggazzo ggazzo force-pushed the release-7.0.0 branch 4 times, most recently from ce44882 to d94b784 Compare July 29, 2024 19:47
@ggazzo ggazzo force-pushed the release-7.0.0 branch 2 times, most recently from 30f6f98 to 8c447cf Compare August 16, 2024 13:09
@ggazzo ggazzo closed this Aug 16, 2024
@ggazzo ggazzo force-pushed the chore/remove-meteor-check-custom-user-status branch from 1ef21d2 to 8c447cf Compare August 16, 2024 17:46
@ggazzo ggazzo reopened this Aug 16, 2024
@matheusbsilva137 matheusbsilva137 force-pushed the chore/remove-meteor-check-custom-user-status branch from 05b65e0 to ee50d3f Compare August 26, 2024 16:14
@matheusbsilva137 matheusbsilva137 marked this pull request as draft August 26, 2024 16:15
abhinavkrin and others added 16 commits October 11, 2024 18:14
* regression(Marketplace): Restore missing button on empty state

* regression(Marketplace): Restore missing text in `AppsUsageCard`

* regression(Marketplace):  Fix misalignment on marketplace header

* regression(Marketplace): Fix wrong import on uninstall app modal

* regression(Marketplace): Restore link to uninstall app modal
…point (#31889)

* Do not allow unused joinDefaultChannels param in users.update

* Do not allow user creation on users.update endpoint

---------

Co-authored-by: Marcos Spessatto Defendi <[email protected]>
* fix: Update translation key used by 'Forgot Password' e-mail body setting

---------

Co-authored-by: Marcos Spessatto Defendi <[email protected]>
)

* chore: add conditional support to query and fields query params

* chore: add conditional support to query and fields query params

* chore: remove dummyRoute

* chore: add comment on hasSupportedRoutes

* chore: change logger to point to version 8
@ggazzo ggazzo force-pushed the chore/remove-meteor-check-custom-user-status branch from ca695dc to d2ef9e6 Compare October 11, 2024 21:25
Copy link
Contributor

PR Preview Action v1.4.8
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-32549/
on branch gh-pages at 2024-10-11 21:52 UTC

@ggazzo ggazzo force-pushed the release-7.0.0 branch 2 times, most recently from bfefe41 to 204272c Compare October 15, 2024 00:45
@scuciatto scuciatto removed this from the 7.0 milestone Oct 15, 2024
@ggazzo ggazzo force-pushed the release-7.0.0 branch 3 times, most recently from 08d4324 to 57dd899 Compare October 17, 2024 03:35
Base automatically changed from release-7.0.0 to develop October 17, 2024 04:28
An error occurred while trying to automatically change base from release-7.0.0 to develop October 17, 2024 04:28
@scuciatto scuciatto closed this Dec 23, 2024
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.