Add mirage cleanup command - #870
Merged
Merged
Conversation
dmytrotkk
requested changes
Jul 2, 2025
|
|
||
|
|
||
| def reset_docker_daemon_config() -> None: | ||
| if os.path.isfile(DOCKER_DEAMON_CONFIG_PATH): |
Collaborator
There was a problem hiding this comment.
typo in a word DEAMON -> DAEMON
| with open(DOCKER_DEAMON_CONFIG_PATH, 'r') as daemon_config: | ||
| config = json.load(daemon_config) | ||
|
|
||
| # Remove the keys we added |
Collaborator
There was a problem hiding this comment.
do we need comments here?
| class NoDataDirForChainError(Exception): | ||
| """Raised when no data directory is found""" | ||
|
|
||
| pass |
dmytrotkk
approved these changes
Jul 2, 2025
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.
This pull request introduces significant refactoring and enhancements to the
node_clicodebase, focusing on improving configuration management, streamlining functionality for Mirage nodes, and introducing cleanup mechanisms for Docker configurations. The most notable changes include replacing the legacy environment configuration system with a user configuration system, adding new commands for Mirage node management, and implementing Docker cleanup utilities.Configuration Management Refactor:
node_cli/configs/env.pyfile has been removed, and its functionality has been replaced with a new user configuration system innode_cli/configs/user.py. This introduces structured classes (BaseUserConfig,MirageUserConfig, etc.) for configuration validation and management, improving clarity and extensibility. [1] [2]env.pyhave been replaced withuser.py, ensuring the new user configuration system is utilized across the codebase. [1] [2] [3]Mirage Node Enhancements:
migrateandcleanupcommands tonode_cli/cli/mirage_node.py, enabling users to switch from boot to regular Mirage nodes and clean up Mirage-specific configurations.migratecommand innode_cli/cli/mirage_boot.pyhas been removed, consolidating migration functionality intomirage_node.py.Docker Configuration Cleanup:
node_cli/core/docker_config.pyto remove Skale-specific Docker configurations, reset the Docker daemon configuration, and clean up related directories. These utilities are part of the broader effort to simplify Docker management.Miscellaneous Updates:
get_meta_infowithCliMetaManagerfor retrieving meta information, standardizing the approach across multiple files. [1] [2] [3]validate_env_alias_or_addresstovalidate_alias_or_addressinnode_cli/configs/alias_address_validation.pyfor better readability.