Skip to content

[ENH] Add config store abstraction to CLI#6879

Open
itaismith wants to merge 2 commits intomainfrom
itai/cli-config-store
Open

[ENH] Add config store abstraction to CLI#6879
itaismith wants to merge 2 commits intomainfrom
itai/cli-config-store

Conversation

@itaismith
Copy link
Copy Markdown
Contributor

Adding config store abstraction to allow for better testing.

@github-actions
Copy link
Copy Markdown

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@propel-code-bot
Copy link
Copy Markdown
Contributor

propel-code-bot bot commented Apr 10, 2026

Introduce ConfigStore Abstraction Across CLI Commands for Testable Config/Profile I/O

This PR introduces a new config/profiles persistence abstraction in rust/cli/src/config_store.rs via the ConfigStore trait and a default FileConfigStore implementation backed by existing utils file I/O functions. It also moves get_current_profile logic into this module so command code can depend on an injected store instead of direct global file reads/writes.

Multiple command modules (profile, login, browse, install, copy, db) are refactored to accept &dyn ConfigStore in core execution paths, while preserving public entrypoints that instantiate FileConfigStore. profile receives the largest update with a new run_profile_command path and expanded end-to-end tests using an in-memory test store. CliConfig and SampleAppsConfig now derive Clone to support in-memory store semantics.

This summary was automatically generated by @propel-code-bot

Copy link
Copy Markdown
Contributor

@propel-code-bot propel-code-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review found no issues; the config store abstraction refactor appears sound and low risk.

Status: No Issues Found | Risk: Low

Review Details

📁 9 files reviewed | 💬 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant