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
feat: Moved Tenant Information to Redis for quick access #33309
feat: Moved Tenant Information to Redis for quick access #33309
Conversation
Failed server tests
|
Failed server tests
|
Failed server tests
|
...th-server/src/main/java/com/appsmith/server/repositories/ce/CacheableRepositoryHelperCE.java
Outdated
Show resolved
Hide resolved
...er/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/TenantRepositoryCE.java
Show resolved
Hide resolved
...erver/appsmith-server/src/main/java/com/appsmith/server/services/ce/TenantServiceCEImpl.java
Outdated
Show resolved
Hide resolved
…ervices/ce/TenantServiceCEImpl.java Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Failed server tests
|
…g-to-redis' into feature/issue-33083/tenant-config-to-redis
Failed server tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NilanshBansal added couple of minor comments. Also we are updating the tenant in restartTenant
which is making a call to BaseService
and not covered as a part of invalidation. I'm little concerned on invalidation part, let's make sure to override the base service and repository methods which are saving and updating the DB object.
...erver/src/main/java/com/appsmith/server/repositories/ce/CacheableRepositoryHelperCEImpl.java
Outdated
Show resolved
Hide resolved
...erver/src/main/java/com/appsmith/server/repositories/ce/CacheableRepositoryHelperCEImpl.java
Outdated
Show resolved
Hide resolved
…e/issue-33083/tenant-config-to-redis
Failed server tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
...erver/appsmith-server/src/test/java/com/appsmith/server/services/ce/TenantServiceCETest.java
Show resolved
Hide resolved
…e/issue-33083/tenant-config-to-redis
## Description After merging the PR #33309, we started to store the Tenant Information in the Redis cache. Redis needs to serialize the objects upon storing and deserialize post fetching. To do that we need to implement serialization for all the nested user defined Domains. This was missed for the LicenseCE and Payment object. Corresponding EE PR: appsmithorg/appsmith-ee#4191 Fixes #33486 ## Automation /ok-to-test tags="@tag.Settings, @tag.LicenseAndBilling" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/9096922670> > Commit: 559bcd6 > Cypress dashboard: <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9096922670&attempt=3&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank"> Click here!</a> > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/ProductRamps/PrivateEmbedRamp_spec.ts </ol> > To know the list of identified flaky tests - <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">Refer here</a> <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No
)" This reverts commit 306e8c1.
Description
The tenant is fetched multiple times across the appsmith codebase but is rarely updated (from the admin settings). Every time a fetch call to the database is costly both in terms of resources and time taken.
The consolidated api also makes a call to fetch the tenant and return to the client. To improve the performance of fetching the tenant information, we are moving the tenant information to redis cache for quicker fetch.
This will improve the performance of the consolidated api and also reduce the time taken by all the different functionalities within the backend codebase which depend on tenant to process further.
TL;DR
Adds tenant information
tenantService.getDefaultTenant()
to redis.Fixes #33083
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9079438120
Commit: 306e77f
Cypress dashboard url: Click here!
Communication
Should the DevRel and Marketing teams inform users about this change?