cli icon indicating copy to clipboard operation
cli copied to clipboard

Exposed config path in standalone mode.

Open l0ll098 opened this issue 3 years ago • 16 comments

Description

Changes included in this PR expose a new propery called ConfigPath that, in case of standalone mode, indicates which configuration file has been used. Value of this property would be an absolute path to that config file, that can be then read by the dashboard server later on. Similarly to the MetricsEnabled property, this would be only consumed by the Dashboard, so it won't appear in the dapr list command output. With this new piece of information, dashboard could accordingly populate the "configurations" section.

For example, in the following screenshot you can see a local installation of the Dapr Dashboard (and Dapr CLI) with some changes to handle this case. In particular, I launched a single NodeJS app with the following command: dapr --config dapr.config.yaml --app-id api --app-port 3000 run node dist/server.js, where dapr.config.yaml is a Dapr Configuration file stored in my project directory.

dashboard

As you can see in the screenshot above, we have two configs:

  • daprConfigDalleApi is the value specified in the metadata.name property in the aforementioned dapr.config.yaml file
  • daprConfig is the usual Dapr Config file created as a result of the dapr init command

Note that with the current live Dapr version, you would only see the second one (that is daprConfig).

With these changes, from the point of view of an end user, configurations are handled in the same exact way, both in Standalone mode and in a Kubernetes cluster. If this gets merged, I will proceed to open a new PR in the Dashboard project to add the required dashboard-side logic to handle this case, since I've already a patch ready to go (that depends on this PR).

Issue reference

This PR exposes required information to solve this issue: dapr/dashboard#167

Checklist

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

  • [x] Code compiles correctly
  • [x] Created/updated tests
  • [x] Extended the documentation

l0ll098 avatar Feb 08 '22 19:02 l0ll098

Codecov Report

Merging #890 (a6857a0) into master (3bf4b5e) will increase coverage by 0.10%. The diff coverage is 0.00%.

:exclamation: Current head a6857a0 differs from pull request most recent head 6d8b32a. Consider uploading reports for the commit 6d8b32a to get more accurate results

@@            Coverage Diff             @@
##           master     #890      +/-   ##
==========================================
+ Coverage   29.13%   29.23%   +0.10%     
==========================================
  Files          35       35              
  Lines        2365     2343      -22     
==========================================
- Hits          689      685       -4     
+ Misses       1600     1584      -16     
+ Partials       76       74       -2     
Impacted Files Coverage Δ
pkg/standalone/list.go 5.47% <0.00%> (-0.98%) :arrow_down:
pkg/standalone/testutils.go 75.86% <0.00%> (-1.56%) :arrow_down:
pkg/kubernetes/upgrade.go 19.27% <0.00%> (-0.95%) :arrow_down:
pkg/standalone/uninstall.go 0.00% <0.00%> (ø)
pkg/kubernetes/kubernetes.go 0.00% <0.00%> (ø)
pkg/kubernetes/portforward.go 0.00% <0.00%> (ø)
pkg/standalone/container.go
pkg/standalone/docker.go 0.00% <0.00%> (ø)
pkg/standalone/standalone.go 4.59% <0.00%> (+0.09%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Feb 08 '22 19:02 codecov[bot]

@yaron2 Please review this PR.

mukundansundar avatar Mar 14 '22 15:03 mukundansundar

@yaron2 Please review this PR ...

mukundansundar avatar Apr 08 '22 03:04 mukundansundar

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

dapr-bot avatar May 08 '22 03:05 dapr-bot

@yaron2 Any news on this one?

l0ll098 avatar May 08 '22 08:05 l0ll098

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

dapr-bot avatar Jun 07 '22 08:06 dapr-bot

Monthly ping :)

l0ll098 avatar Jun 07 '22 16:06 l0ll098

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

dapr-bot avatar Jul 07 '22 17:07 dapr-bot

Monthly ping :)

l0ll098 avatar Jul 08 '22 05:07 l0ll098

Hey @yaron2, now that I've merged master and resolved some conflicts, can you take a look at this PR please?

l0ll098 avatar Jul 10 '22 09:07 l0ll098

@l0ll098 Please fix the conflicts in the PR and add E2E tests and doc changes both in README and also https://docs.dapr.io/reference/cli/dapr-list/ in the dapr/docs repo

mukundansundar avatar Aug 02 '22 05:08 mukundansundar

Hi @mukundansundar, I've added some e2e tests as requested and resolved those merge conflicts. Now it should be ready to be reviewed. As per the documentation changes: it appears that currently there is no documentation about each property returned by the dapr list -o json (or yaml for that matter). Since this pr does not change the general behaviour of the list command itself, but rather exposes a new piece of information if and only if the output target is either json or yaml, I'd say there is no need to change those documentation pages. Those changes would make sense once (and if) the documentation gets expanded to explain each field of the output of the dapr list command

l0ll098 avatar Aug 10 '22 09:08 l0ll098

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

dapr-bot avatar Sep 09 '22 09:09 dapr-bot

Montly ping

l0ll098 avatar Sep 10 '22 08:09 l0ll098

Montly ping

Apologies, this has gone under my radar. Please resolve the conflicts while I review.

yaron2 avatar Sep 10 '22 15:09 yaron2

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

dapr-bot avatar Oct 10 '22 16:10 dapr-bot

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

dapr-bot avatar Oct 19 '22 20:10 dapr-bot