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: saveSettings endpoint allowing NaN to be stored on Int settings #32428

Merged
merged 11 commits into from
Jun 21, 2024

Conversation

MartinSchoeler
Copy link
Contributor

@MartinSchoeler MartinSchoeler commented May 13, 2024

CORE-418

Fixes issue that allowed empty strings to be saved in the int settings, causing an NaN value on the DB

Copy link

changeset-bot bot commented May 13, 2024

🦋 Changeset detected

Latest commit: 757b386

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

This PR includes changesets to release 32 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@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/uikit-playground Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/web-ui-registration Patch
@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
Contributor

dionisio-bot bot commented May 13, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.15%. Comparing base (ee43f2c) to head (d25fdfe).
Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #32428   +/-   ##
========================================
  Coverage    55.15%   55.15%           
========================================
  Files         2397     2394    -3     
  Lines        53221    53186   -35     
  Branches     10952    10948    -4     
========================================
- Hits         29353    29337   -16     
+ Misses       21275    21266    -9     
+ Partials      2593     2583   -10     
Flag Coverage Δ
e2e 53.51% <ø> (-0.03%) ⬇️
unit 72.21% <ø> (+0.07%) ⬆️

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

@MartinSchoeler MartinSchoeler marked this pull request as ready for review May 27, 2024 17:40
@MartinSchoeler MartinSchoeler requested a review from a team as a code owner May 27, 2024 17:40
Copy link
Member

@matheusbsilva137 matheusbsilva137 left a comment

Choose a reason for hiding this comment

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

Could you please add an API end-to-end test for this? I believe you could use the settings/:_id POST endpoint

@MartinSchoeler MartinSchoeler requested a review from a team as a code owner May 28, 2024 19:43
.changeset/happy-windows-drum.md Outdated Show resolved Hide resolved
MarcosSpessatto
MarcosSpessatto previously approved these changes Jun 3, 2024
Copy link
Member

@debdutdeb debdutdeb left a comment

Choose a reason for hiding this comment

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

the value is fetched from db, and looks like can possibly be NaN. this tells me the save action is what should always set empty number setting type values to zero, and not be handled as an exception for this specific method.

please help me if I'm missing something.

@debdutdeb debdutdeb dismissed their stale review June 3, 2024 17:17

nvm I was rushing my review and misread, sorry.

@scuciatto scuciatto added this to the 6.10 milestone Jun 5, 2024
KevLehman
KevLehman previously approved these changes Jun 5, 2024
Co-authored-by: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com>
@jessicaschelly jessicaschelly added the stat: QA assured Means it has been tested and approved by a company insider label Jun 18, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 18, 2024
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Jun 19, 2024
@ggazzo ggazzo merged commit e3b3123 into develop Jun 21, 2024
4 of 6 checks passed
@ggazzo ggazzo deleted the fix/saveSettings-nan branch June 21, 2024 02:38
This was referenced Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants