chore(appliance): Stub out react UI expected URIs and JSON API#63741
Conversation
There was a problem hiding this comment.
Mostly Cody here and some previous JSON API work mixed in so maybe double check. Either way it's just error handling.
There was a problem hiding this comment.
Moved this and a few other things out of a separate pkg just to consolidate. Plan to delete this whole package as well once the appliance API is properly wired.
8b9b4e5 to
8b194ac
Compare
craigfurman
left a comment
There was a problem hiding this comment.
Good start! I haven't actually kicked the tires on the integration since this is still a draft, but it's good to see it taking shape 🙌
There was a problem hiding this comment.
I think we might want to keep the password strength validation, but can always push that to follow-on issue since there's been a lot of upheaval in this area lately 😅
There was a problem hiding this comment.
Yeah I'll re-add this after this PR
68a53a1 to
e66165f
Compare
- Basic utils to handle read/write json - Basic error handling - URIs stubbed for what the UI expects This is the first step in migrating to the imposed react UI for the appliance.
eeeb8eb to
bf38dcb
Compare
craigfurman
left a comment
There was a problem hiding this comment.
Great work! 🚀
I left a few notes but didn't want to block on any of them, especially since we'll be iterating fast in this area probably. I'll leave it up to you which ones to address and which to punt.
| "sigs.k8s.io/yaml" | ||
|
|
||
| "github.com/sourcegraph/log" | ||
|
|
There was a problem hiding this comment.
optional / maybe for follow-on: we can remove the JWT secret generation from this file
There was a problem hiding this comment.
Ahh I missed that! 🙇
| }), nil | ||
| } | ||
|
|
||
| func (a *Appliance) postSetupHandler() http.Handler { |
There was a problem hiding this comment.
From the PR description, am I right in thinking that the plan is for a follow-on to reintroduce installation?
This PR stubs out the URI needed for the React UI to interface with the appliance, as well as removed the previously implemented UI and components of the React UI that were only around for a demo. A number of helper and safety methods have also been added for interfacing with JSON reads/writes and handling common errors. While the HTTP handlers are still only stubs, this PR was growing in size so I decided to cut it here and break apart the rest in upcoming PRs. React UI is able to parse status and auth correctly at this time. <!-- PR description tips: https://www.notion.so/sourcegraph/Write-a-good-pull-request-description-610a7fd3e613496eb76f450db5a49b6e --> ## Test plan Unit tests ## Changelog <!-- OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c -->
This PR stubs out the URI needed for the React UI to interface with the appliance, as well as removed the previously implemented UI and components of the React UI that were only around for a demo.
A number of helper and safety methods have also been added for interfacing with JSON reads/writes and handling common errors.
While the HTTP handlers are still only stubs, this PR was growing in size so I decided to cut it here and break apart the rest in upcoming PRs. React UI is able to parse status and auth correctly at this time.
Test plan
Unit tests
Changelog