Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

quintush
Copy link
Contributor

@quintush quintush commented Sep 2, 2025

Correct memory leak using a proper deepcopy, instead of reloading charts for each test.
Using tests already setup by @ivankatliarchuk (related to PR #686)

Still need some proper code cleanup.

@Copilot Copilot AI review requested due to automatic review settings September 2, 2025 22:10
Copilot

This comment was marked as outdated.

Copy link

sonarqubecloud bot commented Sep 8, 2025

@quintush quintush requested a review from Copilot September 8, 2025 21:33
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Resolves memory leak issues by implementing deep copy functionality for Helm charts instead of reloading them for each test, improving performance and memory efficiency.

  • Replaces chart path-based loading with pre-loaded chart objects passed to test suites
  • Introduces FullCopyV3Chart function for complete chart cloning including dependencies
  • Adds benchmark testing infrastructure to measure performance improvements

Reviewed Changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/unittest/test_suite.go Updates RunV3 method to accept chart objects instead of paths and implements deep copying
pkg/unittest/test_runner.go Modifies chart loading to pass chart objects rather than file paths
pkg/unittest/deep_copy.go Adds new FullCopyV3Chart function and makes CopySet function public
pkg/unittest/test_suite_test.go Updates all test cases to use pre-loaded chart objects
pkg/unittest/benchmark_test.go Adds new benchmark test for performance measurement
pkg/unittest/deep_copy_test.go Adds tests for the new full copy functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@quintush quintush linked an issue Sep 8, 2025 that may be closed by this pull request
@quintush quintush merged commit 623f6c1 into main Sep 8, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential memory leak in version 0.8.1 causing high resource usage
2 participants