Skip to content

fix(appstore): deploy ExApps on the only docker daemon - #65703

Closed
stavros-k wants to merge 1 commit into
nextcloud:masterfrom
stavros-k:patch-1
Closed

stavros-k wants to merge 1 commit into
nextcloud:masterfrom
stavros-k:patch-1

Conversation

@stavros-k

@stavros-k stavros-k commented Oct 19, 2026 •

Copy link
Copy Markdown

Summary

When exactly one docker daemon is registered, enableApp read the daemon
from the ref itself instead of its value, so enableExApp got undefined
and failed in the browser before sending any request. The call was also
not awaited, so the error was swallowed and the button only flickered.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@stavros-k
stavros-k requested a review from a team as a code owner October 19, 2026 17:18
@stavros-k
stavros-k requested review from kristian-zendato, pringelmann and skjnldsv and removed request for a team October 19, 2026 17:18
@stavros-k stavros-k changed the title single dockerDaemon in exapps doesn't work from UI fix(appstore): deploy ExApps on the only docker daemon Oct 19, 2026
When exactly one docker daemon is registered, enableApp read the daemon from the ref itself instead of its value, so enableExApp got undefined and failed in the browser before sending any request. The call was also not awaited, so the error was swallowed and the button only flickered.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Stavros Kois <s.kois@outlook.com>
@chrip

chrip commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@stavros-k Thanks for fixing this. The same function has a second problem that affects Kubernetes daemons, and it might make sense to fix it here since it's a few lines further down.

fetchDockerDaemons() keeps only daemons whose accepts_deploy_id is docker-install:

dockerDaemons.value = data.daemons.filter((daemon: IDeployDaemon) => daemon.accepts_deploy_id === 'docker-install')

A HaRP daemon registered with occ app_api:daemon:register ... --harp --k8s gets kubernetes-install (KubernetesActions::DEPLOY_ID), so it never ends up in dockerDaemons. If that's the only daemon, the selection dialog says "No Deploy daemons configured", even though the daemon is the default and "Check connection" passes (since nextcloud/app_api#983). With this PR merged, the one-daemon shortcut still won't trigger for such a setup because the list is empty.

The backend doesn't need a change. ExAppsPageController::enableApp runs app_api:app:register <appid> <daemon>, and that deploys to a kubernetes-install daemon fine when run from occ.

Suggested change:

dockerDaemons.value = data.daemons.filter((daemon: IDeployDaemon) => ['docker-install', 'kubernetes-install'].includes(daemon.accepts_deploy_id))

DaemonSelectionDialog, DaemonSelectionDialogList and AppDeployOptionsModal all read the same list, so this one line covers them. After the change, deployDaemons would describe the ref better than dockerDaemons, but that's your call. A second case in the new spec with a kubernetes-install daemon would cover the filter.

The filter is identical on stable34 and stable35, and HaRP's Kubernetes backend is supported from 34 on, so backports to both would be worth it.

Assisted-by: ClaudeCode:claude-opus-5-5

@stavros-k

Copy link
Copy Markdown
Author

Feel free to take over the PR if you think the fix should be in this PR.
I don't have the time to tackle this right now.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@oleksandr-nc

Copy link
Copy Markdown
Contributor

Thank you for the fix and the test. The app store had more ExApp bugs in the same store (Remove only disabled ExApps, no status polling after an install, no password confirmation for updates), so we fixed them together in #66565, which includes your change and credits you as co-author.

@stavros-k stavros-k closed this Nov 13, 2026
@stavros-k
stavros-k deleted the patch-1 branch November 13, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants