scylladb / argus

Apache License 2.0
4 stars 11 forks source link

"Investigate Selected" button on release/view dashboards should open runs as well, not just tests #389

Open k0machi opened 4 months ago

k0machi commented 4 months ago

When you select tests like this: image

Clicking "investigate selected" opens them up on the workspace as Tests. However, with addition of issue views:

image

The button loses specificity as it should really open the specific build numbers in question.

Proposal:

The TestRuns component supports opening additional runs, with a caveat - at this point there's no way to differentiate which run_id belongs to which test_id, preventing from just reusing additionalRuns[] query parameter.

One solution could be naming that parameter according to test_id, like so additionalRuns-bd7fc32b-e9ab-4d5d-8bc1-e80555ff6dcb[]=f125a289-5cb8-4fc0-9cdc-8c14090012ba however this is a bit ugly.

Another one would be base64 encoding a json inside the query parameter, like we do in workspace:

openRuns=eyJmMTI1YTI4OS01Y2I4LTRmYzAtOWNkYy04YzE0MDkwMDEyYmEiOlsiODVhNWRiMGEtYjY3ZC00\nNDJkLTk3NjQtMmJlNWE2NGUyMWE0IiwiODVhNWRiMGEtYjY3ZC00NDJkLTk3NjQtMmJlNWE2NGUy\nMWE0Il19

However this can easily bloat the query string (as you can see above this is just one test and 2 runs) and will also compete for query string size with state parameter of the workspace.

Third option can be using # fragment part as this is not passed to the server thus ignoring the query string size limitation (as really there's no need to sling that or even state there, as both are resolved client side)

Fourth option would be server-side links, however this introduces latency on first use, but as an example we could generate hash out of the state or openRuns object and send that first to check if we have stored state on the server, if not - send the state and receive redirect to the workspace page with short url representing state: /workspace?state=abcdef&openRuns=de04fb

And last option (as well as being last resort) is using local storage to save data between pages, however this is very opaque and prevents sharing the link.

fruch commented 2 months ago

@k0machi

what is the use case for this suggestion ? i.e. you dive to lot of technical details, without explaining why we need this, and what we gain

k0machi commented 2 months ago

@k0machi

what is the use case for this suggestion ? i.e. you dive to lot of technical details, without explaining why we need this, and what we gain

Being able to jump directly into selected runs - so if you, for example, open an issue view with a list of runs affected, clicking investigate selected will not only jump to workspace with those tests open, but also with runs as well. Would also help with sharing workspace state with other people, I believe.

fruch commented 2 weeks ago

@k0machi

I'm not sure I fully understand, lets discuss on the weekly meeting