-
Notifications
You must be signed in to change notification settings - Fork 171
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
UI Package Deploy Routing Refactor #1265
UI Package Deploy Routing Refactor #1265
Conversation
demo-routing.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some notes
✅ Deploy Preview for zarf-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flow and url paths look good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
## Description This change completely reworks the navigation flow for deploying packages via the UI. The current method is hardcoded to be `/initialize/{operation}`, the new flow enables for **both** the init package, as well as any package to be deployed via the UI utilizing the same flow. 1. UI opens to `/` 2. If uninitialized, user clicks `Initialize Cluster` link 3. --> `/package/deploy?path=init` (for init **ONLY**, the path provided is `init`, otherwise path is a URL encoded full path to a zarf package) 4. UI queries backend `/packages/find-init` and returns init package data 5. Package data is loaded into `pkgStore` 6. If no errors are encountered --> `/package/[name]/configure` where `[name]` is a URI encoded string from the package name; e.g. `zarf-package-init-package-git-server-arm64.tar.zst --> /package/init-package-git-server-arm64/configure` 7. Deployment flow from here is unchanged as the previous flow was 90% ready as a generic package deployment flow (still some work to be done with this flow, but for now it works well enough) This opens the door to a potential use case where a user might only open the UI to deploy a single package, then close it, ie: `zarf package deploy [name].tar.zst --open-ui`, which would provide a URL: `http://localhost:{port}/deploy?path={path to package}` ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [X] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed ---------
Description
This change completely reworks the navigation flow for deploying packages via the UI.
The current method is hardcoded to be
/initialize/{operation}
, the new flow enables for both the init package, as well as any package to be deployed via the UI utilizing the same flow./
Initialize Cluster
link/package/deploy?path=init
(for init ONLY, the path provided isinit
, otherwise path is a URL encoded full path to a zarf package)/packages/find-init
and returns init package datapkgStore
/package/[name]/configure
where[name]
is a URI encoded string from the package name; e.g.zarf-package-init-package-git-server-arm64.tar.zst --> /package/init-package-git-server-arm64/configure
This opens the door to a potential use case where a user might only open the UI to deploy a single package, then close it, ie:
zarf package deploy [name].tar.zst --open-ui
, which would provide a URL:http://localhost:{port}/deploy?path={path to package}
Type of change
Checklist before merging