Open Franr opened 2 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
leverage/modules/kubectl.py | 3 | 6 | 50.0% | ||
leverage/containers/kubectl.py | 41 | 50 | 82.0% | ||
leverage/path.py | 7 | 16 | 43.75% | ||
<!-- | Total: | 52 | 73 | 71.23% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
leverage/path.py | 1 | 71.1% | ||
leverage/modules/kubectl.py | 2 | 72.41% | ||
modules/kubectl.py | 3 | 72.41% | ||
containers/kubectl.py | 10 | 88.89% | ||
path.py | 31 | 71.1% | ||
<!-- | Total: | 47 | --> |
Totals | |
---|---|
Change from base Build 11670882625: | 0.4% |
Covered Lines: | 2518 |
Relevant Lines: | 4032 |
The pull request introduces several enhancements to the KubeCtlContainer
class, adding a new ClusterInfo
data class and modifying the configure
method to accept it as an optional parameter. New methods for cluster scanning and discovery are implemented, improving cluster management capabilities. The auth
module's file handling is updated to ensure robustness in accessing configuration files. Additionally, the kubectl
module sees the introduction of a new command for cluster discovery, and the PathsHandler
class is enhanced with methods for updating the current working directory and checking paths. Test coverage is expanded for these functionalities.
File | Change Summary |
---|---|
leverage/containers/kubectl.py | Added ClusterInfo data class; updated configure method; added _scan_clusters and discover methods. |
leverage/modules/auth.py | Updated file opening mechanism in get_profiles for improved path handling. |
leverage/modules/kubectl.py | Added discover command; updated shell and configure methods to include layer checks. |
leverage/path.py | Added update_cwd method; updated check_for_layer_location and check_for_cluster_layer methods to accept a path parameter. |
pyproject.toml | Added dependency simple-term-menu = "1.6.4" . |
tests/test_containers/test_kubectl.py | Added tests for _scan_clusters and discover methods. |
tests/test_modules/test_auth.py | Updated open_side_effect function and assertions in tests for improved file handling. |
Objective | Addressed | Explanation |
---|---|---|
Support for leverage terraform apply --all-layers command (#123) |
ā | Changes do not implement the required command structure. |
š° In the meadow, I hop with glee,
New clusters found, oh what a spree!
With paths that lead us here and there,
Configs updated with utmost care.
Discovering layers, a joyful quest,
In the world of Kube, we are truly blessed! š¼
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?
What?
Why?
References
closes #123
, if this PR closes a GitHub issue#123
Before release
Review the checklist here
Summary by CodeRabbit
Release Notes
New Features
kubectl
module.ClusterInfo
to encapsulate cluster-related information.Bug Fixes
Tests
Chores
simple-term-menu
for improved user interaction.