forcedotcom / devops-center-feedback

61 stars 2 forks source link

[BUG] Cannot revert a destructive change in a Work Item #202

Closed RupertBarrow closed 1 year ago

RupertBarrow commented 1 year ago

Describe the bug If I have introduced a destructive change into my Work Item in a commit, I cannot revert this destructive change in a successive commit on the same Work Item : DevOps considers there is a destructive change, and whatever operation I do after to try to revert the situation (add the file again, revert commit in GithubDesktop) will not make it change its mind.

To Reproduce Steps to reproduce the behavior:

  1. Create a work item and commit a few files, including a profile
  2. Try to promote. Let's assume that an error blocks the promotion
  3. Go to the Pull Request in Github, find the profile in the modified files, and click "delete file" : I did this, thinking it might be one way of removing the file from the PR. Let's assume we do this to try to solve the "promote issue"
  4. Try to promote again : now the deployment is saying that it is trying to delete the profile in the target org (destructive change). Oops, that was a mistake, let's revert.
  5. In VS Code, retrieve the file from the sandbox and commit in on the WI branch : I'm adding the file, trying to revert the previous change
  6. In DevOps Center, try to promote : the error persists, still trying to remove the profile from the target org
  7. Go to GitHub desktop and find the magic-sounding "revert commit" feature : revert the last 2 commits, push to the WI branch
  8. In the GitHub pull request, see that extra lines have been added, but the destructive change still seems to be there
  9. In DevOps Center, with no hope of success, try to promote again. Same error.
  10. Cry, send the Work Item to "NEVER"-land, and start again from scratch by creating a new work item?

Expected behavior If I delete a file, which causes DevOps Center to create a destructive change, there is no option to revert that, other than throwing the WI away. I would like :

Screenshots

Additional context I consider this to be a bug. I understand the underlying technical logic (reasoning commit by commit) which might make you say that this is not a bug. But I can tell you that admins or consultants, especially coming from the change-set world, need this feature. And so do I (20+ years of Salesforce) : please give me an option to change my mind after I made an incorrect destructive change, considering I have not even yet promoted it !

git2gus[bot] commented 1 year ago

Error while creating work item!

GilsonCanario commented 1 year ago

Hi @RupertBarrow Thank you for reporting this. I have opened an investigation ticket to be reviewed by the team.

GilsonCanario commented 1 year ago

Related to #44