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 workflow state" does not return error when workflow UUID can't be found #381

Closed
invidian opened this issue Dec 10, 2020 · 3 comments · Fixed by #447
Closed

"tink workflow state" does not return error when workflow UUID can't be found #381

invidian opened this issue Dec 10, 2020 · 3 comments · Fixed by #447
Assignees

Comments

@invidian
Copy link
Contributor

Expected Behaviour

Running tink workflow state $(uuidgen) should always return error.

Current Behaviour

Running the command above exits with 0:

0 ✓ (28.1ms) 11:23:44 invidian@dellxps15mateusz ~/repos/kinvolk/tink/cmd/tink-cli (master)$ ./tink-cli workflow state $(uuidgen)
+----------------------+---------------+
| FIELD NAME           | VALUES        |
+----------------------+---------------+
| Workflow ID          |               |
| Workflow Progress    | 0%            |
| Current Task         |               |
| Current Action       |               |
| Current Worker       |               |
| Current Action State | STATE_PENDING |
+----------------------+---------------+
0 ✓ (54.4ms) 11:23:48 invidian@dellxps15mateusz ~/repos/kinvolk/tink/cmd/tink-cli (master)$

Possible Solution

Add validation.

Steps to Reproduce (for bugs)

  1. tink workflow state $(uuidgen)

Context

Tinkerbell version: 9c52cca

@thebsdbox thebsdbox added kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Dec 10, 2020
@gianarb gianarb removed priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. kind/bug Categorizes issue or PR as related to a bug. labels Dec 10, 2020
@gianarb
Copy link
Contributor

gianarb commented Dec 10, 2020

@thebsdbox I removed the bug label because looking at the code, it is written with that behavior in mind. I don't have enough context to know why, but first, we have to figure out if this is a feature or a bug

@splaspood
Copy link
Contributor

In my opinion this is most certainly a bug. A deleted workflow still has state in the database that could be returned here. If the intention is to not return data for deleted workflows, then the state command should return an error when looking up a 'nonexistent' workflow.

@gianarb
Copy link
Contributor

gianarb commented Feb 24, 2021 via email

parauliya added a commit to parauliya/tink that referenced this issue Mar 4, 2021
…if workflow does not exist

Signed-off-by: parauliya <aman@infracloud.io>
parauliya added a commit to parauliya/tink that referenced this issue Mar 4, 2021
…if workflow does not exist

Signed-off-by: parauliya <aman@infracloud.io>
@parauliya parauliya self-assigned this Mar 4, 2021
parauliya added a commit that referenced this issue Mar 10, 2021
Fixed #381: 'tink workflow state' command returns an error if workflow does not exist
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

Successfully merging a pull request may close this issue.

5 participants