-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 plugin name to server execution metrics #39413
base: release
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request introduces a new field in the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (5)
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
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
🧹 Nitpick comments (1)
app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java (1)
302-303
: Consider using switchIfEmpty for error handling.When deriving ExecuteActionDTO from cached parts, consider adding error handling for empty cases.
Mono<ExecuteActionDTO> executeActionDTOMono = - cachedPartsMono.flatMap(parts -> createExecuteActionDTO(Flux.fromIterable(parts))); + cachedPartsMono.flatMap(parts -> createExecuteActionDTO(Flux.fromIterable(parts))) + .switchIfEmpty(Mono.error(new AppsmithException(AppsmithError.INVALID_PARAMETER, "No parts found")));
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/ExecuteActionMetaDTO.java
(2 hunks)app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: perform-test / client-build / client-build
- GitHub Check: perform-test / rts-build / build
- GitHub Check: perform-test / server-build / server-unit-tests
- GitHub Check: server-unit-tests / server-unit-tests
- GitHub Check: server-spotless / spotless-check
🔇 Additional comments (5)
app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/ExecuteActionMetaDTO.java (1)
3-4
: LGTM! The new plugin field improves code efficiency.The addition of the
plugin
field to store a reactive reference to the plugin is a good optimization that helps avoid redundant plugin fetching during action execution.Also applies to: 8-9, 19-19
app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java (4)
291-293
: LGTM! Efficient caching of multipart data.The caching of multipart data using
collectList().cache()
is a good optimization that prevents multiple reads of the same data.
306-310
: LGTM! Efficient plugin caching strategy.The plugin retrieval and caching strategy is well implemented:
- Uses proper reactive patterns with
flatMap
andcache()
- Stores the plugin in the metadata DTO for reuse
312-319
: LGTM! Good observability with plugin name tagging.The addition of plugin name tagging improves observability in metrics, which is valuable for monitoring and debugging.
345-346
: LGTM! Removed redundant plugin fetching.Good cleanup by removing the redundant plugin fetching in favor of using the cached plugin from the metadata DTO.
Failed server tests
|
app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/ExecuteActionMetaDTO.java
Outdated
Show resolved
Hide resolved
...ith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java
Outdated
Show resolved
Hide resolved
...ith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java
Outdated
Show resolved
Hide resolved
createExecuteActionDTO(partFlux).cache(); | ||
Mono<Plugin> pluginMono = executeActionDTOMono.flatMap(executeActionDTO -> newActionService | ||
.findById(executeActionDTO.getActionId()) | ||
.flatMap(newAction -> pluginService.findById(newAction.getPluginId())) |
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.
@ApekshaBhosale can you please add a check if newAction.getPluginId() is not null?
You can also add error handling for switchIfEmpty() from both the findById() db calls
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.
@ApekshaBhosale can you check the case when executeAction() is called and pluginId is null. This usually happens in the case of JSObject Action.
Also, please handle the case if entire pluginMono is an empty mono here
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.
got it. will check. if action id is not present i will throw an appsmith error with http code 400 but what about plugin id not present, i should not be throwing error right? but handle it @NilanshBansal
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.
Yes thats correct.
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.
js action doesn't get executed on backend at all @NilanshBansal
Failed server tests
|
Description
Tip
Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).
Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.
Fixes #
Issue Number
or
Fixes
Issue URL
Warning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
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/13498408283
Commit: b059249
Cypress dashboard.
Tags:
@tag.All
Spec:
Mon, 24 Feb 2025 13:53:45 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit