feat(providers): support profile updates#1914
Conversation
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-1914.docs.buildwithfern.com/openshell |
PR Review StatusValidation: Project-valid. PR #1914 implements approved provider profile update work from #1881, is authored by a repo admin, is non-draft, and DCO/branch checks are passing. Review findings:
Docs: Fern docs were updated in existing provider pages; no navigation change is needed. Next state: |
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
Re-check After Author UpdateI re-evaluated latest head Disposition: partially resolved. Resolved items:
Remaining items:
Docs: Fern docs are updated in the existing provider pages; no navigation change appears needed. E2E: pending. This PR touches provider credential/policy behavior, so Next state: |
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
Re-check After Author UpdateI re-evaluated latest head Disposition: partially resolved. Resolved items:
Remaining items:
Docs: Fern docs are updated in the existing provider pages; no navigation change appears needed. E2E: still pending. This PR touches provider credential/policy behavior, so Next state: |
Summary
Add safe custom provider profile updates through a new
UpdateProviderProfilesRPC andopenshell provider profile update. The update path validates profile batches before writing, preserves stored custom profile metadata, rejects built-in and missing profiles, and keeps provider-derived policy JIT-composed from current profiles.Related Issue
Closes #1881
Changes
proto/openshell.proto: AddedUpdateProviderProfilesRPC and request/response messages.crates/openshell-server/src/grpc/provider.rs: Added custom profile update handling with validation, metadata preservation, built-in/missing rejection, and attached-sandbox dynamic token grant ambiguity checks.crates/openshell-server/src/grpc/policy.rs: Added tests proving updated profile policy reaches sandbox effective config without rewriting provider instances or persisted sandbox source policy, and that profile changes affect provider env revision.crates/openshell-cli/src/main.rs,crates/openshell-cli/src/run.rs: Addedopenshell provider profile update -f|--from.docs/sandboxes/providers-v2.mdx,docs/sandboxes/manage-providers.mdx: Documented custom profile update semantics and rollout behavior.Deviations from Plan
The plan preferred all-or-none server-side batch updates if cleanly supported. The existing persistence API does not provide transactional multi-object CAS, so this implementation validates the full batch before writes and documents the remaining concurrent-write/storage-error retry behavior instead of adding a broad transaction layer.
Testing
cargo test -p openshell-server update_provider_profile -- --nocapturecargo test -p openshell-server sandbox_config_uses_updated_custom_provider_profile -- --nocapturecargo test -p openshell-server provider_env_revision_changes_when_custom_profile_token_grant_changes -- --nocapturecargo test -p openshell-cli provider_profile_commands_parse -- --nocapturecargo test -p openshell-cli provider_profile_cli_run_functions_support_custom_profiles -- --nocapturemise run pre-commite2e/files changedTests added:
Checklist