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: Retention Policy cached settings not updated during upgrade procedure #33237

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

gabriellsh
Copy link
Member

@gabriellsh gabriellsh commented Sep 9, 2024

Proposed changes (including videos or screenshots)

During the server version upgrade procedure, internal DB events are not run before the migration procedures run. This means that other services initialized before that, that depend on updates from the DB are unaware of changes during this time.

In this specific case, the settings cached collection, which was being used to configure the retention policy cron, would have outdated data at the time of running the cron job. This caused issues in workspaces that had the Retention Policy enabled before upgrading to 6.10.

This issue was introduced here #32425
And this PR #33025 was aimed at fixing it, without success (the issue didn't trigger during testing with the fix, despite being tested by multiple people in different environments. Later a better process for reproducing it was found).

The fix for it was to force the cached settings to be updated manually during the migration procedure. An appropriate documentation will be written regarding directives when handling updates that affect sensitive services/features.

Issue(s)

CORE-681

Steps to test or reproduce

Further comments

Copy link
Contributor

dionisio-bot bot commented Sep 9, 2024

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

Copy link

changeset-bot bot commented Sep 9, 2024

🦋 Changeset detected

Latest commit: 5de9bff

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

This PR includes changesets to release 28 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client 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/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/models 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

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.74%. Comparing base (d27cc36) to head (660eff3).
Report is 9 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #33237      +/-   ##
===========================================
+ Coverage    59.33%   59.74%   +0.40%     
===========================================
  Files         2548     2548              
  Lines        63363    63074     -289     
  Branches     14252    14092     -160     
===========================================
+ Hits         37598    37681      +83     
+ Misses       23062    22976      -86     
+ Partials      2703     2417     -286     
Flag Coverage Δ
unit 76.95% <ø> (+1.67%) ⬆️

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

@gabriellsh gabriellsh marked this pull request as ready for review September 9, 2024 17:58
@gabriellsh gabriellsh requested a review from a team as a code owner September 9, 2024 17:58
Copy link
Member

@ggazzo ggazzo left a comment

Choose a reason for hiding this comment

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

changeset

@gabriellsh gabriellsh added this to the 6.12 milestone Sep 11, 2024
@scuciatto scuciatto modified the milestones: 6.12, 6.13 Sep 11, 2024
@jessicaschelly jessicaschelly added the stat: QA assured Means it has been tested and approved by a company insider label Sep 11, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Sep 11, 2024
@ggazzo ggazzo merged commit 41a1816 into develop Sep 12, 2024
7 of 9 checks passed
@ggazzo ggazzo deleted the fix/retentionSettings branch September 12, 2024 12:42
Copy link
Contributor

PR Preview Action v1.4.7
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-33237/
on branch gh-pages at 2024-09-12 12:44 UTC

@scuciatto
Copy link
Member

/patch

Copy link
Contributor

dionisio-bot bot commented Sep 12, 2024

Pull request #33265 added to Project: "Patch 6.12.1"

@scuciatto
Copy link
Member

/backport 6.11.3

Copy link
Contributor

dionisio-bot bot commented Sep 12, 2024

Pull request #33266 added to Project: "Patch 6.11.3"

@scuciatto
Copy link
Member

/backport 6.10.6

Copy link
Contributor

dionisio-bot bot commented Sep 12, 2024

Pull request #33267 added to Project: "Patch 6.10.6"

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 stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants