Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

New config commands#343

Merged
NickCao merged 3 commits intomainfrom
client-cmd-phase1
Mar 15, 2025
Merged

New config commands#343
NickCao merged 3 commits intomainfrom
client-cmd-phase1

Conversation

@NickCao
Copy link
Copy Markdown
Collaborator

@NickCao NickCao commented Mar 13, 2025

Merge with jumpstarter-dev/jumpstarter-e2e#10

Summary by CodeRabbit

  • Documentation

    • Updated CLI documentation with revised command syntax (e.g., using “config create” instead of older variants) for clearer usage instructions.
  • Refactor

    • Consolidated separate configuration operations into unified command groups for both client and exporter management.
    • Updated error messages to reflect the new command structure.
  • Chores

    • Enhanced automated testing workflows through updated configuration references to support the streamlined CLI commands.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 13, 2025

Walkthrough

This pull request standardizes the CLI command syntax and corresponding documentation across the project while updating a GitHub Actions workflow reference. The changes include reorganizing both client and exporter configuration commands into unified config groups, updating error messages, and modifying test invocations to reflect the new command structure. Documentation files are revised accordingly with updated command examples and links.

Changes

File(s) Change Summary
.github/workflows/e2e.yaml Updated workflow action reference from jumpstarter-dev/jumpstarter-e2e@main to jumpstarter-dev/jumpstarter-e2e@client-cmd-phase1.
docs/source/cli/clients.md, docs/source/config/cli.md, docs/source/getting-started/setup-exporter-client.md, docs/source/installation/python-package.md Revised CLI command syntax and link references for both client and exporter commands.
packages/jumpstarter-cli-client/.../__init__.py, client_exporter.py, client_lease.py, client_shell.py, client_test.py, config.py Removed individual client configuration commands, added a unified config command group, and updated error messages and test invocations.
packages/jumpstarter-cli-exporter/.../__init__.py, config.py, exporter_test.py Removed discrete exporter configuration commands, introduced a consolidated config command group, and updated test commands accordingly.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant ClientConfigHandler
    User->>CLI: Run "jmp client config create <name>"
    CLI->>ClientConfigHandler: Dispatch to "create" command
    ClientConfigHandler-->>CLI: Return confirmation message
    CLI-->>User: Display result
Loading
sequenceDiagram
    participant User
    participant CLI
    participant ExporterConfigHandler
    User->>CLI: Run "jmp exporter config edit <name>"
    CLI->>ExporterConfigHandler: Dispatch to "edit" command
    ExporterConfigHandler-->>CLI: Return success response
    CLI-->>User: Show updated configuration
Loading

Suggested reviewers

  • mangelajo

Poem

I hopped through lines of code so bright,
With configs gathered into one sight.
Commands now sing in unified cheer,
Error messages clear and dear.
A bunny's delight in every byte! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c1d770 and eb9dd01.

📒 Files selected for processing (14)
  • .github/workflows/e2e.yaml (1 hunks)
  • docs/source/cli/clients.md (1 hunks)
  • docs/source/config/cli.md (3 hunks)
  • docs/source/getting-started/setup-exporter-client.md (1 hunks)
  • docs/source/installation/python-package.md (2 hunks)
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/__init__.py (2 hunks)
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/client_exporter.py (1 hunks)
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/client_lease.py (2 hunks)
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/client_shell.py (1 hunks)
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/client_test.py (3 hunks)
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/config.py (4 hunks)
  • packages/jumpstarter-cli-exporter/jumpstarter_cli_exporter/__init__.py (2 hunks)
  • packages/jumpstarter-cli-exporter/jumpstarter_cli_exporter/config.py (4 hunks)
  • packages/jumpstarter-cli-exporter/jumpstarter_cli_exporter/exporter_test.py (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (13)
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/client_shell.py
  • docs/source/getting-started/setup-exporter-client.md
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/client_test.py
  • docs/source/cli/clients.md
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/client_exporter.py
  • packages/jumpstarter-cli-exporter/jumpstarter_cli_exporter/exporter_test.py
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/client_lease.py
  • .github/workflows/e2e.yaml
  • docs/source/installation/python-package.md
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/init.py
  • packages/jumpstarter-cli-exporter/jumpstarter_cli_exporter/config.py
  • docs/source/config/cli.md
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/config.py
⏰ Context from checks skipped due to timeout of 90000ms (11)
  • GitHub Check: Redirect rules - jumpstarter-docs
  • GitHub Check: Header rules - jumpstarter-docs
  • GitHub Check: Pages changed - jumpstarter-docs
  • GitHub Check: pytest-matrix (3.11)
  • GitHub Check: pytest-matrix (3.13)
  • GitHub Check: pytest-matrix (3.12)
  • GitHub Check: e2e
  • GitHub Check: build-and-push-image (jumpstarter-dev/jumpstarter Dockerfile)
  • GitHub Check: build-and-push-image (jumpstarter-dev/jumpstarter-dev .devfile/Containerfile)
  • GitHub Check: build-and-push-image (jumpstarter-dev/jumpstarter-devspace .devfile/Containerfile.client)
  • GitHub Check: build-and-push-image (jumpstarter-dev/jumpstarter-utils Dockerfile.utils)
🔇 Additional comments (2)
packages/jumpstarter-cli-exporter/jumpstarter_cli_exporter/__init__.py (2)

7-7: Clean import of consolidated config command.

The import is appropriately structured as a relative import and aligns with the command restructuring mentioned in the PR summary.


22-22: Command structure reorganization looks good.

The configuration-related commands have been consolidated under a single config command, which is now added to the exporter CLI group. This follows good CLI design patterns by grouping related functionality together.

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 13, 2025

Deploy Preview for jumpstarter-docs ready!

Name Link
🔨 Latest commit 3af6312
🔍 Latest deploy log https://app.netlify.com/sites/jumpstarter-docs/deploys/67d5a3f54054a300082464aa
😎 Deploy Preview https://deploy-preview-343--jumpstarter-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
packages/jumpstarter-cli-exporter/jumpstarter_cli_exporter/config.py (5)

23-23: Consider adding short_help parameter for consistency

For consistency with the client config implementation, consider adding a short_help parameter to the command decorator:

-@config.command("create")
+@config.command("create", short_help="Create an exporter config.")

51-51: Consider adding short_help parameter for consistency

For consistency with the client config implementation, consider adding a short_help parameter to the command decorator:

-@config.command("delete")
+@config.command("delete", short_help="Delete an exporter config.")

65-65: Consider adding short_help parameter for consistency

For consistency with the client config implementation, consider adding a short_help parameter to the command decorator:

-@config.command("edit")
+@config.command("edit", short_help="Edit an exporter config.")

76-76: Consider adding short_help parameter for consistency

For consistency with the client config implementation, consider adding a short_help parameter to the command decorator:

-@config.command("list")
+@config.command("list", short_help="List exporter configs.")

30-99: Consider adding exception handling decorator

For consistency with the client config implementation, consider adding the @handle_exceptions decorator to these functions for uniform error handling across the codebase.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 28d6b1c and 1c1d770.

📒 Files selected for processing (14)
  • .github/workflows/e2e.yaml (1 hunks)
  • docs/source/cli/clients.md (1 hunks)
  • docs/source/config/cli.md (3 hunks)
  • docs/source/getting-started/setup-exporter-client.md (1 hunks)
  • docs/source/installation/python-package.md (2 hunks)
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/__init__.py (2 hunks)
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/client_exporter.py (1 hunks)
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/client_lease.py (2 hunks)
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/client_shell.py (1 hunks)
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/client_test.py (3 hunks)
  • packages/jumpstarter-cli-client/jumpstarter_cli_client/config.py (4 hunks)
  • packages/jumpstarter-cli-exporter/jumpstarter_cli_exporter/__init__.py (2 hunks)
  • packages/jumpstarter-cli-exporter/jumpstarter_cli_exporter/config.py (4 hunks)
  • packages/jumpstarter-cli-exporter/jumpstarter_cli_exporter/exporter_test.py (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: pytest-matrix (3.13)
  • GitHub Check: pytest-matrix (3.12)
  • GitHub Check: pytest-matrix (3.11)
  • GitHub Check: e2e
  • GitHub Check: build-and-push-image (jumpstarter-dev/jumpstarter-devspace .devfile/Containerfile.client)
  • GitHub Check: build-and-push-image (jumpstarter-dev/jumpstarter-dev .devfile/Containerfile)
  • GitHub Check: build-and-push-image (jumpstarter-dev/jumpstarter-utils Dockerfile.utils)
  • GitHub Check: build-and-push-image (jumpstarter-dev/jumpstarter Dockerfile)
🔇 Additional comments (26)
packages/jumpstarter-cli-client/jumpstarter_cli_client/client_shell.py (1)

27-27: Command syntax updated for better organization.

The error message now correctly reflects the new command structure, moving from jmp client use-config to jmp client config use. This change is part of standardizing the CLI interface with a more logical command hierarchy.

packages/jumpstarter-cli-client/jumpstarter_cli_client/client_exporter.py (1)

23-23: Command syntax updated consistently.

The error message now correctly reflects the new command structure (jmp client config use), matching the same change made in other files. This maintains consistency throughout the CLI interface.

docs/source/getting-started/setup-exporter-client.md (1)

59-59: Documentation updated to reflect new command structure.

The command example has been correctly updated to use the new syntax (jmp exporter config edit testing), ensuring that users following this guide will use the proper command format. This documentation change is essential for user experience.

.github/workflows/e2e.yaml (1)

19-19: E2E tests updated to use compatible branch.

The workflow now references a specific branch (client-cmd-phase1) of the e2e tests repository that's compatible with the new command structure. This ensures that the tests will work correctly with the updated CLI commands.

Is there a plan to merge these e2e test changes back to the main branch after this PR is complete? Using a feature branch long-term for CI/CD workflows can introduce maintenance challenges.

docs/source/cli/clients.md (2)

82-82: Command reference link updated correctly

The reference link has been updated to reflect the new command structure (config create instead of create-config). This ensures documentation consistency with the new CLI command hierarchy.


85-85: Command syntax updated correctly

The command example has been updated to use the new standardized syntax (client config create instead of client create-config). This provides users with the correct command format for creating client configurations.

docs/source/installation/python-package.md (2)

91-91: Command syntax updated correctly

The command example has been updated to use the new standardized syntax (config list instead of list-configs). This ensures consistency with the CLI command restructuring throughout the project.


132-133: Formatting fix applied

The formatting has been corrected at the end of the documentation table, ensuring proper markdown rendering.

packages/jumpstarter-cli-client/jumpstarter_cli_client/client_lease.py (2)

45-45: Error message updated to reflect new command structure

The error message has been updated to reference the new command syntax (client config use instead of client use-config), ensuring users receive guidance that matches the actual CLI interface.


92-92: Error message updated to reflect new command structure

The error message has been updated to reference the new command syntax (client config use instead of client use-config), ensuring users receive guidance that matches the actual CLI interface.

packages/jumpstarter-cli-exporter/jumpstarter_cli_exporter/exporter_test.py (6)

15-16: Test updated to use new command structure

The test case has been updated to use the new command hierarchy (config create instead of create-config), ensuring that tests verify the current command structure.


34-35: Test updated to use new command structure

The test case for duplicate exporter creation has been updated to use the new command hierarchy, maintaining test coverage for this scenario.


51-51: Interactive test updated to use new command structure

The interactive test for creating exporters has been updated to use the new command format, ensuring continued test coverage for interactive use cases.


56-56: List command test updated

The test for listing exporter configurations has been updated to use the new command structure (config list instead of list-configs).


62-62: Delete command test updated

The test for deleting exporter configurations has been updated to use the new command structure (config delete instead of delete-config).


66-66: Second list command test updated

The second test case for verifying the list output after deletion has been updated to use the new command structure, ensuring complete test coverage.

packages/jumpstarter-cli-client/jumpstarter_cli_client/client_test.py (4)

15-16: Command structure standardization looks good.

The command has been restructured from the previous "create-config" to the more hierarchical "config create", which is more consistent with CLI design patterns. This change makes the interface more intuitive and aligned with other CLI tools.


36-37: LGTM - Consistent command structure.

This command structure change is consistent with the pattern established earlier.


56-56: Appropriate command refactoring.

Successfully updated the interactive client creation test to use the new command structure.


62-62: Well-executed command restructuring.

All client management commands have been consistently updated to follow the new "config [action]" pattern, including list, use, and delete operations. The test assertions remain unchanged, indicating the functionality is preserved while improving the command interface.

Also applies to: 68-68, 72-72, 78-78, 82-82

packages/jumpstarter-cli-exporter/jumpstarter_cli_exporter/__init__.py (1)

7-7: Good refactoring of exporter commands.

The change consolidates multiple configuration-related commands into a single config command group, simplifying the codebase while maintaining functionality. This is consistent with the changes made to the client commands, creating a more unified CLI experience.

Also applies to: 22-22

packages/jumpstarter-cli-client/jumpstarter_cli_client/__init__.py (1)

11-11: Consistent command structure improvements.

Similar to the exporter changes, this refactoring consolidates client configuration commands under a single config command group. This creates a more intuitive and consistent CLI experience across both client and exporter interfaces.

Also applies to: 31-31

docs/source/config/cli.md (2)

93-93: Documentation properly updated to reflect command changes.

The documentation has been thoroughly updated to reflect the new command structure for client operations. This ensures users have accurate information about the CLI interface.

Also applies to: 96-96, 99-99, 103-103, 106-106, 113-113, 116-116


204-204: Exporter documentation consistently updated.

The exporter configuration command documentation has been updated to match the new command structure, maintaining consistency between client and exporter interfaces in both code and documentation.

Also applies to: 207-207, 225-225, 228-228, 234-235, 237-238

packages/jumpstarter-cli-exporter/jumpstarter_cli_exporter/config.py (1)

16-21: Good improvement to the CLI command structure!

Organizing related commands under a config group improves the CLI's usability and follows standard command-line interface patterns.

packages/jumpstarter-cli-client/jumpstarter_cli_client/config.py (1)

23-28: Good improvement to the CLI command structure!

Organizing related commands under a config group improves the CLI's usability and follows standard command-line interface patterns. The use of short_help parameters and the @handle_exceptions decorator demonstrates good practices for CLI development.

@NickCao NickCao force-pushed the client-cmd-phase1 branch from 1c1d770 to eb9dd01 Compare March 14, 2025 14:33
@NickCao NickCao force-pushed the client-cmd-phase1 branch from eb9dd01 to 8211c43 Compare March 15, 2025 15:59
@NickCao NickCao enabled auto-merge March 15, 2025 15:59
@NickCao NickCao merged commit 5b20349 into main Mar 15, 2025
@NickCao NickCao deleted the client-cmd-phase1 branch March 15, 2025 16:11
This was referenced Mar 17, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Apr 4, 2025
@mangelajo mangelajo added this to the 0.6.0 milestone May 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants