Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft Queries do not work properly #879

Open
Krock21 opened this issue Nov 21, 2024 · 2 comments
Open

Draft Queries do not work properly #879

Krock21 opened this issue Nov 21, 2024 · 2 comments

Comments

@Krock21
Copy link
Member

Krock21 commented Nov 21, 2024

Normal queries show this part:
Status, duration, date, author, Share button, Modify ACO button, Statistics/progress/meta
Screenshot 2024-11-21 at 15 58 22

Draft queries don't:
Screenshot 2024-11-21 at 15 55 55

We should fix UI for draft queries, so users can see basic information and perform basic operations (share, modify ACO)

UI doesn't allow creating draft queries now, but they can be created via CLI or SDKs
CLI example:

yt start-query yql 'select 1' --params '{draft=%true}'
@vrozaev
Copy link
Collaborator

vrozaev commented Nov 29, 2024

So here we need support Author, Share button and Modify ACO button for draft queries, because only these buttons makes sense for draft query. And clearly show that the query is draft.

@Krock21
Copy link
Member Author

Krock21 commented Nov 29, 2024

Here is an example of get-query for a draft query:

{
    "id": "154e10ee-5ba30695-1b2baffc-3170f32f",
    "engine": "yql",
    "query": "select 1",
    "files": [],
    "start_time": "2024-11-21T14:53:12.387524Z",
    "settings": {},
    "user": "aleksandr.gaev",
    "access_control_object": "everyone",
    "access_control_objects": [
        "everyone"
    ],
    "state": "draft",
    "progress": {},
    "annotations": {}
}

and for a normal completed one:

{
    "id": "db33f3ed-560551aa-1cd978c2-9717381a",
    "engine": "yql",
    "query": "INSERT INTO `//home/yt-team/aleksandr.gaev/tmp/test-table-1` (key) VALUES (1);",
    "files": [],
    "start_time": "2024-11-29T10:25:00.786506Z",
    "finish_time": "2024-11-29T10:25:05.133850Z",
    "settings": {
        "cluster": "my-cluster"
    },
    "user": "aleksandr.gaev",
    "access_control_object": "nobody",
    "access_control_objects": [
        "nobody"
    ],
    "state": "completed",
    "result_count": 0,
    "progress": {
        "yql_plan": {
            ....
            }
        },
        "yql_statistics": {
        ...
        },
        "yql_progress": {
        ...
        }
    },
    "annotations": {},
    "error": {
        "code": 0,
        "message": "",
        "attributes": {}
    }
}

Draft query is in a special "draft" state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants