Skip to content

Commit

Permalink
Add delay before querying base ref
Browse files Browse the repository at this point in the history
This is another attempt to fix the 422 fast forward errors we've been
getting.
  • Loading branch information
Mark-Simulacrum committed Sep 23, 2023
1 parent ce600b9 commit 75980ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions homu/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,11 @@ def branch_equal_to_merge(git_cmd, state, branch):

def create_merge(state, repo_cfg, branch, logger, git_cfg,
ensure_merge_equal=False):
# Add some delay to try to make sure the base repo fetch is accurate.
# It seems like in some cases we're getting the previous commit from GH,
# e.g., https://github.com/rust-lang/homu/issues/75#issuecomment-1729058969
# Hopefully a delay helps.
time.sleep(60)
base_sha = state.get_repo().ref('heads/' + state.base_ref).object.sha

state.refresh()
Expand Down

0 comments on commit 75980ad

Please sign in to comment.