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

Race condition exists for autocommits if future changes are merged before the autocommit #601

Open
1 task done
dbasilio opened this issue Mar 6, 2023 · 3 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@dbasilio
Copy link
Contributor

dbasilio commented Mar 6, 2023

Describe the bug

If your CI is building and autocommiting Commit 1, and Commit 2 is introduced between the initial merge and the autocommit, then monodeploy will fail to pull with rebase on Commit 2

  • I am interested in contributing a fix.

To reproduce

If the following happens:

  • Commit 1 is merged into the main branch
  • CI starts building/publishing Commit 1
  • Commit 2 is merged into the main branch
  • CI finishes building/publishing Commit 1
  • CI starts building/publishing Commit 2
  • CI autocommits the changelogs from Commit 1 back to the main branch
  • CI tries to git pull --rebase on Commit 2, and fails due to the changes from the changelog

Expected behavior

This is hard to say, but I think we should follow a few guiding principles:

  • when you merge a commit, that same commit is used for all publishing actions (don't bring in the newer commit too early)
  • changelogs should always be added to the latest version
  • conflicts should be resolved automatically where possible

Environment (please complete the following information):

  • OS:
  • Monodeploy Version:
  • Yarn Version:
    • Yarn module linker:
  • Node Version:
  • Git Version:

Additional context

@noahnu noahnu added the bug Something isn't working label Mar 6, 2023
@noahnu
Copy link
Contributor

noahnu commented Mar 6, 2023

We could try build in some basic merge conflict resolver 🤔

@Papooch
Copy link
Contributor

Papooch commented Jul 20, 2023

I think a simple retry would solve the majority of issues. If monodeploy detects this scenario, it should discard changes and rebase on top of the newest commit and try again, instead of trying to come up with some elaborate conflict resolution logic. What do you think?

@noahnu
Copy link
Contributor

noahnu commented Apr 6, 2024

Monodeploy has been forked under a new name Monoweave. I've copied your issue over and will address it in the monoweave project.

monoweave/monoweave#95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants