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

tink-server log outputting broken JSON for tink workflow create #259

Closed
jeremytanner opened this issue Aug 18, 2020 · 0 comments · Fixed by #260 or #263
Closed

tink-server log outputting broken JSON for tink workflow create #259

jeremytanner opened this issue Aug 18, 2020 · 0 comments · Fixed by #260 or #263
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jeremytanner
Copy link
Member

While working through the 'Start the Worker' section of Local Setup with Vagrant, the logs I see when running tink workflow create have an unsubstituted variable %s in them, breaking the JSON:

tink-server_1 | {"level":"info","ts":1597789674.3348048,"caller":"grpc-server/workflow.go:62","msg":"done creating a new workflow","service":"github.com/tinkerbell/tink"} tink-server_1 | {"level":"info","ts":1597789676.3223796,"caller":"grpc-server/tinkerbell.go:226","msg":"send workflow context: %s4d4aa5e2-5683-4114-8df7-0896b6a11027","service":"github.com/tinkerbell/tink"} tink-server_1 | {"level":"info","ts":1597789676.3249314,"caller":"grpc-server/tinkerbell.go:93","msg":"received action status: %sworkflow_id:\"4d4aa5e2-5683-4114-8df7-0896b6a11027\" task_name:\"hello world\" action_name:\"hello_world\" action_status:ACTION_IN_PROGRESS message:\"Started execution\" worker_id:\"ce2e62ed-826f-4485-a39f-a82bb74338e2\"","service":"github.com/tinkerbell/tink"} tink-server_1 | {"level":"info","ts":1597789676.3285482,"caller":"grpc-server/tinkerbell.go:133","msg":"current workflow context: %sworkflow_id:\"4d4aa5e2-5683-4114-8df7-0896b6a11027\" current_worker:\"ce2e62ed-826f-4485-a39f-a82bb74338e2\" current_task:\"hello world\" current_action:\"hello_world\" current_action_state:ACTION_IN_PROGRESS total_number_of_actions:1","service":"github.com/tinkerbell/tink"} tink-server_1 | {"level":"info","ts":1597789696.6384761,"caller":"grpc-server/tinkerbell.go:93","msg":"received action status: %sworkflow_id:\"4d4aa5e2-5683-4114-8df7-0896b6a11027\" task_name:\"hello world\" action_name:\"hello_world\" action_status:ACTION_SUCCESS seconds:20 message:\"Finished Execution Successfully\" worker_id:\"ce2e62ed-826f-4485-a39f-a82bb74338e2\"","service":"github.com/tinkerbell/tink"} tink-server_1 | {"level":"info","ts":1597789696.642912,"caller":"grpc-server/tinkerbell.go:133","msg":"current workflow context: %sworkflow_id:\"4d4aa5e2-5683-4114-8df7-0896b6a11027\" current_worker:\"ce2e62ed-826f-4485-a39f-a82bb74338e2\" current_task:\"hello world\" current_action:\"hello_world\" current_action_state:ACTION_SUCCESS total_number_of_actions:1","service":"github.com/tinkerbell/tink"}

Possible Solution

logger calls in tink/grpc-server/tinkerbell.go (Lines 93, 133, 221, 226) Aren't formatting string properly

Environment

MacOS

Using Vagrant & VirtualBox

@jeremytanner jeremytanner changed the title tink-server log outputting broken JSON for tin workflow create tink-server log outputting broken JSON for tink workflow create Aug 18, 2020
@jeremytanner jeremytanner added the kind/bug Categorizes issue or PR as related to a bug. label Aug 18, 2020
@gianarb gianarb self-assigned this Aug 19, 2020
@mergify mergify bot closed this as completed in #260 Aug 19, 2020
mergify bot added a commit that referenced this issue Aug 19, 2020
@gauravgahlot gauravgahlot reopened this Aug 19, 2020
@gauravgahlot gauravgahlot self-assigned this Aug 21, 2020
@mergify mergify bot closed this as completed in #263 Aug 21, 2020
mergify bot added a commit that referenced this issue Aug 21, 2020
## Why is this needed

Fixes: #259 


## How Has This Been Tested?
Tested by executing a workflow on Vagrant setup. 

## Logs
```
tink-server_1  | {"level":"info","ts":1597993697.729267,"caller":"tink-server/main.go:30","msg":"starting version c94241f","service":"github.com/tinkerbell/tink"}
tink-server_1  | {"level":"info","ts":1597993697.7294364,"caller":"metrics/metrics.go:58","msg":"initializing label values","service":"github.com/tinkerbell/tink"}
tink-server_1  | {"level":"info","ts":1597993697.7324421,"caller":"grpc-server/grpc_server.go:77","msg":"serving grpc","service":"github.com/tinkerbell/tink"}
tink-server_1  | {"level":"info","ts":1597993697.7331507,"caller":"http-server/http_server.go:90","msg":"serving http","service":"github.com/tinkerbell/tink"}
tink-server_1  | {"level":"info","ts":1597993707.0710828,"caller":"grpc-server/workflow.go:153","msg":"listworkflows","service":"github.com/tinkerbell/tink"}
tink-server_1  | {"level":"info","ts":1597993714.4313056,"caller":"grpc-server/workflow.go:119","msg":"deleteworkflow","service":"github.com/tinkerbell/tink"}
tink-server_1  | {"level":"info","ts":1597993714.4314113,"caller":"grpc-server/workflow.go:137","msg":"deleting a workflow","service":"github.com/tinkerbell/tink","workflowID":"668efc38-5072-40ed-b575-98cc4f8dc8e7"}
tink-server_1  | {"level":"info","ts":1597993714.4338477,"caller":"grpc-server/workflow.go:147","msg":"done deleting a workflow","service":"github.com/tinkerbell/tink","workflowID":"668efc38-5072-40ed-b575-98cc4f8dc8e7"}
tink-server_1  | {"level":"info","ts":1597993718.7341084,"caller":"grpc-server/workflow.go:29","msg":"createworkflow","service":"github.com/tinkerbell/tink"}
tink-server_1  | {"level":"info","ts":1597993718.7341583,"caller":"grpc-server/workflow.go:59","msg":"creating a new workflow","service":"github.com/tinkerbell/tink"}
tink-server_1  | {"level":"info","ts":1597993718.7396371,"caller":"grpc-server/workflow.go:71","msg":"done creating a new workflow","service":"github.com/tinkerbell/tink","workflowID":"9abf6d93-e117-4ca0-be11-1bb6f31cb371"}
tink-server_1  | {"level":"info","ts":1597993833.5934675,"caller":"grpc-server/tinkerbell.go:239","msg":"send workflow context: 9abf6d93-e117-4ca0-be11-1bb6f31cb371","service":"github.com/tinkerbell/tink"}
tink-server_1  | {"level":"info","ts":1597993833.5954807,"caller":"grpc-server/tinkerbell.go:96","msg":"received action status: ACTION_IN_PROGRESS","service":"github.com/tinkerbell/tink","actionName":"hello_world","workflowID":"9abf6d93-e117-4ca0-be11-1bb6f31cb371"}
tink-server_1  | {"level":"info","ts":1597993833.5994563,"caller":"grpc-server/tinkerbell.go:146","msg":"current workflow context","service":"github.com/tinkerbell/tink","workflowID":"9abf6d93-e117-4ca0-be11-1bb6f31cb371","currentWorker":"0eba0bf8-3772-4b4a-ab9f-6ebe93b90a94","currentTask":"hello world","currentAction":"hello_world","currentActionIndex":"0","currentActionState":"ACTION_IN_PROGRESS","totalNumberOfActions":1}
tink-server_1  | {"level":"info","ts":1597993833.9179895,"caller":"grpc-server/tinkerbell.go:96","msg":"received action status: ACTION_SUCCESS","service":"github.com/tinkerbell/tink","actionName":"hello_world","workflowID":"9abf6d93-e117-4ca0-be11-1bb6f31cb371"}
tink-server_1  | {"level":"info","ts":1597993833.9213414,"caller":"grpc-server/tinkerbell.go:146","msg":"current workflow context","service":"github.com/tinkerbell/tink","workflowID":"9abf6d93-e117-4ca0-be11-1bb6f31cb371","currentWorker":"0eba0bf8-3772-4b4a-ab9f-6ebe93b90a94","currentTask":"hello world","currentAction":"hello_world","currentActionIndex":"0","currentActionState":"ACTION_SUCCESS","totalNumberOfActions":1}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants