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

[Question] What is the best way to revert the merge to main branch incase of failure ? #598

Closed
DibyaRanjan1 opened this issue Jul 24, 2024 · 3 comments

Comments

@DibyaRanjan1
Copy link

Release version

All version

Question Details

I have a scenario and need the best approach to deal with it.

we create a feature branch with some changes and merge it with the main branch to trigger the publisher pipeline.
What will happen when the feature branch is merged to the main branch but the publisher pipeline fails? How do you undo merge and merge it again with some additional changes?

Do you suggest any best practices in this scenario? Can you support revert merge in the Publisher pipeline if It fails ? This will help to merge it again into the main branch

Expected behavior

Revert/undo the merge if publisher pipeline fails. Do you suggest any best way to revert the merge incase of failure ?

Actual behavior

The feature branch is getting merged to the Main branch even if the publisher pipeline fails. This creates a lot of issues when redeploying the changes to the main branch.

Publishing all repo content should not be the solution as It is a resource-intensive operation.

Reproduction Steps

  1. Create a feature branch with some changes.
  2. Make a PR to the main branch.
  3. Publisher pipeline fails due to some reason.
  4. How to undo the previous changes so that we can again do PR with additional changes?
Copy link

  Thank you for opening this issue! Please be patient while we will look into it and get back to you as this is an open source project. In the meantime make sure you take a look at the [closed issues](https://github.com/Azure/apiops/issues?q=is%3Aissue+is%3Aclosed) in case your question has already been answered. Don't forget to provide any additional information if needed (e.g. scrubbed logs, detailed feature requests,etc.).
  Whenever it's feasible, please don't hesitate to send a Pull Request (PR) our way. We'd greatly appreciate it, and we'll gladly assess and incorporate your changes.

@shawnyu5
Copy link

Is reverting the broken commit on the main branch not enough for rolling back?

@waelkdouh
Copy link
Contributor

Agree with @shawnyu5. The publisher is simply driven by the changes included in the last commit. It's up to you to utilize Git to drive the behavior of the publisher. We offer two options with the publisher, which is either to publish everything or publish against a specific commit ID for the UI default but you are at liberty to take that pipeline and customize it the way you see fit for your own environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants