cli
cli copied to clipboard
Exposed config path in standalone mode.
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.
As you can see in the screenshot above, we have two configs:
-
daprConfigDalleApi
is the value specified in themetadata.name
property in the aforementioneddapr.config.yaml
file -
daprConfig
is the usual Dapr Config file created as a result of thedapr 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
Codecov Report
Merging #890 (a6857a0) into master (3bf4b5e) will increase coverage by
0.10%
. The diff coverage is0.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.
@yaron2 Please review this PR.
@yaron2 Please review this PR ...
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!
@yaron2 Any news on this one?
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!
Monthly ping :)
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!
Monthly ping :)
Hey @yaron2, now that I've merged master and resolved some conflicts, can you take a look at this PR please?
@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
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
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!
Montly ping
Montly ping
Apologies, this has gone under my radar. Please resolve the conflicts while I review.
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!
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!