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

Add cache-flush step in Twenty upgrade command #7521

Closed
Weiko opened this issue Oct 9, 2024 · 23 comments · Fixed by #7553
Closed

Add cache-flush step in Twenty upgrade command #7521

Weiko opened this issue Oct 9, 2024 · 23 comments · Fixed by #7553

Comments

@Weiko
Copy link
Member

Weiko commented Oct 9, 2024

Scope & Context

upgrade-x.xx commands can sometimes bring migrations to the data model and now that the default cache is redis and persistent we need to make sure to clear it by the end of the command.

Current behavior

Cache needs to be flushed after we run the upgrade command

Expected behavior

Cache flush should be part of the global command

Technical inputs

A command already exists (see FlushCacheCommand) and can be directly added but it's flushing the whole cache. While this could be fine like this, I think we only want to remove keys that follow that pattern engine:* and not interact with the rest (bull, module, ...). This command could be updated to take an optional parameter for that purpose.

@yadavshubham01
Copy link
Contributor

i can work this issue

@yadavshubham01
Copy link
Contributor

@Weiko
please checkout this pr #7553

@charlesBochet
Copy link
Member

/oss.gg 300

Copy link

oss-gg bot commented Oct 10, 2024

Thanks for opening an issue! It's live on oss.gg!

@vamsi-duvvana
Copy link

/assign

Copy link

oss-gg bot commented Oct 10, 2024

Assigned to @vamsi-duvvana! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀

@vamsi-duvvana vamsi-duvvana removed their assignment Oct 10, 2024
@chhote-mote-log
Copy link

/assign

Copy link

oss-gg bot commented Oct 10, 2024

You already have an open issue assigned to you here. Once that's closed or unassigned, only then we recommend you to take up more.

@iharsh02
Copy link

/assign

Copy link

oss-gg bot commented Oct 10, 2024

Assigned to @iharsh02! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀

@Weiko
Copy link
Member Author

Weiko commented Oct 10, 2024

/assign @yadavshubham01

Weiko added a commit that referenced this issue Oct 10, 2024
Flush Specific Redis Keys After Upgrade Command :----

Changes Made :----
Updated the FlushCacheCommand to allow for selective flushing of keys
that match the pattern engine:*, rather than flushing the entire cache.
Added a new optional parameter to specify the cache keys pattern.
Ensured that the cache is flushed at the end of the upgrade command.

Code Changes :----
Modified FlushCacheCommand to include a method for flushing keys by
pattern.
Added a new function in CacheStorageService to handle the pattern-based
flushing.

---------

Co-authored-by: Weiko <[email protected]>
@Weiko Weiko closed this as completed Oct 10, 2024
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Product development ✅ Oct 10, 2024
@ManpreetKhinda
Copy link

/assign

Copy link

oss-gg bot commented Oct 10, 2024

This issue is already assigned to another person. Please find more issues here.

Copy link

oss-gg bot commented Oct 12, 2024

@vamsi-duvvana, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

Copy link

oss-gg bot commented Oct 12, 2024

@iharsh02, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

Copy link

oss-gg bot commented Oct 14, 2024

@vamsi-duvvana, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

Copy link

oss-gg bot commented Oct 14, 2024

@iharsh02, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

@charlesBochet
Copy link
Member

/unassign

Copy link

oss-gg bot commented Oct 14, 2024

Issue unassigned.

harshit078 pushed a commit to harshit078/twenty that referenced this issue Oct 14, 2024
…q#7553)

Flush Specific Redis Keys After Upgrade Command :----

Changes Made :----
Updated the FlushCacheCommand to allow for selective flushing of keys
that match the pattern engine:*, rather than flushing the entire cache.
Added a new optional parameter to specify the cache keys pattern.
Ensured that the cache is flushed at the end of the upgrade command.

Code Changes :----
Modified FlushCacheCommand to include a method for flushing keys by
pattern.
Added a new function in CacheStorageService to handle the pattern-based
flushing.

---------

Co-authored-by: Weiko <[email protected]>
Copy link

oss-gg bot commented Oct 16, 2024

@vamsi-duvvana, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

Copy link

oss-gg bot commented Oct 16, 2024

@iharsh02, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

@iharsh02
Copy link

/unassign

Copy link

oss-gg bot commented Oct 16, 2024

This issue is not assigned to anyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants