camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

Kamel `bind` step index unclear

Open squakez opened this issue 4 years ago • 9 comments

I was playing with kamel bind command and I realized that we use 0 index start when we play with step properties. Ie kamel bind ... --step my-step -p step-0.my-key=value. For usability I think we should improve this and let the user start with 1 index instead.

squakez avatar Aug 23 '21 13:08 squakez

+1

heiko-braun avatar Aug 23 '21 13:08 heiko-braun

This issue has been automatically marked as stale due to 90 days of inactivity. It will be closed if no further activity occurs within 15 days. If you think that’s incorrect or the issue should never stale, please simply write any comment. Thanks for your contributions!

github-actions[bot] avatar Nov 22 '21 00:11 github-actions[bot]

Hi, I'm an Outreachy applicant and I'd like to be assigned this issue

SaumyaSachdev avatar Apr 17 '22 12:04 SaumyaSachdev

Thanks for the interest. Please, reach out to me if you need any help.

squakez avatar Apr 18 '22 07:04 squakez

Hi @squakez, I tried reaching out to you on Zulip with a few questions. Could you please help with them?

SaumyaSachdev avatar Apr 19 '22 10:04 SaumyaSachdev

Hello, I've already answered in the chat, though, it's easier for me following up here asynchronously. As a reference you can used the output produced by the following statement:

$ kamel bind timer:foo log:bar --step first --step second -p step-0.var1=1 -p step-0.var2=2 -p step-1.vara=a -o yaml

We must convert that index starting with 0 to start with 1 and having the very same output. Likely a unit test as the one available at https://github.com/apache/camel-k/blob/main/pkg/cmd/bind_test.go#L61 will help you making some good TDD approach.

squakez avatar Apr 19 '22 11:04 squakez

makeError I'm trying to test my changes locally by building the repository and replacing the binary in my /usr/bin, however, I get this error. I was successfully able to build this project earlier. Could you please help resolve this error? I'm not sure what is wrong here

SaumyaSachdev avatar Apr 19 '22 15:04 SaumyaSachdev

Yeah, this one will fix the problem: #3222

In the while, you can temporary change that value manually on your makefile, and then, revert before committing, so it won't conflict during merge.

squakez avatar Apr 19 '22 15:04 squakez

@SaumyaSachdev are you still working on this issue?

essobedo avatar Sep 12 '22 08:09 essobedo