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

order status set to failed before rollback is completed #1846

Closed
3 tasks done
swaroopar opened this issue Aug 1, 2024 · 3 comments · Fixed by #1855
Closed
3 tasks done

order status set to failed before rollback is completed #1846

swaroopar opened this issue Aug 1, 2024 · 3 comments · Fixed by #1855
Assignees
Labels
Accepted Issues that have been accepted and planned bug Something isn't working

Comments

@swaroopar
Copy link
Contributor

swaroopar commented Aug 1, 2024

Currently we are setting the status of order to failed as soon as the deployment fails. The frontend then does not know that the order is actually being currently rolled back. So if the rollback fails, the frontend does not has this information. It instead assumes that the order process is completed since the order status is failed already.

  • Do not set the status of the order to FAILED immediately
  • Wait for rollback to be completed.
  • After that set FAILED.
@swaroopar swaroopar added bug Something isn't working Accepted Issues that have been accepted and planned labels Aug 1, 2024
@baixinsui
Copy link
Contributor

baixinsui commented Aug 2, 2024

@swaroopar This problem has been fixed by #1835
image

@swaroopar
Copy link
Contributor Author

@swaroopar swaroopar added this to the Sprint 082024_1 milestone Aug 5, 2024
@baixinsui
Copy link
Contributor

baixinsui commented Aug 6, 2024

@swaroopar Yes. Now the order status is updated only after rollback is completed. https://github.com/eclipse-xpanse/xpanse/blob/main/modules/deployment/src/main/java/org/eclipse/xpanse/modules/deployment/DeployResultManager.java. When the deploy failed and then call back this method, only error information is recorded without setting the status and end time; https://github.com/eclipse-xpanse/xpanse/blob/main/modules/deployment/src/main/java/org/eclipse/xpanse/modules/deployment/DeployResultManager.java#L214-L219. Only when the rollback task call back this method, set the order status to 'failed' and set the complete time.https://github.com/eclipse-xpanse/xpanse/blob/main/modules/deployment/src/main/java/org/eclipse/xpanse/modules/deployment/DeployResultManager.java#L206-L209. In this way, we don't need to add a synchronized method for rollback in all the implementation classes of Deployment

@swaroopar swaroopar self-assigned this Aug 6, 2024
@github-project-automation github-project-automation bot moved this from Planned to Done in xpanse Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issues that have been accepted and planned bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants