- Updated Ginkgo from v1.16.5 to v2.19.0 for improved features and compatibility.
- Added new indirect dependencies including `github.com/go-logr/logr`, `github.com/go-task/slim-sprig/v3`, and `github.com/google/pprof`.
- Ensured consistency in dependency management within go.mod and go.sum files.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Added spaces after comment slashes for better readability in various experiment test files, including container-kill, disk-fill, node-cpu-hog, and others.
- Ensured consistent formatting across all test files to enhance code clarity and maintainability.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Eliminated the logic for manually setting ConnectedInfraID from ExistingInfraID in multiple chaos experiment tests (container-kill, disk-fill, node-cpu-hog, node-io-stress, node-memory-hog, pod-autoscaler, pod-cpu-hog, pod-memory-hog, pod-network-corruption, pod-network-duplication, pod-network-latency, pod-network-loss, pod-delete).
- This change simplifies the infrastructure setup process by relying on the updated logic in the SetupInfrastructure function, enhancing code clarity and maintainability.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replaced environment.ClientSets with Litmus SDK client in pod-delete experiment tests for improved clarity and maintainability.
- Updated SetupInfrastructure and DisconnectInfrastructure functions to utilize the new SDK client, enhancing infrastructure management.
- Streamlined experiment run polling and status checking by leveraging the SDK client, ensuring consistent error handling and logging.
- Enhanced CreateProbe function to utilize the SDK client for probe creation, improving flexibility in chaos experiment configurations.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Introduced probe configuration options in ExperimentDetails, allowing for dynamic probe creation during the pod-delete experiment.
- Updated the GetENV function to read new environment variables related to probe settings.
- Enhanced the pod-delete experiment test to set up and clean up probes based on the new configuration.
- Implemented CreateProbe and CleanupProbe functions to manage probe lifecycle, improving experiment flexibility and maintainability.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Updated various chaos experiment tests (container-kill, disk-fill, pod-autoscaler, pod-cpu-hog, pod-memory-hog, pod-network-corruption, pod-network-duplication, pod-network-latency, pod-network-loss) to include a polling mechanism for checking the availability of experiment runs.
- Enhanced logging to provide detailed insights during the polling process, including retry attempts and found experiment run IDs.
- Removed commented-out kubeconfig retrieval and clientset generation for improved clarity and maintainability.
- Ensured consistent error handling and expectations during experiment run status checks across all updated tests.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Moved the pod-delete experiment request construction logic to a new workflow package for better organization and reusability.
- Introduced a templated approach for generating Argo Workflow manifests, allowing for dynamic parameter handling.
- Enhanced the ExperimentConfig structure to encapsulate experiment-specific configurations.
- Updated the test to utilize the new workflow functions, improving clarity and maintainability of the experiment execution process.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replaced static Argo Workflow manifest with a templated approach for dynamic parameter handling.
- Improved metadata handling by utilizing template data structure for experiment details.
- Streamlined the construction of the experiment request, enhancing clarity and maintainability.
- Updated logging to provide better insights during the experiment request creation process.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replaced the experiment saving logic with a direct creation method for better clarity and error handling.
- Enhanced the experiment run status polling by fetching the latest run ID dynamically.
- Improved logging to provide clearer insights during experiment execution and status checks.
- Updated the experiment request construction to ensure proper handling of experiment run IDs and statuses.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replaced UUID generation with a unique experiment name generation function for better clarity.
- Updated the Argo Workflow manifest to dynamically set the experiment name and improved metadata handling.
- Enhanced logging to provide clearer insights during experiment request construction.
- Streamlined the manifest parsing logic to ensure consistent naming conventions across the experiment lifecycle.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Added a local replacement for github.com/litmuschaos/litmus-go-sdk in go.mod, to be removed after the SDK is published.
- Updated go.sum to reflect the changes in dependencies and their versions.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Introduced a unique experiment name generation using UUID for better identification.
- Updated the Argo Workflow manifest to include proper JSON escaping and dynamic parameters.
- Refactored the manifest parsing logic to modify metadata and workflow names dynamically.
- Improved error handling during manifest parsing and JSON conversion.
This refactor enhances clarity and maintainability of the pod-delete experiment request construction.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Commented out kubeconfig retrieval and clientset generation in the pod-delete experiment test for clarity.
- Enhanced infrastructure setup logic to manually set ConnectedInfraID when using existing infrastructure.
- Refactored clientset generation to retrieve the token using the Auth() method, improving error handling and logging for token retrieval.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Introduce a new utility function, ContainsString, in the pkg module to streamline the checking of final phases in various experiment tests.
- Replace the previous manual phase checking logic with the new utility function across multiple experiment test files, enhancing code clarity and maintainability.
- Ensure consistent handling of final phase validation for improved status checks in experiments.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replace the previous method of fetching the engine template from an external source with a direct construction of an Argo Workflow manifest for Litmus 3.0.
- Update the manifest to include dynamic parameters for experiment execution, enhancing clarity and maintainability.
- Remove unnecessary HTTP requests and YAML parsing, streamlining the experiment request construction process.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Refactor experiment test files to utilize dynamic timeout and polling interval values from environment variables.
- Enhance error messages to reflect the actual timeout duration for better debugging.
- Extend final phase checks to include "Completed_With_Error" and "Terminated" for improved status validation.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replace usage of final status object with final phase string for polling experiment run status.
- Enhance validation checks to ensure final phase is not empty and equals "Completed" after polling.
- Improve code clarity and maintainability by simplifying the status handling in both experiment tests.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Introduce a new `infrastructure` package to handle setup and disconnection of infrastructure for chaos experiments.
- Update experiment test files to utilize the new infrastructure management functions, improving code clarity and maintainability.
- Add new environment variables for controlling infrastructure installation and usage of existing infrastructure.
- Update `go.mod` and `go.sum` to reflect changes in dependencies.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Introduce HTTP fetching of the engine template for the pod-delete experiment.
- Update the manifest construction logic to modify the fetched YAML template with experiment details.
- Replace the placeholder manifest with a dynamic template that adapts based on input parameters.
- Enhance error handling for template fetching and parsing.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Integrate the use of the Litmus SDK for creating and running the pod-delete experiment.
- Refactor test setup to include infrastructure connection and experiment request construction.
- Add new helper function to construct experiment requests with proper manifest YAML.
- Update go.mod and go.sum to include the latest version of github.com/google/uuid.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Add support for connecting to ChaosCenter infrastructure via SDK in the pod-delete experiment.
- Introduce new environment variables for infrastructure configuration.
- Refactor test setup to include infrastructure connection checks and cleanup.
- Update go.mod to include the necessary Litmus SDK dependency.
Signed-off-by: [Your Name] [Your Email]
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>