You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: remove Kubernetes resources on app management uninstall and daemon removal - #1210
Removing an ExApp in the app management unregistered it but left its Kubernetes Deployment, Service and volume in the cluster, and so did removing its Kubernetes deploy daemon in the admin settings. Only occ app_api:app:unregister removed them.
Changes
KubernetesActions::removeExAppResources() removes an ExApp's Kubernetes resources, for every role of a multi-role ExApp, and keeps the volume unless data removal is asked for. The occ command, the uninstall route and the daemon removal use it; removing a deploy daemon also removes the volumes of its ExApps, as it does for Docker.
A multi-role ExApp whose first role fails to be removed still has its other roles removed.
No actionable comments were generated in the recent review.
Walkthrough
Kubernetes resource removal now uses a shared method that reads saved service roles and removes each configured deployment, or removes the single deployment when no roles are saved. Role removal continues after a failure and returns the first error. The unregister command, app management controller, and daemon-removal service call the shared method. The controller and service log data deletion after successful removal. Tests cover role removal and Kubernetes cleanup through these paths. The changelog records the cleanup fix.
Severity of issue fixed: Low
Merge Risk: Moderate · up to 9eadf
Uninstalling an ExApp or removing a deploy daemon on Kubernetes now cleans up its resources. If cleanup fails partway, the app is still unregistered and its role metadata is deleted. Leftover deployments then cannot be removed through AppAPI, and the failure goes unreported. Resolve or explicitly accept this before merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: Kubernetes resources are now removed during app management uninstall and daemon removal. It matches the changeset, which adds removeExAppResources and calls it from th…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description states that removing an ExApp from app management, or removing its Kubernetes deploy daemon, unregistered it but left its Kubernetes Deployment, Service and volume in the cluster. It n…
Full details: Title check
Explanation
The title names the main change: Kubernetes resources are now removed during app management uninstall and daemon removal. It matches the changeset, which adds removeExAppResources and calls it from the uninstall route, the daemon removal path, and the occ command. It is specific enough for a teammate scanning history.
Full details: Description check
Explanation
The description states that removing an ExApp from app management, or removing its Kubernetes deploy daemon, unregistered it but left its Kubernetes Deployment, Service and volume in the cluster. It names the new KubernetesActions::removeExAppResources() method and its use by the occ command, uninstall route and daemon removal. It also notes multi-role removal continues after a first-role failure. These points match the changeset summaries for Unregister, ExAppsPageController, KubernetesActions, AppAPIService and the tests.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 41f916b5-4f4b-460f-8671-3cc2bfa6433d
Commits
Reviewing files that changed from the base of the PR and between cf0e523 and 9eadf2b.
Files selected for processing: 7
CHANGELOG.md
lib/Command/ExApp/Unregister.php
lib/Controller/ExAppsPageController.php
lib/Service/AppAPIService.php
tests/php/Command/ExApp/UnregisterTest.php
tests/php/Controller/ExAppsPageControllerTest.php
tests/php/Service/AppAPIServiceTest.php
Files skipped from review as they are similar to previous changes: 1
CHANGELOG.md
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 59ab8663-3c42-49da-809f-9e7a7c5e1699
Commits
Reviewing files that changed from the base of the PR and between 072b6b4 and 26220bc.
Files selected for processing: 10
CHANGELOG.md
lib/Command/ExApp/Unregister.php
lib/Controller/ExAppsPageController.php
lib/DeployActions/KubernetesActions.php
lib/Service/AppAPIService.php
tests/php/Command/ExApp/UnregisterTest.php
tests/php/Controller/ExAppsPageControllerTest.php
tests/php/DeployActions/KubernetesActionsTest.php
tests/php/Service/AppAPIServiceTest.php
tests/psalm-baseline.xml
Files with no reviewable changes: 1
tests/psalm-baseline.xml
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removing an ExApp in the app management unregistered it but left its Kubernetes Deployment, Service and volume in the cluster, and so did removing its Kubernetes deploy daemon in the admin settings. Only
occ app_api:app:unregisterremoved them.Changes
KubernetesActions::removeExAppResources()removes an ExApp's Kubernetes resources, for every role of a multi-role ExApp, and keeps the volume unless data removal is asked for. The occ command, the uninstall route and the daemon removal use it; removing a deploy daemon also removes the volumes of its ExApps, as it does for Docker.