chore: remove unused remote plugin download and install codepath#42031
chore: remove unused remote plugin download and install codepath#42031wyattwalter wants to merge 5 commits into
Conversation
Removes the Redis pub/sub plugin-install pipeline and the remote JAR download/hot-load mechanism. This path dates from the 2019 single-server model: it wrote to ephemeral container disk, had no startup reconciliation, and used non-durable pub/sub fan-out, so it cannot work in a multi-pod deployment. All bundled and SaaS plugins load from the image's plugin directory at startup via PF4J, which is unaffected. - PluginServiceCEImpl: drop redisInstallPlugin/downloadAndStartPlugin and the Redis publish in storeWorkspacePlugin; workspace-plugin association is now written directly - PluginServiceCE: drop redisInstallPlugin from the interface - Delete RedisListenerConfig (its only job was consuming these events) and InstallPluginRedisDTO The PluginServiceCEImpl constructor keeps its ReactiveRedisTemplate and ChannelTopic parameters so subclass super(...) calls keep compiling; they are now unused. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The server no longer reads this variable now that the remote plugin install path is removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
WalkthroughRedis-based plugin installation and publishing are removed from the CE server path. Workspace plugin associations are persisted directly, Redis dependencies and listener wiring are deleted, and SSRF host registration includes the runtime ChangesRedis plugin flow removal
SSRF hostname registration
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
With the plugin-install pub/sub pipeline gone, nothing consumes the appsmith:queue channel. Remove the rest of it: - PluginServiceCEImpl / PluginServiceImpl: drop the unused ReactiveRedisTemplate and ChannelTopic constructor parameters - IndexControllerCE / IndexController: drop the /redisPub debug endpoint, which published a test message to the channel and could only report zero subscribers now that the listener is gone - RedisConfig: drop the ChannelTopic bean - PluginServiceCEImplTest: drop the corresponding mocks Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The prior full-suite run failed only because its pinned cloud-services container was unreachable (feature-flag fetch reset all connections), which defaults license_static_url_enabled off and 400s the licensed Static URL specs. Re-running the stale run reuses the same bad CS image; a fresh run picks up a healthy CS. See APP-15720. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nv var" This reverts commit 2e23290.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/server/appsmith-server/src/main/java/com/appsmith/server/plugins/base/PluginServiceCEImpl.java (1)
173-199: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winMissing plugin-existence validation before persisting the association.
The removed Redis-publish path previously looked up the
Pluginfrom the repository before saving the workspace association (per the old-flow description). The new flow drops that lookup and unconditionally appends aWorkspacePluginfor whateverpluginIdis supplied inpluginDTO, without verifying the plugin actually exists inPluginRepository.installPluginonly checks for null/emptypluginId(Line 139), not existence. This lets an invalid/non-existentpluginIdget durably persisted intoworkspace.getPlugins().🛡️ Proposed fix to validate plugin existence before saving
private Mono<Workspace> storeWorkspacePlugin(PluginWorkspaceDTO pluginDTO, WorkspacePluginStatus status) { Mono<Workspace> pluginInWorkspaceMono = workspaceService.findByIdAndPluginsPluginId(pluginDTO.getWorkspaceId(), pluginDTO.getPluginId()); // If plugin is already present for the workspace, just return the workspace, else install and return workspace return pluginInWorkspaceMono.switchIfEmpty(Mono.defer(() -> { log.debug("Plugin {} not already installed. Installing now", pluginDTO.getPluginId()); // If the plugin is not found in the workspace, its not installed already. Install now. - return workspaceService.getById(pluginDTO.getWorkspaceId()).flatMap(workspace -> { + return repository + .findById(pluginDTO.getPluginId()) + .switchIfEmpty(Mono.error(new AppsmithException( + AppsmithError.NO_RESOURCE_FOUND, FieldName.PLUGIN_ID, pluginDTO.getPluginId()))) + .then(workspaceService.getById(pluginDTO.getWorkspaceId())) + .flatMap(workspace -> { Set<WorkspacePlugin> workspacePluginList = workspace.getPlugins();🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/server/appsmith-server/src/main/java/com/appsmith/server/plugins/base/PluginServiceCEImpl.java` around lines 173 - 199, Update storeWorkspacePlugin to validate pluginDTO.getPluginId() through PluginRepository before adding the WorkspacePlugin association or calling workspaceService.save. Preserve the existing already-installed path, and ensure nonexistent plugin IDs terminate without persisting the workspace association, using the repository’s established missing-plugin behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In
`@app/server/appsmith-server/src/main/java/com/appsmith/server/plugins/base/PluginServiceCEImpl.java`:
- Around line 173-199: Update storeWorkspacePlugin to validate
pluginDTO.getPluginId() through PluginRepository before adding the
WorkspacePlugin association or calling workspaceService.save. Preserve the
existing already-installed path, and ensure nonexistent plugin IDs terminate
without persisting the workspace association, using the repository’s established
missing-plugin behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1ca376aa-21e3-467d-acf7-1a0c3c55ad53
📒 Files selected for processing (9)
app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/RedisConfig.javaapp/server/appsmith-server/src/main/java/com/appsmith/server/configurations/RedisListenerConfig.javaapp/server/appsmith-server/src/main/java/com/appsmith/server/controllers/IndexController.javaapp/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/IndexControllerCE.javaapp/server/appsmith-server/src/main/java/com/appsmith/server/dtos/InstallPluginRedisDTO.javaapp/server/appsmith-server/src/main/java/com/appsmith/server/plugins/base/PluginServiceCE.javaapp/server/appsmith-server/src/main/java/com/appsmith/server/plugins/base/PluginServiceCEImpl.javaapp/server/appsmith-server/src/main/java/com/appsmith/server/plugins/base/PluginServiceImpl.javaapp/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/PluginServiceCEImplTest.java
💤 Files with no reviewable changes (7)
- app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/InstallPluginRedisDTO.java
- app/server/appsmith-server/src/main/java/com/appsmith/server/plugins/base/PluginServiceCE.java
- app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/RedisListenerConfig.java
- app/server/appsmith-server/src/main/java/com/appsmith/server/plugins/base/PluginServiceImpl.java
- app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/PluginServiceCEImplTest.java
- app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/RedisConfig.java
- app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/IndexControllerCE.java
Description
Removes the Redis pub/sub plugin-install pipeline and the remote JAR download/hot-load mechanism (
PluginServiceCEImpl.downloadAndStartPlugin,redisInstallPlugin,RedisListenerConfig,InstallPluginRedisDTO), plus the now-unusedAPPSMITH_REMOTE_API_KEYdummy env var in the ci-test workflows.This path dates from the 2019 single-server model: it wrote to ephemeral container disk (
../dist/plugins/), had no startup reconciliation, and relied on non-durable Redis pub/sub fan-out, so it cannot work in a multi-pod deployment. Nothing setsjarLocationanymore, so the download block was unreachable in practice.Not affected:
installPlugin) — still works, now writes the association directly instead of also publishing a no-op Redis eventAlso removes the rest of the now-dead
appsmith:queuechannel: the unusedReactiveRedisTemplate/ChannelTopicconstructor parameters on the plugin service, the/redisPubdebug endpoint (it could only report zero subscribers with the listener gone), and theChannelTopicbean.Linear: https://linear.app/appsmith/issue/APP-15381
Automation
/ok-to-test tags="@tag.All"
🤖 Generated with Claude Code
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/30131707848
Commit: 0ef40f9
Cypress dashboard.
Tags:
@tag.AllSpec:
Fri, 24 Jul 2026 23:46:04 UTC
Summary by CodeRabbit
New Features
Bug Fixes