Abacn commented on PR #40096: URL: https://github.com/apache/beam/pull/40096#issuecomment-5637268459
> Since we don't have real locking semantics, I'm interested in keeping the bot state as close as possible to the real state. Currently the actual guard of diverge is the `git pull` statement right before committing https://github.com/apache/beam/blob/2e7e9d371e8da0286cce358c18fc07fa3cf556da/scripts/ci/pr-bot/shared/persistentState.ts#L36 For fetch, bot state could already diverge from the remote branch from the second write state on: https://github.com/apache/beam/blob/2e7e9d371e8da0286cce358c18fc07fa3cf556da/scripts/ci/pr-bot/shared/persistentState.ts#L125-L126 - because the second `git fetch origin pr-bot-state && git checkout pr-bot-state` is always a no-op (fetch won't affect current branch that already exist) In other words, adding `--depth=1` to fetch wouldn't introduce new concern (git supports both fast-forward-pull and push from shallow branch, as local branch is guaranteed to have common ancestor with the remote). I'll make the change -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
