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

bug: identify and silence owl-bot post-processor failures when PRs attempt to push to a branch on which the post-processor has already run #2307

Closed
sofisl opened this issue Jul 27, 2021 · 7 comments · Fixed by #2422 or #2441
Assignees
Labels
bot: owl-bot priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@sofisl
Copy link
Contributor

sofisl commented Jul 27, 2021

See #2304 and #2306

To https://github.com/googleapis/python-billing.git
 ! [rejected]        release-v1.3.2 -> release-v1.3.2 (fetch first)
error: failed to push some refs to 'https://github.com/googleapis/python-billing.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.

This happens when a PR is created, then the post-processor runs on it, then the PR author attempts to push another commit to that branch without first pulling down the changes. However, ultimately, the post-processor runs fine on Github since the user can force-push in order to retrigger the post-processor. So, perhaps there is a way of silencing these errors, or perhaps a way of delaying the post-processor for a few seconds to ensure another commit pushed to that branch recently does not cause this error.

@sofisl sofisl added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. bot: owl-bot labels Jul 27, 2021
@sofisl
Copy link
Contributor Author

sofisl commented Jul 27, 2021

cc @parthea

@bcoe
Copy link
Contributor

bcoe commented Jul 27, 2021

@parthea brought up in the meeting that the user facing nuisance that arrises as a result of this, is this:

  • an update to a PR is made after an OwlBot post processor is already running.
  • this update will have its own OwlBot post processor run.
  • the first post processor fails, because it can't push at the branch with changes, updates status to failed.
  • failed status remains until second post-processor completes successfully.

The user facing aspect is the failure that is displayed until the second post processor completes.

If an actual fix for this problem is too difficult, one potential stop gap would be putting the OwlBot status back into a pending state, whenever a new post processor run starts.

@parthea parthea added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. and removed type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Aug 25, 2021
@parthea
Copy link
Contributor

parthea commented Aug 25, 2021

I'd like to bump the priority on this issue as it's preventing python from adding owlbot as a required check. I had to manually add the owlbot:run label to trigger owlbot to run again after a push failure. See googleapis/python-api-core#259

@parthea parthea changed the title feature request: identify and silence owl-bot post-processor failures when PRs attempt to push to a branch on which the post-processor has already run bug: identify and silence owl-bot post-processor failures when PRs attempt to push to a branch on which the post-processor has already run Aug 25, 2021
@chingor13
Copy link
Contributor

@danielbankhead are you looking into this one? If not, I'll reassign as it's now 🚨

@danielbankhead
Copy link
Member

I should be able to get to this by Friday - feel free to grab if you'd like

@SurferJeffAtGoogle
Copy link
Contributor

The first solution I'd try is to perform a git pull immediately before this git push:

- name: 'gcr.io/cloud-builders/git'

It will only succeed if there are no conflicts, but if there are conflicts, the PR will need human attention anyway and failure is a good signal.

@sofisl sofisl added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: owl-bot priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
6 participants