ytsaurus-ui icon indicating copy to clipboard operation
ytsaurus-ui copied to clipboard

Show correct labels for YQL errors

Open Krock21 opened this issue 6 months ago • 1 comments

Sometimes it is hard to understand YQL errors. Sometimes they are misleading. For example: Screenshot 2024-09-02 at 13 12 11 Screenshot 2024-09-02 at 13 12 18

Here we have an error DQ cannot execute the query, which is more like a warning and is misleading. Also it wasn't hidden (1st screenshot) as it is a separate branch.

But in the get_query response we see that the error has some attributes about severity

"inner_errors": [
                            {
                                "code": 31070,
                                "message": "Optimization",
                                "attributes": {
                                    "yql_status": "Core optimization",
                                    "severity": "Info"                                 ===========================================
                                },
                                "inner_errors": [
                                    {
                                        "code": 30000,
                                        "message": "DQ cannot execute the query. Cause: system python udf",
                                        "attributes": {
                                            "yql_status": "Default error",
                                            "severity": "Info"                       ============================================
                                        }
                                    }
                                ]
                            },
                            {
                                "code": 31060,
                                "message": "Execution",
                                "attributes": {
                                    "yql_status": "Core exec",
                                    "severity": "Error"                             =========================================
                                },
                                "inner_errors": [
                                    {
                                        "code": 30000,
                                        "message": "Execution of node: Result",
                                        "attributes": {
                                            "yql_status": "Default error",
                                            "end_position": {
                                                "column": 1,
                                                "row": 7
                                            },
                                            "severity": "Error",                ====================================================
                                            "start_position": {
                                                "column": 1,
                                                "row": 7
                                            }
                                        },

But on the screenshots above, all lines are marked as Error, while Core optimization and DQ cannot execute the query. Cause: system python udf should be marked as Info.

So I suggest:

  • Parse severity and show correct severity for lines
  • Improve error folding by folding everything that is not Error severity

Krock21 avatar Sep 02 '24 11:09 Krock21