trustification / trustify-ui

Trustify UI component.
2 stars 8 forks source link

Information of report not shown #102

Open ctron opened 2 months ago

ctron commented 2 months ago

Having errors in the report, those are not visible to the user:

image

The missing number of items comes from #101 and can be ignored.

gildub commented 2 months ago

@ctron, It seems there is a conflict of interest because the current error column displays item.error :

image

ctron commented 2 months ago

I am not sure that's the case. The error shown in the screenshot is an error fetching any information about the source. That leads to the walker not even known what content would exist. Therefore, the import process fails critically.

The errors shown above, in the original post, are errors on each file, which happened during import. The importer job will record those errors, but as they are permanent errors, will not retry until the file was updated.

gildub commented 2 months ago

@ctron, the conflict I see it that the UI currently display data from the report.error field. In the screenshot you provided the data you're expecting are coming from inside report.report.message structure.

carlosthe19916 commented 2 months ago

I am hoping to touch the "Importers" topic with the UX team to understand what exactly we want to see.

gildub commented 2 months ago

@ctron, the import-list page currently displays the item.error here : https://github.com/trustification/trustify-ui/blob/main/client/src/app/pages/importer-list/importer-list.tsx#L631

This is this quite a different structure we get from the report :

{
  "items": [
    {
      "id": "da9496da-f6bc-42ee-b5c3-8528ed9006d0",
      "importer": "test1",
      "creation": "2024-07-16T15:41:54.850656Z",
      "report": {
        "endDate": "2024-07-16T15:41:54.606444725Z",
        "messages": {
          "upload": {
            "https://access.redhat.com/security/data/sbom/beta/spdx/amq-7.json.bz2": [
              {
                "message": "Duplicate SPDX ID 'SPDXRef-DEP-daf1149207b8731a45d685b92750f9c55ee60207', occurred 2 times.",
                "severity": "warning"
              },
              {
                "message": "Duplicate SPDX ID 'SPDXRef-DEP-d38cda1a014ff01024ba320fea0dfba8de294482', occurred 2 times.",
                "severity": "warning"
              }

So it seems like we need to handle those different types of errors.

From that it seems to me that we need to display a "global" error about an importer -> item.error and display the errors for each report.