-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
chore: refactor customJs lib import flow for pg transaction support #34622
Conversation
…o pg-transaction-datsoure-import-flow
…n-customJsLib-import-flow
Warning Rate limit exceeded@AnaghHegde has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 41 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe changes introduce a mechanism for handling dry run operations for Changes
Sequence Diagram(s)Persist Custom JS Library with Dry Run HandlingsequenceDiagram
participant Client
participant Controller
participant CustomJSLibService
participant DryOperationRepository
Client->>+Controller: Request to persist CustomJSLib
Controller->>+CustomJSLibService: Call persistCustomJSLibMetaDataIfDoesNotExistAndGetDTO
alt isDryOps == true
CustomJSLibService-->>+DryOperationRepository: addDryOpsForEntity(CustomJSLib, customJSLibsDryOps)
else
CustomJSLibService-->>+DryOperationRepository: saveCustomJSLibToDb
end
DryOperationRepository-->>-CustomJSLibService: Response
CustomJSLibService-->>-Controller: Response with CustomJSLibContextDTO
Controller-->>-Client: Return CustomJSLibContextDTO
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
@AnaghHegde Changes looks fine but do we want to continue with separate maps for each entity? If not let's try and move away from it right now otherwise we are taking on debt early on in this refactor 🙏🏽.
@abhvsn I will work on this once i get more clarity on the page and actions refactor. These flows might require some changes hence i am going to stick to this approach for now. |
…o pg-transaction-customJsLib-import-flow
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/DryOperationRepository.java (4 hunks)
Additional context used
Path-based instructions (1)
app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/DryOperationRepository.java (1)
Pattern
**/*.*
: Do not use cy.wait in code.
Do call the add function.
Do not keep duplicate lines in code.
Descriptive test names are used to clearly convey the intent of each test.
Additional comments not posted (5)
app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/DryOperationRepository.java (5)
5-5
: Import statement forCustomJSLib
looks good.The import is necessary for the new functionality.
26-26
: Addition ofcustomJSLibRepository
field looks good.The new field is required for managing
CustomJSLib
entities.
35-35
: Addition ofCustomJSLib
torepoByEntityClass
map looks good.This addition is necessary for repository management.
51-53
: Addition ofsaveCustomJSLibToDb
method looks good.The new method is required for saving
CustomJSLib
entities to the database.
77-86
: Update toexecuteAllDbOps
method looks good.The updated method now includes handling for
CustomJSLib
entities, which is necessary for savingCustomJSLib
entities during dry run operations.
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.
Approving now to unblock, but let's address the debt while refactoring for pages and application import flow.
…o pg-transaction-customJsLib-import-flow
.../appsmith-server/src/main/java/com/appsmith/server/jslibs/base/CustomJSLibServiceCEImpl.java
Show resolved
Hide resolved
.../appsmith-server/src/main/java/com/appsmith/server/jslibs/base/CustomJSLibServiceCEImpl.java
Outdated
Show resolved
Hide resolved
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- app/server/appsmith-server/src/main/java/com/appsmith/server/jslibs/base/CustomJSLibServiceCEImpl.java (5 hunks)
Files skipped from review as they are similar to previous changes (1)
- app/server/appsmith-server/src/main/java/com/appsmith/server/jslibs/base/CustomJSLibServiceCEImpl.java
.../appsmith-server/src/main/java/com/appsmith/server/jslibs/base/CustomJSLibServiceCEImpl.java
Outdated
Show resolved
Hide resolved
We are deferring unit tests to another PR |
…ppsmithorg#34622) ## Description Please refer this document for more details - https://www.notion.so/appsmith/Transaction-Handling-in-PG-468cf8d4255749c3915699e59e91dc2f ## Automation /ok-to-test tags="@tag.Git, @tag.ImportExport, @tag.Templates" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/9855863943> > Commit: b9dfe1d > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9855863943&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Git, @tag.ImportExport, @tag.Templates` > Spec: > <hr>Tue, 09 Jul 2024 11:25:30 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced support for managing custom JavaScript libraries, including dry run operations. - **Enhancements** - Enhanced dry operation handling with new methods and improved logic for managing custom JavaScript libraries. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
Please refer this document for more details - https://www.notion.so/appsmith/Transaction-Handling-in-PG-468cf8d4255749c3915699e59e91dc2f
Automation
/ok-to-test tags="@tag.Git, @tag.ImportExport, @tag.Templates"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9855863943
Commit: b9dfe1d
Cypress dashboard.
Tags:
@tag.Git, @tag.ImportExport, @tag.Templates
Spec:
Tue, 09 Jul 2024 11:25:30 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit