Skip to content

dapr mcpservers: skip cert-expiry check in self-hosted mode, validate --output#1676

Open
Mukuwul wants to merge 3 commits into
dapr:masterfrom
Mukuwul:fix/mcpservers-selfhosted-and-output
Open

dapr mcpservers: skip cert-expiry check in self-hosted mode, validate --output#1676
Mukuwul wants to merge 3 commits into
dapr:masterfrom
Mukuwul:fix/mcpservers-selfhosted-and-output

Conversation

@Mukuwul

@Mukuwul Mukuwul commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Description

Two fixes for the new dapr mcpservers command:

  • Self-hosted runs no longer touch the cluster. PostRun called kubernetes.CheckForCertExpiry() unconditionally, so a purely local resources-directory listing reached for kubeconfig/cluster access. It's now guarded behind kubernetesMode, matching what dapr list does.
  • --output is validated. dapr mcpservers -o table used to be silently accepted and behave like the default; it now fails in PreRun with the valid values (json, yaml, list), matching dapr list's behavior.

The -n shorthand clash described in the issue (name here vs namespace in init/uninstall/workflow/scheduler) is deliberately not touched - changing a shorthand is breaking, so that part needs a maintainer call first.

Issue reference

Fixes #1675

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests (no e2e harness exercises mcpservers yet; happy to add coverage if wanted)
  • Extended the documentation (n/a - behavior fix)

…tput

dapr mcpservers ran kubernetes.CheckForCertExpiry unconditionally in
PostRun, so a purely local resources-directory listing reached for
kubeconfig and cluster access; guard it behind kubernetesMode like
dapr list does. Also validate --output in PreRun, matching dapr list,
instead of silently accepting unknown values.

Fixes dapr#1675

Signed-off-by: Mukul <nmukul32@gmail.com>
@Mukuwul

Mukuwul commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

The red check here is darwin_amd64_complete failing on TestWorkflowChildCalls/fan_out_workflow - the test-scheduler app times out waiting for actor in-flight lock claims during rebalancing. That's unrelated to this change (which only adds --output validation and guards the PostRun cert-expiry check behind kubernetesMode); it's the same flaky workflow test that's been going red intermittently on the macOS runner. A re-run should clear it.

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.

dapr mcpservers: cert-expiry check runs in self-hosted mode, --output unvalidated, -n shorthand clashes with other commands

3 participants