treeherder icon indicating copy to clipboard operation
treeherder copied to clipboard

Bug 1837998 - File regression bugs using the API

Open junngo opened this issue 1 year ago • 8 comments

Hi there. I delete the cf_has_regression_range field. I guess, This field was deprecated. Before We filed the bug without the log-in, but We should log in to call the post request and to file the bug at the moment. Feel free to tell me If there is something to be modified :)

bug link: https://bugzilla.mozilla.org/show_bug.cgi?id=1837998

junngo avatar May 06 '24 14:05 junngo

@junngo and I discussed this patch yesterday, and one thing to change will be to output a failure message if the bug creation doesn't work.

gmierz avatar May 08 '24 13:05 gmierz

I think it's looking great, I wasn't able to test the code locally yet, I have some issues downloading data in order to do so. Perhaps we can do a deploy to staging in order for all the sheriffs to test this. What do you think @gmierz @junngo?

beatrice-acasandrei avatar May 09 '24 17:05 beatrice-acasandrei

@beatrice-acasandrei that sounds great to me!

gmierz avatar May 09 '24 18:05 gmierz

If we test it locally, we need to set up a Bugzilla api key. It's good to test in staging :) (I work on dealing with the error handling and push the patch again.) @beatrice-acasandrei

junngo avatar May 10 '24 16:05 junngo

Codecov Report

Attention: Patch coverage is 47.36842% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 77.05%. Comparing base (110cc98) to head (92e124c). Report is 30 commits behind head on master.

Files Patch % Lines
ui/perfherder/alerts/StatusDropdown.jsx 0.00% 13 Missing :warning:
treeherder/webapp/api/bugzilla.py 28.57% 5 Missing :warning:
ui/perfherder/alerts/FileBugModal.jsx 88.88% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8048      +/-   ##
==========================================
- Coverage   77.08%   77.05%   -0.03%     
==========================================
  Files         545      545              
  Lines       26984    27005      +21     
  Branches     3389     3400      +11     
==========================================
+ Hits        20801    20810       +9     
- Misses       6016     6028      +12     
  Partials      167      167              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 14 '24 16:05 codecov-commenter

I added the feature. If there is an error from the server, we can see the error message in the modal. Let me know If there is anything to change :)

@beatrice-acasandrei @gmierz

junngo avatar May 14 '24 16:05 junngo

@junngo looks good! If you need help with deploying to staging feel free to ping me on element!

beatrice-acasandrei avatar May 20 '24 14:05 beatrice-acasandrei

I had to set and check the api key and URL for the test in my local environment.

  • Add the BUGFILER_API_KEY
    • Move the Bugzilla to generate the api key (https://bugzilla.mozilla.org/userprefs.cgi?tab=apikey)
    • Add the api key into the production env file[0] to call the api[1]. In my case I added the api key at the source code[1] in person instead of using the env file.
  • Check the BUGFILER_API_URL
    • We need the api URL[2] to call the api of buazilla. That is the https://bugzilla.mozilla.org. We should check If the URL[3] is set in the env file. I added the api URL in person at the source code[2] instead of using env file.
  • Ready for the testing. Move the perfherder and Click the File Bug to test it.

Let me know If you have a question :)

[0] https://github.com/mozilla/treeherder/blob/6c6407b2c70d117493319895faf2138ed620d1c1/treeherder/config/settings.py#L436 [1] https://github.com/mozilla/treeherder/blob/6c6407b2c70d117493319895faf2138ed620d1c1/treeherder/webapp/api/bugzilla.py#L37 [2] https://github.com/mozilla/treeherder/blob/6c6407b2c70d117493319895faf2138ed620d1c1/treeherder/webapp/api/bugzilla.py#L36 [3] https://github.com/mozilla/treeherder/blob/6c6407b2c70d117493319895faf2138ed620d1c1/treeherder/config/settings.py#L435

junngo avatar Jun 20 '24 16:06 junngo

I did some more testing based on the discussion with the Softvision sheriffing team and I think the following would need to be updated:

  • [ ] When we don't introduce any bug number there should still be a needinfo to the triage owner so that we're always aware of the bugs being created, even by mistake.

For devtools I couldn't file a bug, the keyword devtools-perf-regression does not exist. I left a needinfo so I can find out who can add this keyword in bugzilla from their team.

Let me know what you think.

beatrice-acasandrei avatar Jul 08 '24 04:07 beatrice-acasandrei

@beatrice-acasandrei the keyword has been added: https://bugzilla.mozilla.org/show_bug.cgi?id=1729635#c7

gmierz avatar Jul 16 '24 12:07 gmierz

@beatrice-acasandrei the keyword has been added: https://bugzilla.mozilla.org/show_bug.cgi?id=1729635#c7

Thanks! Now the only thing that needs to be addressed by @junngo is the case mentioned in my previous comment, when we don't introduce a bug number.

beatrice-acasandrei avatar Jul 16 '24 13:07 beatrice-acasandrei

Hi @beatrice-acasandrei, @gmierz :) I'm sorry for not getting back to you sooner. I changed the code to add the needinfo to the default triage owner If there is no entered bug.

Who is the needinfo?

Case who
No Entered Bug default triage owner
If there is no assignee on entered bug triage owner on entered bug
If there is assignee on the entered bug assignee on entered bug

Let me know if anything needs to be changed.

junngo avatar Jul 22 '24 12:07 junngo