-
Notifications
You must be signed in to change notification settings - Fork 135
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
Add functionality for users to retrieve template by Name as well as UUID #553
Conversation
435357c
to
965b4ec
Compare
965b4ec
to
29f5af7
Compare
cmd/tink-cli/cmd/get/get.go
Outdated
@@ -155,3 +148,31 @@ func NewGetCommand(opt Options) *cobra.Command { | |||
opt.clientConnOpt.SetFlags(cmd.PersistentFlags()) | |||
return cmd | |||
} | |||
|
|||
func retrieveMulti(opt Options, cmd *cobra.Command, args []string) ([]interface{}, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to extract this into a separate function to get golangci-linter happy.
Codecov Report
@@ Coverage Diff @@
## main #553 +/- ##
==========================================
+ Coverage 44.37% 44.65% +0.28%
==========================================
Files 61 61
Lines 3491 3509 +18
==========================================
+ Hits 1549 1567 +18
- Misses 1858 1860 +2
+ Partials 84 82 -2
Continue to review full report at Codecov.
|
965b4ec
to
bde7c94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks reasonable to me. Any idea why CI is failing, @mmlb?
Hey @mmlb, is this still on your radar? Any help needed? |
e62ede7
to
3a9bb2a
Compare
Still on the radar not sure why I hadn't merged it yet. I think I wanted to give it a go via sandbox but forgot/got distracted with boot issues I was debugging :D. I'll get CI to pass and get it merged soon. |
Rebased on top of master and now failing on actions/setup-go not being nice and exporting |
Waiting on actions/setup-go#175 |
I'll rebase on top of main now that #582 should be unblocking this. |
3751dc9
to
b788f0a
Compare
25343c6
to
1c544ec
Compare
Hey @mmlb, just a ping on this one. I can take a look after the merge conflicts are resolved. |
Thanks for the ping @jacobweinstock, lets see how things go. |
ah the tests are still going to fail though, lets see if thats a quick fix. |
Signed-off-by: Manuel Mendez <[email protected]>
Signed-off-by: Manuel Mendez <[email protected]>
66c9012
to
2102da8
Compare
alright @jacobweinstock I'm all rebased and tests passing! |
Signed-off-by: William Belcher <[email protected]> Co-Authored-by: Manuel Mendez <[email protected]> Signed-off-by: Manuel Mendez <[email protected]>
Otherwise we get a nice panic. Signed-off-by: Manuel Mendez <[email protected]>
Hey @jacobweinstock ptal again. I added a couple more tests, for when the function that fetches the data doesn't exist. And added some protection to avoid running an undefined function. |
Awesome to see this merged in. Sorry for going MIA, my studies and work absolutely swamped me and I was unable to set some time aside to get the original PR complete. Thanks guys! |
@Belchy06 no worries, thanks for kicking this off. |
Description
This PR adds the ability for Tink to retrieve workflows by either UUID or by Name.
If the value after
tink template get
is not a valid UUID, Tink will default to searching for the value in the Name field of the templates.Mostly developed by @Belchy06, thanks!
My additions are:
Why is this needed
This feature is required for a project @Belchy06 is working on but is also something I'd like to make use of.
How Has This Been Tested?
This has been tested in the VM's based on the Local Setup with Vagrant tutorial, as well as in a personal deployment by @Belchy06.