defenseunicorns / uds-cli

GNU Affero General Public License v3.0
26 stars 11 forks source link

feat: add uds ui cmd #917

Closed decleaver closed 1 month ago

decleaver commented 2 months ago

Description

Adds uds ui which launches uds runtime

Related Issue

Relates to #870

Type of change

Checklist before merging

UncleGedd commented 2 months ago

Can we get around having to add the binaries to the repo? Also we shouldn't need to bundle all versions of Runtime into the binary. For example the darwin-arm64 CLI should embed only the darwin-arm64 Runtime. Thoughts?

decleaver commented 2 months ago

Can we get around having to add the binaries to the repo? Also we shouldn't need to bundle all versions of Runtime into the binary. For example the darwin-arm64 CLI should embed only the darwin-arm64 Runtime. Thoughts?

Good point, I can update it to only bundle the matching runtime binary. As far as adding the binaries to the repo, have some thoughts... pros/cons to different approaches.

UncleGedd commented 2 months ago

Great work! I explored vendoring for a bit before realizing that was a dead end. One con to the embedding binary approach is that we're creating tmp dirs with the runtime binary on the user's system, and those tmp dirs can potentially be abandoned if the process is killed and the defer function doesn't get called (like when the user runs ctrl-c)

This can be a separate issue, but I'd like to see the following scenarios handled:

  1. What happens when the user hits ctrl-c? Can we force a cleanup of the tmp dir?
  2. Besides ctrl-c is there a graceful way to exit uds ui?
decleaver commented 2 months ago
  • What happens when the user hits ctrl-c? Can we force a cleanup of the tmp dir?
  • Besides ctrl-c is there a graceful way to exit uds ui?

Created follow on issue: https://github.com/defenseunicorns/uds-cli/issues/922