Skip to content
Snippets Groups Projects
Closed insights: duplicate time values are returning from API [timeboxed]
  • View options
  • insights: duplicate time values are returning from API [timeboxed]

  • View options
  • Closed Issue created by Administrator

    Created by: coury-clark

    When clicking on an insight point the wrong query was generated. @vovakulikov identified that the API response is returning duplicate values for a single time period.

    Typically we deduplicate data coming out of the database, so my first instinct would be to look at the resolver construction and see if there is any duplicates there.

    Relevant insight https://demo.sourcegraph.com/insights/insight/aW5zaWdodF92aWV3OiIyNU9UM0FkT2hSem1reHJxbWFKZE9Qekt5VUUi

    {
        "data": {
            "insightViews": {
                "nodes": [
                    {
                        "id": "aW5zaWdodF92aWV3OiIyNU9UM0FkT2hSem1reHJxbWFKZE9Qekt5VUUi",
                        "dataSeries": [
                            {
                                "seriesId": "25OT3D2PbaSBv2w4o3QQEf5oZV0",
                                "label": "this.skip() or it.skip(",
                                "points": [
                                    {
                                        "dateTime": "2021-06-20T00:00:00Z",
                                        "value": 12,
                                        "__typename": "InsightDataPoint"
                                    },
                                    {
                                        "dateTime": "2021-07-20T00:00:00Z",
                                        "value": 12,
                                        "__typename": "InsightDataPoint"
                                    },
                                    {
                                        "dateTime": "2021-08-20T00:00:00Z",
                                        "value": 14,
                                        "__typename": "InsightDataPoint"
                                    },
                                    {
                                        "dateTime": "2021-09-20T00:00:00Z",
                                        "value": 12,
                                        "__typename": "InsightDataPoint"
                                    },
                                    {
                                        "dateTime": "2021-10-20T00:00:00Z",
                                        "value": 12,
                                        "__typename": "InsightDataPoint"
                                    },
                                    {
                                        "dateTime": "2021-11-20T00:00:00Z",
                                        "value": 12,
                                        "__typename": "InsightDataPoint"
                                    },
                                    {
                                        "dateTime": "2021-12-20T00:00:00Z",
                                        "value": 22,
                                        "__typename": "InsightDataPoint"
                                    },
                                    {
                                        "dateTime": "2022-01-20T00:00:00Z",
                                        "value": 22,
                                        "__typename": "InsightDataPoint"
                                    },
                                    {
                                        "dateTime": "2022-02-20T00:00:00Z",
                                        "value": 24,
                                        "__typename": "InsightDataPoint"
                                    },
                                    {
                                        "dateTime": "2022-03-20T23:13:23Z",
                                        "value": 32,
                                        "__typename": "InsightDataPoint"
                                    },
                                    {
                                        "dateTime": "2022-04-20T23:13:40Z",
                                        "value": 32,
                                        "__typename": "InsightDataPoint"
                                    },
                                    {
                                        "dateTime": "2022-05-20T23:38:10Z",
                                        "value": 77,
                                        "__typename": "InsightDataPoint"
                                    },
                                    {
                                        "dateTime": "2022-05-20T23:38:10Z",
                                        "value": 77,
                                        "__typename": "InsightDataPoint"
                                    },
                                    {
                                        "dateTime": "2022-06-16T00:25:13Z",
                                        "value": 58,
                                        "__typename": "InsightDataPoint"
                                    }
                                ],
                                "status": {
                                    "backfillQueuedAt": "2022-02-20T22:58:34Z",
                                    "completedJobs": 7,
                                    "pendingJobs": 0,
                                    "failedJobs": 548,
                                    "__typename": "InsightSeriesStatus"
                                },
                                "__typename": "InsightsSeries"
                            }
                        ],
                        "__typename": "InsightView"
                    }
                ],
                "__typename": "InsightViewConnection"
            }
        }
    }

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first