tink icon indicating copy to clipboard operation
tink copied to clipboard

`tink workflow events` should support --format=json

Open micahhausler opened this issue 4 years ago • 5 comments

Expected Behaviour

I'd like to review the event JSON for deeper inspection. All the other read commands support it

Current Behaviour

No --format supported on tink workflow events $WORKFLOW

Possible Solution

Add a --format flag

micahhausler avatar Jun 11 '21 19:06 micahhausler

I think this sounds like a great idea, and we should totally do this.

As you mentioned, since all of the other read commands support this, it shouldn't be too difficult to add to the events code. I'll mark this as a good first issue.

tstromberg avatar Aug 10 '21 15:08 tstromberg

The table writer can be reused here as in https://github.com/tinkerbell/tink/blob/master/cmd/tink-cli/cmd/get/get.go#L95-L146

https://github.com/tinkerbell/tink/blob/master/cmd/tink-cli/cmd/workflow/get.go#L42-L50 would need to build an object to emit rather than println'ing each item.

displague avatar Aug 10 '21 15:08 displague

@tstromberg , I have started working on this issue -- could I've this assigned to me?

krishnanarchana avatar Sep 06 '21 22:09 krishnanarchana

@tstromberg could you please take a look at this PR: https://github.com/tinkerbell/tink/pull/646? I am unable to add anyone as reviewer.

hitesh-infracloud avatar Oct 05 '22 10:10 hitesh-infracloud

@hitesh-infracloud Thank you for the PR. In relation to this issue, we recently decided to deprecate the Postgres back-end and remove it entirely in the near future. This would see the CLI either reduce significantly in scope or disappear entirely as operators would interact with state via kubectl instead.

If the JSON output isn't strictly needed right now it probably isn't worth adding given it'll be removed in the near future.

Would love to hear your feedback.

chrisdoherty4 avatar Oct 05 '22 11:10 chrisdoherty4

Closing the issue after receiving no feedback.

chrisdoherty4 avatar Nov 21 '22 17:11 chrisdoherty4