feat(providers): add custom profile registry#1170
Open
johntmyers wants to merge 2 commits intomainfrom
Open
Conversation
18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a custom provider profile registry on top of the built-in YAML profile catalog so profiles can be exported, linted, imported, listed, retrieved, and deleted incrementally.
Closes #1081
UX Changes
openshell provider list-profilesnow supports-o table|yaml|json; table remains the default for browsing.openshell provider profile export <id> -o yaml|json; YAML is the default authoring/export format.openshell provider profile import -f <file>for single-profile import.openshell provider profile import --from <directory>for non-recursive bulk import of*.yaml,*.yml, and*.jsonprofile files.openshell provider profile lint -f <file>andopenshell provider profile lint --from <directory>to validate profile files without registering them.openshell provider profile delete <id>for deleting registered custom profiles.Provider.typematches that profile id.Changes
StoredProviderProfileobject metadata support.object_type = "provider_profile"; no new tables or migrations.Provider.typematches the profile id.openshell provider list-profiles -o table|yaml|jsonandopenshell provider profile export|import|lint|delete.docs/*updates remain out of scope for this issue.Testing
RUSTC_WRAPPER= cargo check -p openshell-cli -p openshell-server -p openshell-providersRUSTC_WRAPPER= cargo test -p openshell-providers profileRUSTC_WRAPPER= cargo test -p openshell-server grpc::provider::tests::RUSTC_WRAPPER= cargo test -p openshell-server provider_policy_layers_include_custom_provider_profilesRUSTC_WRAPPER= cargo test -p openshell-cli provider_mise run pre-commitChecklist