-
Notifications
You must be signed in to change notification settings - Fork 181
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
Onboarding Flows - Theme: Yoda #946
Conversation
👍
12:13:59 [ERROR]
12:13:59 [ERROR] ------------------------------------------------------------
12:13:59 [ERROR] Exception: Failed to extract metadata for file: '/home/ubuntu/cloud-slang-content/content/io/cloudslang/samples/yoda/quote_check.sl'.
null
12:13:59 [ERROR] Exception: Some Slang files were not pre-compiled.
Found: 580 executable files in path: '/home/ubuntu/cloud-slang-content/content' But managed to create slang models for only: 579
12:13:59 [ERROR] FAILURE: Validation of slang files for project: "/home/ubuntu/cloud-slang-content" failed.
12:13:59 [ERROR] ------------------------------------------------------------
12:13:59 [ERROR] |
please also shortly describe in the PR message what the use case is |
Hello @dandenisa and congrats on your first PR on cloud-slang-content. |
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.
Please move the .sl files in the correct folder. ATM they are in io.cloudslang.samples
They should be in io.cloudslang.content.
And is the folder going to be samples, or some of it can be added to other folders?
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.
Had a couple of comments, other than that, great job.
# The Apache License is available at | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
#########################################################################################################################!! |
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 might be the error in CircleCi and Travis, the "!!" at the end of ".....#########" and the fact that you don`t have the YAML start text tag : "#!!" after them
base.print_text: | ||
- text: ${read_text} | ||
navigate: | ||
- SUCCESS: SUCCESS |
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.
Please add the final result of the operation: SUCCESS and FAILURE
@@ -0,0 +1,225 @@ | |||
|
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.
@Bonczidai Do we allow text files in the content as "resource" files? Or can it be added manually whenever you want to run any operation or flow related to Yoda.
@@ -0,0 +1 @@ | |||
May the Force be with you;You will find only what you bring in;Size matters not;Do or do not. There is no try;The fear of loss is a path to the Dark Side;Truly wonderful the mind of a child is;Always two there are, no more, no less. A master and an apprentice;You must unlearn what you have learned;In a dark place we find ourselves, and a little more knowledge lights our way;Train yourself to let go of everything you fear to lose;Fear is the path to the dark side. Fear leads to anger, anger leads to hate, hate leads to suffering;Always pass on what you have learned;To be Jedi is to face the truth, and choose. Give off light, or darkness, Padawan. Be a candle, or the night; |
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.
The same applies here (see above).
inputs: | ||
- default_quote: | ||
default: "Do or do not, there is no try!" | ||
private: true |
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.
Setting this as private true, means that you cannot change it`s value. Is it the desired effect, or do we want the user to be able to use other quotes as well?
|
||
- print_random_quote: | ||
do: | ||
quoteGenerator.generate_random_quote: |
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.
quoteGenerator should be renamed to something like quote_generator.
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.
@dandenisa There are a few comments that need tp be handled, Please add a test for the overall flow.
# | ||
######################################################################################################################## | ||
|
||
namespace: io.cloudslang.base.examples.properties |
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.
@dandenisa Please move the system properties file in configuration/properties/io/cloudslang/base/examples and update it`s reference where applied.
namespace: io.cloudslang.base.examples.yoda | ||
|
||
decision: | ||
name: contains |
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 think it would help out if this decision would be more generic, or use a different existing one to check for 'true' and 'false. @dandenisa WDYT?
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.
there are couple of possibilities here: you can use an existing decision and do the check at step level or you can define a custom one like you did (if you happen to choose the second one, you should probably change the decision name / result - contains
?)
@@ -0,0 +1 @@ | |||
May the Force be with you;You will find only what you bring in;Size matters not;Do or do not. There is no try;The fear of loss is a path to the Dark Side;Truly wonderful the mind of a child is;Always two there are, no more, no less. A master and an apprentice;You must unlearn what you have learned;In a dark place we find ourselves, and a little more knowledge lights our way;Train yourself to let go of everything you fear to lose;Fear is the path to the dark side. Fear leads to anger, anger leads to hate, hate leads to suffering;Always pass on what you have learned;To be Jedi is to face the truth, and choose. Give off light, or darkness, Padawan. Be a candle, or the night; |
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.
maybe you could use newline
separator here
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.
@dandenisa WDYT?
do: | ||
math.random_number_generator: | ||
- min: '0' | ||
- max: ${str(len(read_text.strip().split(';')) - 2)} |
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.
Y the -2
?
######################################################################################################################## | ||
#!! | ||
#! @description: The flow is based on a System Property file | ||
#! If it is set on true it displays the default quote, otherwise generates a random quote. |
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.
little more indentation please
we will also need basic testing for these flows before merging |
any update on these flows? Can't wait to see it in master branch |
Signed-off-by: Denisa Dan <[email protected]>
@dandenisa what is the status of this PR?
we need to make sure we don;t introduce new uncovered items - opened related issue: #957 |
name: test_quote_check | ||
|
||
inputs: | ||
- default_quote: |
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.
the logic here is fishy - you say test_quote_check
but you don;t invoke quote_check
only a step from it? What do you intend to test with branch print_default_quote
also, did you activate the new test suite? |
Signed-off-by: Denisa Dan <[email protected]>
53ed5be
to
6be8554
Compare
8350722
to
e6d25f6
Compare
Signed-off-by: Denisa Dan <[email protected]>
29c011a
to
701e559
Compare
Signed-off-by: Denisa Dan <[email protected]>
# | ||
######################################################################################################################## | ||
testQuoteCheckSpTrue: | ||
description: Tests that quote_check finishes with SUCCESS for the default case |
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.
@tethryus do we want these CRLF
chars?
great work @tethryus 👌 |
Signed-off-by: sorin <[email protected]>
Signed-off-by: Denisa Dan <[email protected]>
Closing this PR. Will be added to the on boarding repository. |
Signed-off-by: Denisa Dan [email protected]