Runnable identifier#5992
Conversation
clebergnu
left a comment
There was a problem hiding this comment.
Hi @richtja,
This LGTM, but I will ask you to consider:
- Adding one example of the identifier to the recipes documentation section
- Adding identifier example to
examples/nrunner/recipes/runnableorexamples/nrunner/recipes/runnables
One other issue that this opens is what to present on an avocado list command. What I mean is that, until now, it was presenting the "only" information available, that is, the URI. Example:
avocado list examples/nrunner/recipes/runnable/exec_test_sleep_3.json
exec-test /bin/sleep
Now, with a change such as:
diff --git a/examples/nrunner/recipes/runnable/exec_test_sleep_3.json b/examples/nrunner/recipes/runnable/exec_test_sleep_3.json
index 23113758b..8e4284eb0 100644
--- a/examples/nrunner/recipes/runnable/exec_test_sleep_3.json
+++ b/examples/nrunner/recipes/runnable/exec_test_sleep_3.json
@@ -1 +1 @@
-{"kind": "exec-test", "uri": "/bin/sleep", "args": ["3"]}
+{"kind": "exec-test", "uri": "/bin/sleep", "args": ["3"], "identifier": "sleep-3-seconds"}It may make sense to show, instead:
avocado list examples/nrunner/recipes/runnable/exec_test_sleep_3.json
exec-test sleep-3-seconds
|
Hi @clebergnu, thanks for your review. I agree with you, and I will update the examples. Also, it reminded to me that I should update our documentation as well. |
225c0db to
8d414e3
Compare
|
Hi @clebergnu, I have added the examples and update the |
8d414e3 to
1b9fca0
Compare
|
Hi @clebergnu, thanks for your review. I have addressed your comments via force-push. Please have a look. |
This commit introduces a way how to explicitly specify runnable identifier through Job API or runnable recipe. This change shouldn't affect current behaviour and if the identifier is not specified it will be generated based on the `runner.identifier_format` config variable. Reference: avocado-framework#5964 Signed-off-by: Jan Richter <jarichte@redhat.com>
After this commit the `avocado list` command will print runnable identifier instead of url and `avocado -V list` will add the identifier as another column in the list matrix. It will be helpful when users will define their own identifiers after change in e7228af. Signed-off-by: Jan Richter <jarichte@redhat.com>
1b9fca0 to
331cd09
Compare
|
Hi @clebergnu, I have just updated the |
This commit introduces a way how to explicitly specify runnable identifier through Job API or runnable recipe. This change shouldn't affect current behaviour and if the identifier is not specified it will be generated based on the
runner.identifier_formatconfig variable.Reference: #5964