garden-io / garden

Automation for Kubernetes development and testing. Spin up production-like environments for development, testing, and CI on demand. Use the same configuration and workflows at every step of the process. Speed up your builds and test runs via shared result caching
https://garden.io
Mozilla Public License 2.0
3.33k stars 269 forks source link

[FEATURE]: Expose mutagen status to CLI #2959

Open SimonRichardson opened 2 years ago

SimonRichardson commented 2 years ago

Feature Request

Sometimes mutagen takes a long time to sync when running garden dev. The only way to know what it's doing is to look at mutagen sync list (you have to craft the correct MUTAGEN_DATA_DIRECTORY and mutagen bin).

Background / Motivation

Not knowing when a sync is done without going through all the hoops is really bad UX.

What should the user be able to do?

See the underlying status from the mutagen sync.

Why do they want to do this? What problem does it solve?

UX

Suggested Implementation(s)

Use the Status: Staging files on beta in the CLI.

MUTAGEN_DATA_DIRECTORY=~/tmp/tmp-1140223-ASy7D1yPU9IV ~/.garden/tools/mutagen/1c78e38497434f3f/mutagen sync list
--------------------------------------------------------------------------------
Name: Deployment-aaaa-0
Identifier: sync_bbbb
Labels: None
Alpha:
        URL: /home/xxxx/go/src/github.com/foo/bar
        Connection state: Connected
Beta:
        URL: exec:'/home/user/.garden/tools/kubectl/49eb930aa565a80f/kubectl exec -i --context=xxxx --namespace=yyyy --container foo Deployment/blah -- /.garden/mutagen-agent synchronizer':/idpe
        Connection state: Connected
Status: Staging files on beta

Should be exposed as:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌍  Running in namespace default.dev
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✔ providers                 → Getting status... → Cached
   ℹ Run with --force-refresh to force a refresh of provider statuses.
✔ foo-bar     → Deploying version v-579c23676f... → Done (took 12.6 sec)
   ℹ foo-bar     → Resources ready
   ℹ foo-bar     → Syncing . to /xxxx in Deployment/foo-bar (one-way-replica)
   ℹ foo-bar     → Syncing . to /xxxx in Deployment/foo-bar (one-way-replica)
   → Forward: 127.10.0.4:9999 → Deployment/foo-bar:9999
   → Forward: 127.10.0.4:9998 → Deployment/foo-bar:9998
   → Forward: 127.10.0.4:2345 → Deployment/foo-bar:2345 (debug)
   ✔ foo-bar     → Connected to sync target /xxxx in Deployment/foo-bar
   ✔ foo-bar     → Completed initial sync from . to /xxxx in Deployment/foo-bar

ℹ foo-bar     → Synchronized from . to /xxxx in Deployment/foo-bar at 11:57:56

 Garden dashboard running at http://localhost:9777?key=mv20qctrc1nl97hrlphpdblh

 Currently staging files...

How important is this feature for you/your team?

🌵 Not having this feature makes using Garden painful

SimonRichardson commented 2 years ago

We might have to wait for https://github.com/mutagen-io/mutagen/issues/347 to land first, as using raw strings is really fragile.

thsig commented 2 years ago

Hi @SimonRichardson!

The next version of Mutagen (0.15) will make it a lot easier to parse out detailed sync statuses and metrics, which we'll propagate to Garden as well as we can.

Once we've implemented those changes, they should address your request.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it hasn't had any activity in 90 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Garden a better product!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it hasn't had any activity in 90 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Garden a better product!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it hasn't had any activity in 90 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Garden a better product!

andreavocado commented 1 year ago

Any new news on that?

shumailxyz commented 1 year ago

We haven't implemented this yet, but we are hoping to work on it soon.