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!: LDAP sync triggers multiple cron jobs in case an invalid sync interval is provided #32285

Open
wants to merge 51 commits into
base: release-7.0.0
Choose a base branch
from

Conversation

matheusbsilva137
Copy link
Contributor

@matheusbsilva137 matheusbsilva137 commented Apr 22, 2024

Proposed changes (including videos or screenshots)

  • Validate LDAP sync intervals before setting up their corresponding cron jobs;
  • Use LDAP sync interval setting's packageValues as the fallback value in case the provided value is invalid;
  • Add a migration to update LDAP sync interval setting's packageValues (from cron description to actual cron expressions, which is the type of value expected by RC since 6.3).

Issue(s)

Steps to test or reproduce

Go to Settings > LDAP > Premium and set an invalid Avatar Background Sync Interval or Auto Logout Interval.
Current behavior: cron jobs are triggered successively (there is no interval between them).
Expected behavior: cron jobs intervals should follow each setting's default value instead.

Further comments

CORE-273

@matheusbsilva137 matheusbsilva137 added this to the 7.0 milestone Apr 22, 2024
Copy link
Contributor

dionisio-bot bot commented Apr 22, 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 Apr 22, 2024

🦋 Changeset detected

Latest commit: fe1a4c1

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

This PR includes changesets to release 34 packages
Name Type
@rocket.chat/meteor Major
@rocket.chat/i18n Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-contexts Major
@rocket.chat/web-ui-registration Major
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/ui-client Major
@rocket.chat/gazzodown Major
@rocket.chat/livechat Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-video-conf Major
@rocket.chat/uikit-playground Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/core-typings Major
@rocket.chat/rest-typings Major
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/model-typings Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service 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/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 Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.53%. Comparing base (bba2a7e) to head (fe1a4c1).

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-7.0.0   #32285      +/-   ##
=================================================
- Coverage          55.59%   55.53%   -0.06%     
=================================================
  Files               2427     2410      -17     
  Lines              53337    53074     -263     
  Branches           10970    10909      -61     
=================================================
- Hits               29651    29475     -176     
+ Misses             21050    20979      -71     
+ Partials            2636     2620      -16     
Flag Coverage Δ
e2e 55.00% <ø> (-0.14%) ⬇️
unit 72.85% <ø> (+0.11%) ⬆️

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

@matheusbsilva137 matheusbsilva137 changed the base branch from develop to release-7.0.0 April 22, 2024 16:04
@matheusbsilva137 matheusbsilva137 marked this pull request as ready for review April 24, 2024 17:35
@matheusbsilva137 matheusbsilva137 requested a review from a team as a code owner April 24, 2024 17:35
packages/i18n/package.json Outdated Show resolved Hide resolved
apps/meteor/server/startup/migrations/v305.ts Outdated Show resolved Hide resolved
@ggazzo ggazzo dismissed MarcosSpessatto’s stale review May 7, 2024 13:39

The merge-base changed after approval.

@matheusbsilva137 matheusbsilva137 requested review from a team as code owners May 7, 2024 13:39
@jessicaschelly jessicaschelly added the stat: QA assured Means it has been tested and approved by a company insider label May 7, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label May 7, 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 stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants