Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor uds ui to use vendored runtime #967

Merged
merged 19 commits into from
Oct 17, 2024
Merged

chore: refactor uds ui to use vendored runtime #967

merged 19 commits into from
Oct 17, 2024

Conversation

TristanHoladay
Copy link
Collaborator

@TristanHoladay TristanHoladay commented Oct 9, 2024

Description

Refactors uds ui to vendor uds-runtime by downloading and embedding the Runtime UI release artifact and uds.dev certs. This means CLI will no longer have to download and include the Runtime binary.

Related Issue

https://github.com/defenseunicorns/uds-runtime/issues/417

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

@catsby catsby added this to the v0.18.0 milestone Oct 10, 2024
@catsby catsby self-assigned this Oct 15, 2024
@TristanHoladay TristanHoladay marked this pull request as ready for review October 17, 2024 02:49
@TristanHoladay TristanHoladay requested a review from a team as a code owner October 17, 2024 02:49
@TristanHoladay
Copy link
Collaborator Author

TristanHoladay commented Oct 17, 2024

@catsby some context / questions:

  1. is it right to return an error from the cobra cmd here? i saw none of the other vendored commands were but the uds commands do.

  2. Darcy had implemented handling for the interrupt signal and then cleaning up the temp files. since we don't need the temp files anymore i got rid of all that, but realized in the test that means we have to expect an Error when the interrupt occurs. Is that ok?

  3. I thought it would be cleaner to have the build and cert assets under cmd/assets but because the fs.Sub() in the vendored Setup() is hardcoded to expect ui/build, it was unhappy with assets/ui/build. so i update the download script to place it all under cmd/.

Copy link
Collaborator

@catsby catsby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; I'll sync up with you about question 2 as I'm not 100% sure which test you're talking about, it's not clear to me from these changes here. Question 1 and 3 seem fine to me.

src/cmd/ui.go Outdated Show resolved Hide resolved
src/cmd/ui.go Outdated Show resolved Hide resolved
catsby and others added 3 commits October 17, 2024 13:57
@catsby catsby merged commit f3359dc into main Oct 17, 2024
17 checks passed
@catsby catsby deleted the vendor-runtime branch October 17, 2024 19:46
catsby added a commit that referenced this pull request Oct 17, 2024
* main:
  chore: refactor uds ui to use vendored runtime (#967)
  chore: update LICENSE to AGPL 3.0 (#970)
  fix(deps): update module github.com/defenseunicorns/maru-runner to v0.4.0 (#977)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants