adoptium / aqa-test-tools

Home of Test Results Summary Service (TRSS) and PerfNext. These tools are designed to improve our ability to monitor and triage tests at the Adoptium project. The code is generic enough that it is extensible for use by any project that needs to monitor multiple CI servers and aggregate their results.
Apache License 2.0
28 stars 79 forks source link

RFE: Return original input _id in getTotals request #850

Closed jiekang closed 4 months ago

jiekang commented 4 months ago

When you make a request to getTotals you submit an id to request for (for example https://trss.adoptium.net/api/getTotals?id=65a706d596a988006d0eed2b) and it returns a response like:

{
    "_id": {},
    "total": 854,
    "executed": 337,
    "passed": 322,
    "failed": 15,
    "disabled": 72,
    "skipped": 445
}

The _id field is intentionally omitted at the moment:

https://github.com/adoptium/aqa-test-tools/blob/faa3b1c82e93e11aef7fa04f8d15f454e7b9ee87/TestResultSummaryService/Database.js#L179

This issue is a request to return the original _id that was submitted. This is useful for further parsing of the data in different contexts as one can identify the source of the data from the data itself.

So for the above example, the preferred response would be:

{
    "_id": "65a706d596a988006d0eed2b",
    "total": 854,
    "executed": 337,
    "passed": 322,
    "failed": 15,
    "disabled": 72,
    "skipped": 445
}