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

Try multiple times creating a pull request on gitea #1410

Conversation

chmouel
Copy link
Member

@chmouel chmouel commented Sep 5, 2023

For the gitea test we are creating a pull request but sometime and that's randomly it will fails with this error (checked the gitea pod logs as well and it's the same error showing)

{"level":"info","ts":1693897319.3020558,"caller":"gitea/scm.go:94","msg":"Pushed files to repo http://localhost:3000/org-pac-e2e-test-zg6sx/pac-e2e-test-zg6sx branch pac-e2e-test-zg6sx"}
    test.go:140: assertion failed: error is not nil: PushRejected Error: exit status 1: remote: error: cannot lock ref 'refs/pull/1/head': reference already exists
        To /home/gitea/repositories/org-pac-e2e-test-zg6sx/pac-e2e-test-zg6sx.git
         ! [remote rejected] pac-e2e-test-zg6sx -> refs/pull/1/head (failed to update ref)
        error: failed to push some refs to '/home/gitea/repositories/org-pac-e2e-test-zg6sx/pac-e2e-test-zg6sx.git'

Let's try multiple time and hope that it succeed at some point.

Changes

Submitter Checklist

  • 📝 A good commit message is important for other reviewers to understand the context of your change. Please refer to How to Write a Git Commit Message for more details how to write beautiful commit messages. We rather have the commit message in the PR body and the commit message instead of an external website.
  • ♽ Run make test before submitting a PR (ie: with pre-commit, no need to waste CPU cycle on CI. (or even better install pre-commit and do pre-commit install in the root of this repo).
  • ✨ We heavily rely on linters to get our code clean and consistent, please ensure that you have run make lint before submitting a PR. The markdownlint error can get usually fixed by running make fix-markdownlint (make sure it's installed first)
  • 📖 If you are adding a user facing feature or make a change of the behavior, please verify that you have documented it
  • 🧪 100% coverage is not a target but most of the time we would rather have a unit test if you make a code change.
  • 🎁 If that's something that is possible to do please ensure to check if we can add a e2e test.
  • 🔎 If there is a flakiness in the CI tests then don't necessary ignore it, better get the flakyness fixed before merging or if that's not possible there is a good reason to bypass it. (token rate limitation may be a good reason to skip).

@chmouel chmouel force-pushed the try-multiplke-time-creating-pull-request branch from ca13c65 to ae3c1ed Compare September 5, 2023 07:43
@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (72b1963) 61.30% compared to head (ee181fa) 61.30%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1410   +/-   ##
=======================================
  Coverage   61.30%   61.30%           
=======================================
  Files         136      136           
  Lines       10064    10064           
=======================================
  Hits         6170     6170           
  Misses       3396     3396           
  Partials      498      498           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

For the gitea test we are creating a pull request but sometime and
that's randomly it will fails with this error:

```console
{"level":"info","ts":1693897319.3020558,"caller":"gitea/scm.go:94","msg":"Pushed files to repo http://localhost:3000/org-pac-e2e-test-zg6sx/pac-e2e-test-zg6sx branch pac-e2e-test-zg6sx"}
    test.go:140: assertion failed: error is not nil: PushRejected Error: exit status 1: remote: error: cannot lock ref 'refs/pull/1/head': reference already exists
        To /home/gitea/repositories/org-pac-e2e-test-zg6sx/pac-e2e-test-zg6sx.git
         ! [remote rejected] pac-e2e-test-zg6sx -> refs/pull/1/head (failed to update ref)
        error: failed to push some refs to '/home/gitea/repositories/org-pac-e2e-test-zg6sx/pac-e2e-test-zg6sx.git'
```

Let's try multiple time and hope that it succeed at some point.

Signed-off-by: Chmouel Boudjnah <[email protected]>
@chmouel chmouel force-pushed the try-multiplke-time-creating-pull-request branch from ae3c1ed to ee181fa Compare September 5, 2023 07:46
@chmouel chmouel merged commit 24ba237 into openshift-pipelines:main Sep 5, 2023
4 checks passed
@chmouel chmouel deleted the try-multiplke-time-creating-pull-request branch September 5, 2023 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant