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

improvement(frontend): Add frontend endpoint for plugin/run_id #478

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

k0machi
Copy link
Collaborator

@k0machi k0machi commented Oct 9, 2024

This commit adds a new endpoint which replaces hard to use
/test/test_id/runs?additionalRuns[]=run_id endpoint into a much more
simpler /tests/plugin_name/run_id endpoint, allowing to build a link to
the test run without knowing test_id in advance and simplifying
sharing/searching for a run.

Part of Task: scylladb/qa-tasks#1490

This commit adds a new endpoint which replaces hard to use
/test/test_id/runs?additionalRuns[]=run_id endpoint into a much more
simpler /tests/plugin_name/run_id endpoint, allowing to build a link to
the test run without knowing test_id in advance and simplifying
sharing/searching for a run.

Part of Task: scylladb/qa-tasks#1490
@k0machi k0machi self-assigned this Oct 9, 2024
@k0machi k0machi requested review from fruch and soyacz October 9, 2024 13:21
@k0machi
Copy link
Collaborator Author

k0machi commented Oct 9, 2024

Demo
image

Copy link
Collaborator

@soyacz soyacz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if two runs are selected?
Besides, I can't wait to see it merged :)
LGTM

@k0machi
Copy link
Collaborator Author

k0machi commented Oct 9, 2024

what happens if two runs are selected? Besides, I can't wait to see it merged :) LGTM

In both cases it wasn't possible to directly link to two runs in frontend. While the old endpoint supports array declaration /test/test_id/runs?additionalRuns[]=run_A&additionalRuns[]=run_B, you could build those manually but the functionality for that on the frontend UI side never existed.

To elaborate, the link exists on each run selected in its title, e.g. scylla/group/test#1 and always links to a single run.

@@ -133,7 +133,7 @@
<div class="d-flex px-2 py-2 mb-1 border-bottom bg-white ">
<div class="p-1">
{#if testRun}
<a class="link-dark" href="/test/{testRun.test_id}/runs?additionalRuns[]={testRun.id}">
<a class="link-dark" href="/tests/{testInfo.test.plugin_name}/{testRun.id}">
Copy link

@vponomaryov vponomaryov Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the /{testInfo.test.plugin_name} part is needed?
I guess it will be much more useful to have release name than just testing tool name.

For example:

tests/releases/enterprise-2024.2/%test-id% says clearly about the belonging of a test run to a release.

So it will be easy to distinguish it from the following:
tests/staging/valerii/%test-id%.

Which I personally find useful - we get info not even opening the link.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

@k0machi k0machi Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the /{testInfo.test.plugin_name} part is needed? I guess it will be much more useful to have release name than just testing tool name.

For example:

tests/releases/enterprise-2024.2/%test-id% says clearly about the belonging of a test run to a release.

So it will be easy to distinguish it from the following: tests/staging/valerii/%test-id%.

Which I personally find useful - we get info not even opening the link.

Testing tool is needed (or test-id, as it was previously) to determine which result table we query for those results, so it would have to stay. The release marker can be introduced, as an alternative URL, but release name is not something which can be guessed from testing frameworks themselves, aside from making them query the run (and I want to avoid that to make URL as simple to generate as possible for a testing framework.)

For argus, we can add another route which would act similarly to this one, like
/release/scylla-master/tests/scylla-cluster-tests/$id
or
/tests/scylla-cluster-tests/scylla-master/folder-name/test-name/$id

This one can be the one you'll get from clicking on the title bar and the URLs in the mail can provide a 301 redirect to this URL once you click them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the use case of getting from emails or elasticsearch data into Argus run

What's in this PR fits best, introducing more data into the url, complicates how we can build it where needed.

As suggested we can have more options for better sharing out of Argus, but we still need a way to get from test-id to Argus page

@k0machi k0machi merged commit 531bdce into scylladb:master Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants