-
Notifications
You must be signed in to change notification settings - Fork 525
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
Paulyuk/hello world refactor #478
Conversation
|
1ce282b
to
3b56a99
Compare
3b56a99
to
05f01f0
Compare
Hey @msfussell, thank you for the feedback. Ok we can keep this clean and focused on inner loop, and break build and deploy into separate steps. Tye is an open source tool that is really handy for all languages we use in Dapr, but let's also keep that separate. I haven't written new docs for these, so we'll leave that to a future PR. Now this PR is about:
That's it. Better? |
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 noticed that you've moved both hello-world/sample.http and hello-world/sample.json into the hello-world/python directory. While that makes sense for the structure of the source code since the python app initiates the orders, I actually think these sample "orders" should be kept in the hello-world/node directory instead. Since the user of this quickstart will use the sample.* files to test their node deployment, we should house these files in the node directory for easier access immediately following their node dapr app deployment. Thoughts?
Hi Will! thank you for the review and feedback. Good catch. It's interesting that sample data is a hard requirement for pythonapp, but it's also a soft dependency of nodeapp since we guide folks to call the invoke CLI command with it. Let's call on some creativity then.. How about this: sample.http MOVES to \node folder because it's the documented way to test the nodeapp service from any REST client, curl etc. Note that a sample data is self-contained in this file so you don't need second sample.json. sample.json is COPIED (yes there will be two copies) since is really a hard dependency of pythonapp client, but also a soft dependency of the doc for nodeapp. I'm a bit of a stickler about data being co-located with its microservice, and not leaking out. The only other alternative I can see is moving sample.json and sample.http up to the root of hello-world, and change docs to say ../samples.json as path. That seems less ideal to me. |
@paulyuk - I agree with this approach. While having two copies of sample.json is redundant, I think it's necessary for the sake of convenience in the quickstart steps (i.e. no need to |
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.
LTGM
hello-world/README.md
Outdated
@@ -329,7 +330,7 @@ while True: | |||
time.sleep(1) | |||
``` | |||
|
|||
Now open a **new** command line terminal and go to the `hello-world` directory. | |||
Now open a **new** command line terminal and go to the `./hello-world/python` directory. |
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.
Can you make this sentence and the node one "Open a terminal window and navigate" consistent. One says Command Line terminal and the other terminal window.
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.
"command line terminal" was a preexisting issue, but I was happy to fix while in there. That's all done now. We're going with "new terminal" everywhere.
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.
Did you intend to go to the hello-world/K8s quickstart and "improve" the container Dockerfile with your suggestions?
Also these folder changes are simply to make it consistent with the K8s/Hello World example I presume?
@msfussell Yes I plan to do that k8s dockerfile work separately in another PR focused on deployment options including dockerized ones. These folder changes simply add consistency, but also mirror what a node or python developer is used to, as well as what you'd want to see out of tiny autonomous microservices. |
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.
Changes LGTM
Description
This addresses the proposal to refactor ./hello-world quickstart into node and python subfolders. This is closer to what other quickstarts do, to what real life code looks like, and it enables downstream Devops benefits like having seperate Dockerfiles or builds.
The following changes were made:
nodeapp
into./hello-world/node
pythonapp
into./hello-world/python
Issue reference
Fixes #477
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: