kernelci / kernelci-frontend

Upstream Linux Kernel Validation Project Dashboard
http://kernelci.org
GNU Lesser General Public License v2.1
29 stars 25 forks source link

Connect new API to the old dashboard #147

Open alexandrasp opened 1 year ago

alexandrasp commented 1 year ago

As we work on the new API for Kernel CI, we experiment with using it in the current dashboard. The goals are twofold: test the state of the API to build a Web Dashboard and provide visualization of test runs with the new API in the current legacy dashboard; meanwhile, we don't have a new one.

Below you will see a description of the work and screens.

In the first page: page_1

You can see all job reports sent to the API, and using the pre-existent template, we bring data from the new API and show information about a job, restringing to tree, branch, kernel version, date and status.

Once you select a row, combining kernel version, tree and branch, we will show, on the second page, which test plans we have for that given combined information: page_2

Finally, in the third view, you can see all details of a given test plan combined with kernel version, date and branch. Example page 3: page_3 Example page 3.1: page_3 1 Example page 3.2: page_3 2

We already have some discussion around a new dashboard in progress (see some user stories being discussed ) the idea here is not to bring these views as the solution for this problem but a way to interact and gather information from the new API and experiment with it in a reasonable way to visualize data from new integrations as well (fstests, kunit).

nuclearcat commented 1 year ago

It looks like it is failing on staging (not sure yet):

fatal: [staging.kernelci.org]: FAILED! => {"changed": true, "cmd": ["nodejs", "/srv/staging.kernelci.org/app/dashboard/static/js/lib/r.js", "-o", "/srv/staging.kernelci.org/app/dashboard/static/js/build.js"], "delta": "0:00:00.323137", "end": "2022-12-16 07:03:10.389187", "msg": "non-zero return code", "rc": 1, "start": "2022-12-16 07:03:10.066050", "stderr": "", "stderr_lines": [], "stdout": "Error: Error: ERROR: module path does not exist: kci-new-api-job-branch-kernel-plan.js for module named: kci-new-api-job-branch-kernel-plan.js. Path is relative to: /home/kernelci\n    at /srv/staging.kernelci.org/app/dashboard/static/js/lib/r.js:26773:35", "stdout_lines": ["Error: Error: ERROR: module path does not exist: kci-new-api-job-branch-kernel-plan.js for module named: kci-new-api-job-branch-kernel-plan.js. Path is relative to: /home/kernelci", "    at /srv/staging.kernelci.org/app/dashboard/static/js/lib/r.js:26773:35"]}
nuclearcat commented 1 year ago

Strange, but seems on second try it went thru

gctucker commented 1 year ago

Thanks for this, it should be a very helpful tool during development of the new API & Pipeline as well as an extra way of prototyping things for the new web dashboard.

I would suggest to create a branch for this and host it on staging.kernelci.org with an alternative port number, so we don't risk breaking anything on the production web dashboard. Would that be OK? If so I can create the branch e.g. api-experimental and create a SysAdmin task to set up the instance.

gctucker commented 1 year ago

Some notes about the API:

gctucker commented 1 year ago

One thought, if you have some time to spend on this: as a follow-up it would be nice to have a login page since we already have user accounts with the new API. It's using OAuth2 with JWT tokens, so I believe there are standard libraries to cover the implementation and we just need a basic web form to interact with the users. See the API docs for more details.

mgalka commented 1 year ago

Putting staging-skip label as it looks there are some issues with deploying this changes to staging

alexandrasp commented 1 year ago

Thanks for this, it should be a very helpful tool during development of the new API & Pipeline as well as an extra way of prototyping things for the new web dashboard.

I would suggest to create a branch for this and host it on staging.kernelci.org with an alternative port number, so we don't risk breaking anything on the production web dashboard. Would that be OK? If so I can create the branch e.g. api-experimental and create a SysAdmin task to set up the instance.

Thanks, @gctucker. I believe this is the best alternative. Keep a separate branch with these experimental changes.

alexandrasp commented 1 year ago

One thought, if you have some time to spend on this: as a follow-up it would be nice to have a login page since we already have user accounts with the new API. It's using OAuth2 with JWT tokens, so I believe there are standard libraries to cover the implementation and we just need a basic web form to interact with the users. See the API docs for more details.

I will create a ticket to have this in mind for next year so I can discuss it with Gustavo Padovan, and we can decide together how much effort is to put into this.