-
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: Add API for storing dependencyMap in page object #33296
Conversation
WalkthroughThe recent changes introduce a new feature to persist the dependency map of a page in the backend. This involves adding a new method Changes
Assessment against linked issues
The changes partially address the objectives from the linked issue #33030. The new method for updating the dependency map has been implemented, but the summary does not confirm whether the dependency map is included in the responses of the consolidated and get page APIs, nor whether it's copied during publish. 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 (
|
/build-deploy-preview skip-tests=true |
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: 9
...mith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCE.java
Show resolved
Hide resolved
...mith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCE.java
Show resolved
Hide resolved
app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/PageDTO.java
Show resolved
Hide resolved
app/server/appsmith-server/src/main/java/com/appsmith/server/domains/NewPage.java
Show resolved
Hide resolved
...server/appsmith-server/src/main/java/com/appsmith/server/newpages/base/NewPageServiceCE.java
Show resolved
Hide resolved
...erver/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/PageControllerCE.java
Outdated
Show resolved
Hide resolved
...-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCEImpl.java
Show resolved
Hide resolved
...-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCEImpl.java
Outdated
Show resolved
Hide resolved
...er/appsmith-server/src/main/java/com/appsmith/server/newpages/base/NewPageServiceCEImpl.java
Show resolved
Hide resolved
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9030237362. |
Deploy-Preview-URL: https://ce-33296.dp.appsmith.com |
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
app/server/appsmith-server/src/test/java/com/appsmith/server/services/NewPageServiceTest.java
Outdated
Show resolved
Hide resolved
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9058221426. |
Deploy-Preview-URL: https://ce-33296.dp.appsmith.com |
Failed server tests
|
...-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCEImpl.java
Outdated
Show resolved
Hide resolved
@AnaghHegde since you are adding a new field
cc: @rahulbarwal |
…o feat/dependency-map-page
@AnaghHegde @rahulbarwal can you please confirm if you have checked this? |
@@ -196,4 +199,15 @@ public Mono<ResponseDTO<ApplicationPagesDTO>> getAllPages( | |||
.findApplicationPages(applicationId, pageId, branchName, mode) | |||
.map(resources -> new ResponseDTO<>(HttpStatus.OK.value(), resources, null)); | |||
} | |||
|
|||
@JsonView(Views.Public.class) | |||
@PutMapping("/{defaultPageId}/dependencyMap") |
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.
For my information, any reason we chose to do this as a separate endpoint instead of part of update layout API? Would having a separate endpoint cause a race condition between saving the updated page and saving the new dependency map?
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.
This is a valid concern and we don't have a robust approach at the moment. We are reducing the scope to use the dependency map cache only in the view mode for now. When a user publishes the application, we will trigger the updateDependencyMap API followed by the publish API. The dependency map in the unpublished version will reflect the last published version, and it will be updated with each publish.
We will get back to edit mode dependency maps later when we have a better approach for invalidation of older dependency maps.
@AnaghHegde For the time being we can go ahead with this approach.
cc: @rajatagrawal
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9185693670. |
Deploy-Preview-URL: https://ce-33296.dp.appsmith.com |
@NilanshBansal We are good from git and export point of view. |
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.
Considering @mohanarpit's comment here is addressed, this LGTM.
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9254039242. |
Deploy-Preview-URL: https://ce-33296.dp.appsmith.com |
Description
The dependencyMap consumes considerable computation on the frontend. We would like to persist that in the backend for every page in an application.
For details on the signature and payload of the api calls please refer this document
Slack thread - https://theappsmith.slack.com/archives/C024GUDM0LT/p1714100372372069
Fixes #33030
Automation
/ok-to-test tags="@tag.Git"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9253166755
Commit: 03e9f01
Cypress dashboard url: Click here!
Communication
Should the DevRel and Marketing teams inform users about this change?