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

bugfix: resource nodes of delete action don't need compute action type again #108

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

howieyuen
Copy link
Collaborator

@howieyuen howieyuen commented Jul 26, 2022

fix: #109

Root Causes

  • kusion apply will build an acyclic graph which contains only two kinds of action, Update and Delete, only Update nodes need to determine Create or Update
  • Nodes of Update action, its state field is plan state; otherwise, node of Delete action, its state field is prior state
  • For nodes of Delete action, wrongly used node.state as plan state in execute() func, so Delete turns to Unchange

@howieyuen howieyuen requested a review from a team July 26, 2022 08:06
@howieyuen howieyuen force-pushed the bugfix-delete-node branch 2 times, most recently from f8b7ddb to dd6426a Compare July 26, 2022 09:04
@howieyuen howieyuen changed the title resource nodes of delete action don't need compute action type again bugfix: resource nodes of delete action don't need compute action type again Jul 26, 2022
…e again

- resource nodes created by spec parser can be Update/Delete action, state field is plan state
- resource nodes created by delete parser are definite to Delete action, state field is prior state
@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 74.896% when pulling 5a32a34 on howieyuen:bugfix-delete-node into 3299afd on KusionStack:main.

@howieyuen howieyuen enabled auto-merge (squash) July 28, 2022 09:30
@howieyuen howieyuen self-assigned this Jul 28, 2022
@howieyuen howieyuen added kind/bug Something isn't working engine labels Jul 28, 2022
@howieyuen howieyuen added this to the v0.6.0 milestone Jul 28, 2022
Copy link
Contributor

@elliotxx elliotxx left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@markliby markliby left a comment

Choose a reason for hiding this comment

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

lgtm

@howieyuen howieyuen merged commit 02ba917 into KusionStack:main Aug 2, 2022
@howieyuen howieyuen deleted the bugfix-delete-node branch August 2, 2022 08:18
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kusion apply mark a Delete node as Unchange
4 participants