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: Cron job for clearing OEmbed cache isn't working #31336

Merged
merged 9 commits into from
Jan 22, 2024

Conversation

matheusbsilva137
Copy link
Member

@matheusbsilva137 matheusbsilva137 commented Dec 28, 2023

Proposed changes (including videos or screenshots)

  • Fix error running cron job for clearing OEmbed cache (we shouldn't check for the uid in this case);
  • Fix data.params undefined error when clearing OEmbed cache (eg with the "Clear" button in the settings).

Issue(s)

Fixes #29434

Steps to test or reproduce

Send some messages containing links with previews, then go to Workspace > Settings > Message and check the value for the Embed Cache Expiration Days setting. A cron job to erase all OEmbed cache registries older than Embed Cache Expiration days should be erased from the database (there should be no document in the rocketchat_oembed_cache collection with an updatedAt field older than defined in the setting).
The cron job runs everydat at 2:24am (this can be changed in this line for test purposes -- use it as * * * * * to run every minute, for example).

Further comments

SUP-425

Copy link

changeset-bot bot commented Dec 28, 2023

🦋 Changeset detected

Latest commit: 4625e37

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

This PR includes changesets to release 30 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/model-typings Patch
@rocket.chat/models 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/omnichannel-services Patch
rocketchat-services Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/instance-status Patch
@rocket.chat/presence Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/api-client Patch
@rocket.chat/license Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/web-ui-registration 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 Dec 28, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (ec285f7) 49.56% compared to head (4625e37) 49.57%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #31336   +/-   ##
========================================
  Coverage    49.56%   49.57%           
========================================
  Files         3318     3315    -3     
  Lines        81542    81505   -37     
  Branches     16750    16742    -8     
========================================
- Hits         40416    40403   -13     
+ Misses       36419    36401   -18     
+ Partials      4707     4701    -6     
Flag Coverage Δ
e2e 53.23% <0.00%> (+0.03%) ⬆️
e2e-api 40.67% <0.00%> (-0.01%) ⬇️
unit 76.50% <ø> (ø)

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 December 28, 2023 20:42
@matheusbsilva137 matheusbsilva137 requested review from a team as code owners December 28, 2023 20:42
heitortanoue
heitortanoue previously approved these changes Dec 29, 2023
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jan 2, 2024
@matheusbsilva137 matheusbsilva137 requested a review from a team as a code owner January 11, 2024 17:35
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Jan 11, 2024
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Jan 22, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jan 22, 2024
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Jan 22, 2024
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Jan 22, 2024
@kodiakhq kodiakhq bot merged commit c8ab658 into develop Jan 22, 2024
45 checks passed
@kodiakhq kodiakhq bot deleted the fix/oembed-clear-cache branch January 22, 2024 22:25
gabriellsh added a commit that referenced this pull request Jan 23, 2024
* 'develop' of github.com:RocketChat/Rocket.Chat: (143 commits)
  fix: Marketplace apps installed as private showing as installed (#31514)
  test: fix messaging flaky test (#31512)
  fix: change the push sound sent when the push is from video conference (#30910)
  fix: ensure sessionId on Sessions documents (#31487)
  chore: handle rocket.cat creation and deletion (#31170)
  chore(agenda): Changes in Agenda API (#31427)
  refactor: Pay the debt of some TODO comments (#30338)
  feat: Room header keyboard navigability (#31516)
  fix: Cron job for clearing OEmbed cache isn't working (#31336)
  refactor(client): Handling of custom statuses (#31500)
  fix: Prevent `Fallback forward departments` feature to go on loop when configured as circular chain (#31328)
  feat: Add `push.test` endpoint (#31289)
  chore: split UserProvider into two: User and Authentication (#31513)
  fix: Can't remove channel's password to join (#31507)
  chore: convert CAS integration code to typescript (#31492)
  feat: Composer keyboard navigability (#31510)
  fix: Render warning in Logs - (MessageType.render is deprecated. Use MessageType.message instead) (#31426)
  feat: Convert emoji shortname to unicode on notification emails. (#31225)
  chore: Normalize `ButtonGroup` (#31499)
  chore: improve type definitions for login service configurations (#31491)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
squad: team-collab stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatic Oembed cache cleaning does not work
7 participants