codecov / feedback

A place to discuss feedback about the pull request and web product experience.
37 stars 7 forks source link

Bug Report: Missing gitlab webhook - cannot be recreated #492

Closed iuri-gg closed 2 months ago

iuri-gg commented 3 months ago

Describe the bug Gitlab webhook cannot be recreated once removed from the repo in Gitlab cloud.

Environment (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Set up a Gitlab project in Codecov
  2. Get at least one report uploaded successfully to Codecov
  3. Go to repo Settings > Webhooks in gitlab
  4. Delete Codecov webhook
  5. Codecov functionality degrades due to missing webhooks: i.e. deleted branches are not removed
  6. No way to re-create webhook

Expected behavior A way to recreate missing webhooks in Gitlab

Additional context I tried adding webhook manually but I don't know what secret to use for it to work - I get 403.

drazisil-codecov commented 2 months ago

Hi @iuri-gg ,

Codecov doesn't use wehooks as much as we used to, but the information I had was that we will recreate the hook if needed on the next upload. I will double-check the code. Have you pushed a commit to Codecov since deleting the hook?

drazisil-codecov commented 2 months ago

This code https://github.com/codecov/worker/blob/438000b1d04883d314059401353f501feaca2fa4/tasks/upload.py#L886-L891 confirms that is still the expected behavior. Can you please share a recent SHA (full SHA, please) and I will look into this? No need to share org or project/repo.

iuri-gg commented 2 months ago

Here is a commit sha 0687b4e58cb730c0263e28cf4cfb7ffa2de01788

That commit was after deleting webhook. I just checked the repo on Gitlab and there is no webhook fore codecov

drazisil-codecov commented 2 months ago

@iuri-gg Are you uploading test coverage , or only test results and bundle coverage? It's hard for me to tell from the logs.

iuri-gg commented 2 months ago

Are you uploading test coverage , or only test results and bundle coverage? It's hard for me to tell from the logs.

I am uploading test coverage, test results, and bundle results. I am using following commands ./codecov upload-process -Z --dir coverage and ./codecov do-upload -Z --report-type test_results --file coverage/rspec*.xml. I can see for that commit there are two uploads. I also see missing base report warning on it.

iuri-gg commented 2 months ago

Not sure what changed - I pushed new commits without modifying ci tasks or codecov yml and now I see webhook in Gitlab repo settings.

drazisil-codecov commented 2 months ago

Hi @iuri-gg ,

I was on vacation, but https://github.com/codecov/codecov-api/pull/738 changed. :)

Glad to hear that resolved it.