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

Merged

Conversation

matheusbsilva137
Copy link
Member

@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: 816102f

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/core-typings Major
@rocket.chat/rest-typings Major
@rocket.chat/uikit-playground 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/freeswitch Patch
@rocket.chat/fuselage-ui-kit Major
@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/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/network-broker Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-client Major
@rocket.chat/ui-video-conf Major
@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 Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.66%. Comparing base (52ca57d) to head (816102f).
Report is 1 commits behind head on release-7.0.0.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           release-7.0.0   #32285   +/-   ##
==============================================
  Coverage          75.66%   75.66%           
==============================================
  Files                430      430           
  Lines              19904    19904           
  Branches            5079     5079           
==============================================
  Hits               15060    15060           
  Misses              4273     4273           
  Partials             571      571           
Flag Coverage Δ
unit 75.66% <ø> (ø)

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
@ggazzo ggazzo force-pushed the release-7.0.0 branch 2 times, most recently from 472825d to 68fee68 Compare April 24, 2024 14:34
@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
@ggazzo ggazzo force-pushed the release-7.0.0 branch 3 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
@matheusbsilva137 matheusbsilva137 marked this pull request as draft October 8, 2024 19:18
@matheusbsilva137 matheusbsilva137 force-pushed the fix/ldap-triggers-multiple-cron-jobs branch from 63b8a68 to 816102f Compare October 8, 2024 19:18
@matheusbsilva137 matheusbsilva137 removed the request for review from a team October 8, 2024 19:18
@matheusbsilva137 matheusbsilva137 marked this pull request as ready for review October 8, 2024 19:18
@matheusbsilva137 matheusbsilva137 merged commit ec33e68 into release-7.0.0 Oct 9, 2024
50 checks passed
@matheusbsilva137 matheusbsilva137 deleted the fix/ldap-triggers-multiple-cron-jobs branch October 9, 2024 13:27
sampaiodiego pushed a commit that referenced this pull request Oct 9, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
sampaiodiego pushed a commit that referenced this pull request Oct 9, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
abhinavkrin pushed a commit that referenced this pull request Oct 11, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
ggazzo pushed a commit that referenced this pull request Oct 11, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
ggazzo pushed a commit that referenced this pull request Oct 11, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
ggazzo pushed a commit that referenced this pull request Oct 11, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
ggazzo pushed a commit that referenced this pull request Oct 11, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
ggazzo pushed a commit that referenced this pull request Oct 14, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
hugocostadev pushed a commit that referenced this pull request Oct 14, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
MartinSchoeler pushed a commit that referenced this pull request Oct 14, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
ggazzo pushed a commit that referenced this pull request Oct 15, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
ggazzo pushed a commit that referenced this pull request Oct 17, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
ggazzo pushed a commit that referenced this pull request Oct 17, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
ggazzo pushed a commit that referenced this pull request Oct 17, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
debdutdeb pushed a commit that referenced this pull request Oct 18, 2024
…nterval is provided (#32285)

* fix: use settings' packageValue as a fallback to LDAP sync intervals

* fix: add migration to update the packageValue of LDAP sync interval settings
---------

Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
This was referenced Oct 20, 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.

3 participants