Merged
Conversation
dmytrotkk
requested changes
Jul 21, 2025
| cleanup_docker_configuration() | ||
|
|
||
|
|
||
| def request_repair(env: dict, snapshot_from: str = 'any') -> None: |
|
|
||
| def request_repair(env: dict, snapshot_from: str = 'any') -> None: | ||
| record = get_fair_chain_record(env) | ||
| # record.set_repair_ts(int(time.time())) |
dmytrotkk
approved these changes
Jul 22, 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 several changes to improve the functionality and maintainability of the
node_clicodebase. The changes include refactoring methods, renaming functions for clarity, adding new utility functions, and updating the logic for handling Fair node operations. Below is a summary of the most important changes, grouped by theme.Refactoring and Code Simplification:
node_cli/cli/fair_node.py,node_cli/core/node.py,node_cli/operations/fair.py)stop_containertostop_container_by_nameandrm_containertoremove_container_by_name. (node_cli/utils/docker_utils.py, [1] [2]Fair Node Operations:
request_repairfunction with a newrepair_chainfunction, which integrates therepair_fair_opoperation for better modularity. (node_cli/fair/fair_node.py, [1] [2]repaircommand to userepair_chainand added the@streamed_cmddecorator for improved command output handling. (node_cli/cli/fair_node.py, node_cli/cli/fair_node.pyL133-R135)Cleanup and Volume Management:
cleanup_datadir_for_single_chain_nodefunction intocleanup_datadir_contentandcleanup_no_lvm_datadirfor better separation of concerns and reusability. (node_cli/core/schains.py, node_cli/core/schains.pyL256-R304)cleanup_dir_contentto remove the contents of a directory while preserving the directory itself. (node_cli/utils/helper.py, node_cli/utils/helper.pyR327-R337)Utility Enhancements:
is_btrfs_subvolumeto check if a given path is a Btrfs subvolume, improving the handling of Btrfs-specific operations. (node_cli/utils/helper.py, node_cli/utils/helper.pyR416-R424)node_cli/utils/docker_utils.py, node_cli/utils/docker_utils.pyR406-R411)Functionality Updates:
restoreandupdateoperations for Fair nodes to align with the new function naming conventions and improved logic. (node_cli/operations/fair.py, [1] [2]--snapshot-fromoption in therepaircommand from an empty string ('') toNonefor better type consistency. (node_cli/cli/fair_node.py, node_cli/cli/fair_node.pyL122-R122)