treeherder icon indicating copy to clipboard operation
treeherder copied to clipboard

replace query-string with URLSearchParams

Open jmaher opened this issue 2 years ago • 19 comments

jmaher avatar Jan 03 '23 21:01 jmaher

Codecov Report

Base: 90.40% // Head: 90.40% // No change to project coverage :thumbsup:

Coverage data is based on head (7f0e41c) compared to base (a637a71). Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7609   +/-   ##
=======================================
  Coverage   90.40%   90.40%           
=======================================
  Files         296      296           
  Lines       15136    15136           
=======================================
  Hits        13684    13684           
  Misses       1452     1452           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Jan 03 '23 21:01 codecov-commenter

this was originally a renovate PR to update query-string, but query-string became an ESM module and required more work, as it was not used much, I realized we could replace it with built in URLSearchParams which reduces the need to manage as many npm packages going forward!

jmaher avatar Jan 03 '23 22:01 jmaher

@jmaher I believe graph links from Alerts View are affected by the changes. To reproduce:

  1. Go on Alerts View (http://localhost:5000/perfherder/alerts?hideDwnToInv=1&page=1).
  2. Find some alerts.
  3. Click on the graph icon for any row, it should redirect to a graph, instead message 'Nothing here yet. Add test data to plot graphs.' is displayed.

beatrice-acasandrei avatar Jan 04 '23 10:01 beatrice-acasandrei

fixed the overall issue (thanks for calling it out). clicked around a lot, added graphs, etc. and all seemed ok. I do not have sheriff permissions to test that out. One thing here is I have a temporary hack in the .circleci/config.yml file, that will go away (ideally with https://github.com/mozilla/treeherder/pull/7614), I wanted the automation to be green to not confuse things.

please review or provide other feedback!

jmaher avatar Jan 05 '23 00:01 jmaher

hey @jmaher there is a problem with highlighted revisions STR:

  1. Go to compare view and select a comparison
  2. Open graph link from a row
  3. The alerts are put together with a comma in the first input So if we have two alerts to highlight they are not separated localhost image treeherder image

esanuandra avatar Jan 06 '23 12:01 esanuandra

I think we found another bug STR:

  1. Open Graphs View with some data
  2. Open Job View for a data point
  3. Details Panel does not load (there is an error in the console)

This happens only if you open jobs view from Graphs View.

esanuandra avatar Jan 06 '23 13:01 esanuandra

TypeError

I am getting this on Graphs View.

beatrice-acasandrei avatar Jan 12 '23 14:01 beatrice-acasandrei

thanks for finding the issue in the console. I have tested adding graphs, compare view, clicking on data points, highlighting alerts, etc. I do not have sheriff permissions to test anythingelse.

jmaher avatar Jan 12 '23 17:01 jmaher

TypeError The Graphs View error is fixed but I get this error when accessing Jobs View from a datapoint in Graphs View.

beatrice-acasandrei avatar Jan 13 '23 13:01 beatrice-acasandrei

I have added a small tweak and things are again looking great. I tried searching through the code for references to using /performance/* api calls as a way to test.

jmaher avatar Jan 13 '23 22:01 jmaher

STR:

  1. Open Graphs View and add two, three, four signatures image
  2. Copy the URL and paste it to a new tab image
  3. The URL will open the graph with first signature only.

alexandru-io avatar Jan 16 '23 17:01 alexandru-io

this is the way the production treeherder works today: https://treeherder.mozilla.org/perfherder/graphs?series=mozilla-central,2242563,1,4,mozilla-central,2242573,1,4,mozilla-central,2242583,1,4,mozilla-central,2242593,1,4&highlightAlerts=1&highlightCommonAlerts=0&highlightChangelogData=1&timerange=1209600

jmaher avatar Jan 17 '23 23:01 jmaher

this is the way the production treeherder works today: https://treeherder.mozilla.org/perfherder/graphs?series=mozilla-central,2242563,1,4,mozilla-central,2242573,1,4,mozilla-central,2242583,1,4,mozilla-central,2242593,1,4&highlightAlerts=1&highlightCommonAlerts=0&highlightChangelogData=1&timerange=1209600

interesting. i'm getting series joined by & you get joined by ,. Try: https://treeherder.mozilla.org/perfherder/graphs?series=mozilla-central,2242563,1,4&series=mozilla-central,2242573,1,4&series=mozilla-central,2242583,1,4&series=mozilla-central,2242593,1,4&highlightAlerts=1&highlightCommonAlerts=0&highlightChangelogData=1&timerange=1209600 How did you get your link?I',m just going to graphs and add all the signature by hand (Add test data) browsertime example

alexandru-io avatar Jan 18 '23 10:01 alexandru-io

I think the missing & were a result of adding the graphs one by one with the patch. Using the URL you provided, I was able to reproduce. There is a quick and simple fix for this which ensures series uses .getAll()

jmaher avatar Jan 18 '23 18:01 jmaher

this should be ready for testing again and review

jmaher avatar Jan 18 '23 19:01 jmaher

this should be ready for testing again and review

the issue is with image modal. that doesn't generate correctly the URL. series=mozilla-central,2242563,1,4,mozilla-central,2242573,1,4,mozilla-central,2242583,1,4,mozilla-central,2242593,1,4 instead of series=mozilla-central,2242563,1,4 &series=mozilla-central,2242573,1,4&series=mozilla-central,2242583,1,4&series=mozilla-central,2242593,1,4

alexandru-io avatar Jan 19 '23 13:01 alexandru-io

@jmaher @alexandru-io On my side these fields are missing: Inkedcapture_LI

To reproduce go to Alerts View and click on the graph icon from a random alert.

beatrice-acasandrei avatar Jan 30 '23 10:01 beatrice-acasandrei

hey @jmaher there is a problem with highlighted revisions STR:

1. Go to compare view and select a comparison

2. Open graph link from a row

3. The alerts are put together with a comma in the first input
   So if we have two alerts to highlight they are not separated
   localhost
   ![image](https://user-images.githubusercontent.com/63001299/211014013-94137665-4eaf-42c3-91e1-5c8a39632939.png)
   treeherder
   ![image](https://user-images.githubusercontent.com/63001299/211014043-24e22785-7481-4c91-a0b4-e1486f595a99.png)

@jmaher This is still reproducing on my side.

beatrice-acasandrei avatar Jan 30 '23 10:01 beatrice-acasandrei

@jmaher if you want this to go faster, you can push it to prototype so we can test and share STRs and links directly from there, have the same testing environment.

alexandru-io avatar Jan 31 '23 09:01 alexandru-io