Repository navigation
fix(kms): unstick onboard UI after a repeated click - #1435
Conversation
1dc17ba to
0574508
Compare
kvinwang
left a comment
There was a problem hiding this comment.
Thanks, the GetSetupStatus approach looks right, and keeping Finish visible after a /finish error is a good fix.
The PR description is out of date. It says Onboard/Bootstrap return the stored keys instead of erroring and that the UI treats the already-provisioned error as success, but the final code still bails in both RPCs and adds a new Onboard.GetSetupStatus RPC instead. The Verification section lists stored_ and auto_bootstrap_ tests rather than the new setup_status_* ones. Please update it to describe the final approach.
The other comments are inline: one functional gap (recovering without a reload when the request succeeds server-side but fails on the client), one UX regression (the buttons now wait on GetAttestationInfo), and several simplifications.
| } | ||
|
|
||
| #[rocket::async_test] | ||
| async fn setup_status_is_not_ready_when_certificates_are_missing() { |
There was a problem hiding this comment.
Five tests for a small status reader feel like a lot. After the simplification above, covering not-provisioned, matching bootstrap info and mismatching bootstrap info should be enough.
| opacity: 0.7; | ||
| } | ||
|
|
||
| button:disabled:hover { |
There was a problem hiding this comment.
Changing the existing rule to button:not(:disabled):hover makes this override unnecessary.
46479ce to
10d5754
Compare
Signed-off-by: Leechael Yim <yanleech@gmail.com>
Signed-off-by: Leechael Yim <yanleech@gmail.com>
Signed-off-by: Leechael Yim <yanleech@gmail.com>
Signed-off-by: Leechael Yim <yanleech@gmail.com>
Signed-off-by: Leechael Yim <yanleech@gmail.com>
Signed-off-by: Leechael Yim <yanleech@gmail.com>
Signed-off-by: Leechael Yim <yanleech@gmail.com>
10d5754 to
948010b
Compare
Problem
Clicking Onboard or Bootstrap again after keys have been stored returns
KMS has already been onboarded(or bootstrapped). The page previously treated this as failure and hid Finish Setup. Reloading also lost the public keys from the first response, with no way to query the stored setup state.Fix
Onboard.GetSetupStatusto read the stored public key and report whether root keys and all required certificates are present.readyimpliesprovisioned. Bootstrap display material is optional: missing, malformed, or mismatchingbootstrap_infodoes not prevent setup recovery.OnboardandBootstraprejecting attempts to provision existing root keys; auto-bootstrap also refuses to replace them./finishfails.Verification
cargo test --manifest-path dstack/Cargo.toml -p dstack-kms --all-features: 60 passed, including 3setup_status_*tests covering unprovisioned, matching, and absent/invalid bootstrap information.cargo clippy --manifest-path dstack/Cargo.toml -p dstack-kms --all-features -- -D warnings -D clippy::expect_used -D clippy::unwrap_used --allow unused_variablespassed.prek run --files dstack/kms/src/onboard_service.rs dstack/kms/src/www/onboard.html dstack/kms/rpc/proto/kms_rpc.protopassed.