-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename ClientConfig.name to ClientConfig.alias #254
Conversation
WalkthroughThe changes remove the Changes
Suggested reviewers
Poem
Tip 🌐 Web search-backed reviews and chat
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (7)
🔇 Additional comments (1)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
🔭 Outside diff range comments (4)
packages/jumpstarter/jumpstarter/config/user_config_test.py (1)
67-72
: Update remaining test functions to usealias
instead ofname
.For consistency with the PR objective, update the client configurations in
test_user_config_load_no_current_client
andtest_user_config_load_current_client_empty
to usealias
instead ofname
.Apply this diff to update the remaining test functions:
- name="testclient", + alias="testclient",Also applies to: 94-99
packages/jumpstarter/jumpstarter/config/client_config_test.py (3)
91-108
: Update test YAML content to usealias
field.While the assertion has been updated to check
alias
, the test YAML content still uses the old structure. This could lead to test failures.Update the YAML content to match the new structure:
CLIENT_CONFIG = """apiVersion: jumpstarter.dev/v1alpha1 kind: ClientConfig metadata: namespace: default name: testclient +alias: testclient endpoint: jumpstarter.my-lab.com:1443 token: dGhpc2lzYXRva2VuLTEyMzQxMjM0MTIzNEyMzQtc2Rxd3Jxd2VycXdlcnF3ZXJxd2VyLTEyMzQxMjM0MTIz drivers: allow: - jumpstarter.drivers.* - vendorpackage.* """
198-213
: Update test YAML content in save tests to usealias
field.The test YAML content in all save tests still uses the old structure and needs to be updated to include the
alias
field.Update the YAML content in all save tests. Example for the first test:
CLIENT_CONFIG = """apiVersion: jumpstarter.dev/v1alpha1 kind: ClientConfig metadata: namespace: default name: testclient +alias: testclient endpoint: jumpstarter.my-lab.com:1443 tls: ca: '' insecure: false token: dGhpc2lzYXRva2VuLTEyMzQxMjM0MTIzNEyMzQtc2Rxd3Jxd2VycXdlcnF3ZXJxd2VyLTEyMzQxMjM0MTIz drivers: allow: - jumpstarter.drivers.* - vendorpackage.* unsafe: false """
Apply similar changes to the YAML content in
test_client_config_save_explicit_path
andtest_client_config_save_unsafe_drivers
.Also applies to: 233-248, 266-279
305-316
: Update test YAML content in list test to usealias
field.While the assertion has been updated to check
alias
, the test YAML content still uses the old structure.Update the YAML content:
CLIENT_CONFIG = """apiVersion: jumpstarter.dev/v1alpha1 kind: ClientConfig metadata: namespace: default name: testclient +alias: testclient endpoint: jumpstarter.my-lab.com:1443 token: dGhpc2lzYXRva2VuLTEyMzQxMjM0MTIzNEyMzQtc2Rxd3Jxd2VycXdlcnF3ZXJxd2VyLTEyMzQxMjM0MTIz drivers: allow: - jumpstarter.drivers.* - vendorpackage.* """
Also applies to: 325-325
🧹 Nitpick comments (2)
packages/jumpstarter-cli-admin/jumpstarter_cli_admin/delete.py (1)
33-34
: Rename parameter for consistency.For consistency with the renaming from
name
toalias
, consider renaming the function parameter as well.-@click.argument("name", type=str, required=False, default=None) +@click.argument("alias", type=str, required=False, default=None) -async def delete_client(name: Optional[str], kubeconfig: Optional[str], context: Optional[str], namespace: str, delete: bool): +async def delete_client(alias: Optional[str], kubeconfig: Optional[str], context: Optional[str], namespace: str, delete: bool):Also applies to: 46-46, 57-57
packages/jumpstarter-cli-client/jumpstarter_cli_client/client_config.py (1)
83-83
: Rename function parameters for consistency.For consistency with the renaming from
name
toalias
, consider renaming the function parameters in these functions.-def set_next_client(name: str): +def set_next_client(alias: str): -def delete_client_config(name: str): +def delete_client_config(alias: str): -def use_client_config(name: str): +def use_client_config(alias: str):Also applies to: 99-101, 131-133
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
Makefile
(1 hunks)packages/jumpstarter-cli-admin/jumpstarter_cli_admin/create_test.py
(1 hunks)packages/jumpstarter-cli-admin/jumpstarter_cli_admin/delete.py
(1 hunks)packages/jumpstarter-cli-admin/jumpstarter_cli_admin/delete_test.py
(1 hunks)packages/jumpstarter-cli-admin/jumpstarter_cli_admin/import_res_test.py
(1 hunks)packages/jumpstarter-cli-client/jumpstarter_cli_client/client_config.py
(3 hunks)packages/jumpstarter/jumpstarter/config/client.py
(6 hunks)packages/jumpstarter/jumpstarter/config/client_config_test.py
(9 hunks)packages/jumpstarter/jumpstarter/config/user.py
(1 hunks)packages/jumpstarter/jumpstarter/config/user_config_test.py
(7 hunks)
✅ Files skipped from review due to trivial changes (1)
- Makefile
⏰ Context from checks skipped due to timeout of 90000ms (4)
- 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 Dockerfile)
🔇 Additional comments (19)
packages/jumpstarter/jumpstarter/config/user.py (1)
13-17
: Verify backward compatibility with existing serialized configurations.The change from
v.name
tov.alias
might affect existing serialized configurations. Ensure there's a migration path for existing configurations.packages/jumpstarter-cli-client/jumpstarter_cli_client/client_config.py (1)
67-73
: LGTM! Configuration creation is correctly updated.The implementation correctly uses the new
alias
field in the configuration creation.packages/jumpstarter-cli-admin/jumpstarter_cli_admin/import_res_test.py (1)
25-38
: LGTM! Test configurations are correctly updated.The test configurations have been properly updated to use the new
alias
field.packages/jumpstarter-cli-admin/jumpstarter_cli_admin/create_test.py (2)
40-46
: LGTM!The changes correctly update the client configuration to use
alias
instead ofname
, maintaining consistency with the PR objective.Also applies to: 48-54
125-130
: LGTM!The changes correctly update the exporter configuration to use
alias
instead ofname
, maintaining consistency with the PR objective.Also applies to: 141-146
packages/jumpstarter/jumpstarter/config/client.py (6)
39-39
: LGTM!The class attribute has been correctly renamed from
name
toalias
, maintaining the same default value and exclude flag.
127-127
: LGTM!The file path parsing has been correctly updated to set the
alias
attribute instead ofname
.
160-162
: LGTM!The method signature and docstring have been correctly updated to use
alias
instead ofname
.
165-167
: LGTM!The method signature and docstring have been correctly updated to use
alias
instead ofname
.
179-179
: LGTM!The path construction has been correctly updated to use
alias
instead ofname
.
190-192
: LGTM!The method signatures and docstrings have been correctly updated to use
alias
instead ofname
.Also applies to: 212-214
packages/jumpstarter-cli-admin/jumpstarter_cli_admin/delete_test.py (2)
31-37
: LGTM!The client configuration has been correctly updated to use
alias
instead ofname
.
141-146
: LGTM!The exporter configuration has been correctly updated to use
alias
instead ofname
.packages/jumpstarter/jumpstarter/config/user_config_test.py (4)
35-36
: LGTM!The client configuration and assertion have been correctly updated to use
alias
instead ofname
.Also applies to: 48-48
197-198
: LGTM!The client configuration has been correctly updated to use
alias
instead ofname
.
238-239
: LGTM!The client configurations and assertion have been correctly updated to use
alias
instead ofname
.Also applies to: 250-251, 263-263
278-279
: LGTM!The client configuration has been correctly updated to use
alias
instead ofname
.packages/jumpstarter/jumpstarter/config/client_config_test.py (2)
29-29
: LGTM! Environment-based configuration tests updated correctly.The changes consistently replace
name
withalias
across all environment-based configuration tests while maintaining comprehensive test coverage.Also applies to: 51-51, 68-68
178-178
: LGTM! Constructor calls and assertions updated correctly.The changes consistently update all constructor calls and assertions to use
alias
.Also applies to: 186-186, 215-215, 250-250, 281-281
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.... otherwise we have .name and .metadata.name
Summary by CodeRabbit
name
toalias
for improved clarity and consistency.alias
.