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

Benchmark runners may commit results that contain merge conflicts #323

Open
mpage opened this issue Dec 23, 2024 · 3 comments
Open

Benchmark runners may commit results that contain merge conflicts #323

mpage opened this issue Dec 23, 2024 · 3 comments

Comments

@mpage
Copy link
Contributor

mpage commented Dec 23, 2024

Benchmark runners may commit results that contain merge conflicts. We ran into this recently:

It looks like we try to handle this situation:

# Another benchmarking task may have created results for the same
# commit while the above was running. This "magic" incantation means
# that any local results for this commit will override anything we
# just pulled in in that case.
git pull -s recursive -X ours --autostash --rebase

However, the approach that we're using doesn't work. It looks like -X ours doesn't apply to resolving merge conflicts that result from applying stashed changes. I verified this locally by:

  1. Creating a new repo containing a single markdown file.
  2. Cloning the repo into a new directory.
  3. Editing the markdown file in a way that would generate a merge conflict.
  4. Ran git pull -s recursive -X ours --autostash --rebase. The merge conflicts are left for resolution.

I'm not sure if this is a behavior that changed in git recently. I've tested this using git versions 2.39.5 and 2.47.1.

@mpage
Copy link
Contributor Author

mpage commented Dec 23, 2024

@mdboom - How large/invasive of a change would it be to store the results for each job in a unique file?

@mdboom
Copy link
Contributor

mdboom commented Jan 3, 2025

It would be pretty invasive to use a unique name for each job -- plus it's occasionally useful to re-run a job that failed for some external reason (e.g. a network outage) and replace any existing results.

I wonder if there is a magic incantation that would always replace any upstream changes (e.g. like this line but that actually works). I'll poke around and see if I can find something that works...

@mdboom mdboom closed this as completed in ce657e4 Jan 9, 2025
mdboom added a commit that referenced this issue Jan 9, 2025
Fix #323: Always accept local changes to resolve merge conflicts
mdboom added a commit that referenced this issue Jan 9, 2025
…onflicts

Revert "Fix #323: Always accept local changes to resolve merge conflicts"
@mdboom mdboom reopened this Jan 9, 2025
@mdboom
Copy link
Contributor

mdboom commented Jan 9, 2025

Ugh, the solution I arrived at broke on Windows... Back to the drawing board for a bit.

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

2 participants