feat: auto delete dependency detection#549
Conversation
Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
There was a problem hiding this comment.
Code Review Agent Run #140492
Actionable Suggestions - 2
-
internal/resource/dependency.go - 2
- Incomplete workload type handling in delete dependencies · Line 178-205
- Incorrect CRD dependency namespaces · Line 692-695
Additional Suggestions - 1
-
internal/resource/dependency.go - 1
-
Variable shadowing in loop · Line 709-709The loop variable 'gk' shadows the function parameter 'gk', which can be confusing and error-prone. Consider renaming the loop variable for clarity.
Code suggestion
@@ -707,9 +707,9 @@ - itmGK := item.GroupVersionKind().GroupKind() - - for _, gk := range gk { - if itmGK == gk { - return true - } - } - - return false + itmGK := item.GroupVersionKind().GroupKind() + + for _, targetGK := range gk { + if itmGK == targetGK { + return true + } + } + + return false
-
Review Details
-
Files reviewed - 4 · Commit Range:
5e184b7..e4cf977- internal/plan/plan_build.go
- internal/resource/dependency.go
- internal/resource/resource.go
- internal/resource/resource_test.go
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- Golangci-lint (Linter) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at ilya.lesikov@flant.com.
Documentation & Help
Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
There was a problem hiding this comment.
Code Review Agent Run #5d447f
Actionable Suggestions - 1
-
internal/resource/dependency.go - 1
- Incorrect namespace matching for ClusterRoleBinding · Line 633-673
Review Details
-
Files reviewed - 4 · Commit Range:
e4cf977..711fec2- internal/plan/plan_build.go
- internal/resource/dependency.go
- internal/resource/resource.go
- internal/resource/resource_test.go
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- Golangci-lint (Linter) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at ilya.lesikov@flant.com.
Documentation & Help
Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
Code Review Agent Run #4f26baActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com> # Conflicts: # internal/plan/plan_build.go
Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
There was a problem hiding this comment.
Code Review Agent Run #405881
Actionable Suggestions - 1
-
internal/plan/plan_build.go - 1
- Inconsistent multi-op handling · Line 632-635
Review Details
-
Files reviewed - 4 · Commit Range:
525ae9f..c85dd47- internal/plan/plan_build.go
- internal/resource/dependency.go
- internal/resource/resource.go
- internal/resource/resource_test.go
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- Golangci-lint (Linter) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at ilya.lesikov@flant.com.
Documentation & Help
Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
Code Review Agent Run #f5cbd2Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
Code Review Agent Run #5802f8Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Summary by Bito
This PR introduces automatic dependency detection for resource deletion in the nelm deployment system, enabling the system to automatically identify and manage internal dependencies for various Kubernetes resource types during deletion operations. The changes refactor the core dependency logic by removing hardcoded conditional parsing in service account dependency detection, improving modularity and allowing the system to handle dependencies more effectively without manual assignments. This enhances the deployment tool's reliability in managing complex Kubernetes resource lifecycles by automating what was previously explicit and simplifying plan building operations.
Detailed Changes