Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: skip destroy imported resources #1239

Merged
merged 6 commits into from
Aug 1, 2024

Conversation

hoangndst
Copy link
Collaborator

What type of PR is this?

/kind feature

What this PR does / why we need it:

When the imported tf resource is still used by another release, we need to retain it so that the release using that resource can function properly.

Which issue(s) this PR fixes:

Fixes #1200

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., design docs, usage docs, etc.:


@hoangndst hoangndst changed the title Skip destroy imported rs feat: skip destroy imported resources Jul 29, 2024
@coveralls
Copy link

coveralls commented Jul 29, 2024

Pull Request Test Coverage Report for Build 10199276186

Details

  • 16 of 53 (30.19%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.09%) to 52.617%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/engine/operation/graph/resource_node.go 3 8 37.5%
pkg/engine/runtime/terraform/tfops/workspace.go 9 21 42.86%
pkg/engine/runtime/terraform/terraform_runtime.go 4 24 16.67%
Files with Coverage Reduction New Missed Lines %
pkg/engine/operation/watch.go 1 82.76%
Totals Coverage Status
Change from base Build 10179449732: -0.09%
Covered Lines: 8705
Relevant Lines: 16544

💛 - Coveralls

@SparkYuan SparkYuan requested a review from liu-hm19 July 31, 2024 03:46
liu-hm19
liu-hm19 previously approved these changes Aug 1, 2024
Copy link
Contributor

@liu-hm19 liu-hm19 left a comment

Choose a reason for hiding this comment

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

lgtm

@liu-hm19
Copy link
Contributor

liu-hm19 commented Aug 1, 2024

@hoangndst Hi! Sorry for taking some time to review this PR. It looks good to me, but it seems to have conflicts with an updated file from main branch. I will help to solve this conflict and merge this PR soon. Your contribution will be mentioned and appreciated in the upcoming v0.12.1 release. Thanks very much for your contributions! 👍

@hoangndst hoangndst requested a review from liu-hm19 August 1, 2024 14:54
Copy link
Contributor

@liu-hm19 liu-hm19 left a comment

Choose a reason for hiding this comment

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

lgtm

@liu-hm19 liu-hm19 merged commit 881d542 into KusionStack:main Aug 1, 2024
8 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: Enable skip delete import tf resource when destroy
3 participants