Can not make 'Build numbe attribute' work in '[BETA] Filters' web page

Asked by Kostya

Hello,

When I edit filter by adding "Build number attribute: build". It stops showing any results.
However I have Custom attribute 'build' in the test results:

...
Test duration:
1 day, 0:00:01.000001
Custom attributes (defined at test result level):
Build
100
Custom attributes (defined at test run level):
...

Please suggest what I am doing wrong. Thanks in advance.

Kostya

Question information

Language:
English Edit question
Status:
Solved
For:
LAVA Dashboard (deprecated) Edit question
Assignee:
No assignee Edit question
Solved by:
Kostya
Solved:
Last query:
Last reply:
Revision history for this message
Andy Doan (doanac) said :
#1

I could be wrong, but I think those are a different type of attribute than what the filter allows you to narrow down on. The attributes we filter on in our filters would come from something in your job file JSON (not in a test result). For example Linaro builds include things like:

  "actions": [
    {
      "command": "deploy_linaro_image",
      "parameters": {
        "image": "http://snapshots.linaro.org/quantal/pre-built/origen/43/origen-quantal_developer_20130109-43.img.gz"
      },
      "metadata": {
        "ubuntu.distribution": "quantal",
        "ubuntu.build": "43",
        "rootfs.type": "developer",
        "ubuntu.name": "origen"
      }
    },

As you can see there, we add the attributes: ubuntu.distribution, ubuntu.build, rootfs.type, and ubuntu.name to allow filtering on.

Revision history for this message
Kostya (kpelex) said :
#2

Andy,

Than you for answer. I tried to add

  ],
  "metadata": {
        "build": "199"
      }

to my test definition file. Still does not work.

However I belive you are right. There are probably some other things to correct.
I will check the postgre DB to make sure my 'build' attribute arrived correctly and will update.
But will do it Mondyay.

Regards,
Kostya

Revision history for this message
Michael Hudson-Doyle (mwhudson) said :
#3

Yes, the 'build number attribute' needs to be a test _run_ attribute, not a test _result_ attribute (filters mostly work on the test run level in general). Apologies for the lack of clarity here!

Revision history for this message
Kostya (kpelex) said :
#4

Hello Michael, Andy,

Yes, it worked for me when I defined the build number in test result on the test_run level. Like:

{
    "test_runs": [
    {
      "analyzer_assigned_date": "2012-12-20T16:32:12Z",
      "time_check_performed": false,
      "test_results": [
        {
          ....
        }
      ],
      "analyzer_assigned_uuid": "1234567890",
      "test_id": "id123",
   "attributes":
   {
  "build": "110"
   }
    }
  ],
  "format": "Dashboard Bundle Format 1.3"
}

Thank you for help. Have a nice day.

Regards,
Kostya