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

Support tags in RPC server tasks #1822

Closed
drewbanin opened this issue Oct 10, 2019 · 1 comment · Fixed by #1828
Closed

Support tags in RPC server tasks #1822

drewbanin opened this issue Oct 10, 2019 · 1 comment · Fixed by #1828
Labels
enhancement New feature or request rpc Issues related to dbt's RPC server

Comments

@drewbanin
Copy link
Contributor

drewbanin commented Oct 10, 2019

Describe the feature

The rpc server should accept an arbitrary set of key/value pairs for non-builtin task methods. These tags should be semantically meaningless, but should also be returned in the output of the ps and poll methods.

Example rpc call:

{
	"jsonrpc": "2.0",
	"method": "run",
	"id": "123",
	"params": {},
	"tags": {
	    "branch": "fix/orders",
	    "commit": "#abc123"
	}
}

Resulting ps output:

{
    "result": {
        "rows": [
            {
                "task_id": "7226e841-a870-4a52-96da-32cad6f78f2b",
                "request_id": "123",
                "request_source": "127.0.0.1",
                "method": "run",
                "state": "success",
                "start": "2019-10-10T13:41:56.389109Z",
                "end": null,
                "elapsed": 0.91682,
                "timeout": null,
                    "tags": {
                        "branch": "fix/orders",
                        "commit": "#abc123"
                    }
            }
        ]
    },
    "id": "123",
    "jsonrpc": "2.0"
}

Resulting poll output:

{
    "result": {
        "results": [...],
        "generated_at": "2019-10-10T13:41:57.282238Z",
        "elapsed_time": 0.8061051368713379,
        "logs": [...],
        "status": "success"
        "tags": {
            "branch": "fix/orders",
            "commit": "#abc123"
        }
    },
    "id": "123",
    "jsonrpc": "2.0"
}
@drewbanin drewbanin added enhancement New feature or request rpc Issues related to dbt's RPC server labels Oct 10, 2019
@drewbanin drewbanin added this to the Louisa May Alcott milestone Oct 10, 2019
@beckjake
Copy link
Contributor

beckjake commented Oct 10, 2019

Putting this data at the top level would violate the json-rpc spec be annoying to implement on the server side. Could we put it into params, instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rpc Issues related to dbt's RPC server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants