Skip to content
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

Added Quickstart for Javascript Jobs HTTP api #1134

Merged

Conversation

ConstantinChirila
Copy link

Description

Added the missing quickstart for how to use the Dapr Jobs with Javascript through standard http fetch.

Issue reference

We strive to have all PRs being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1112

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • The quickstart code compiles correctly
  • You've tested new builds of the quickstart if you changed quickstart code
  • You've updated the quickstart's README if necessary
  • If you have changed the steps for a quickstart be sure that you have updated the automated validation accordingly. All of our quickstarts have annotations that allow them to be executed automatically as code. For more information see mechanical-markdown. For user guide with examples see Examples.

@ConstantinChirila ConstantinChirila force-pushed the jobs-js-http-quickstart-1112 branch from a0408c1 to 4d31a4e Compare January 16, 2025 13:04
@ConstantinChirila ConstantinChirila changed the title [WIP] Added Quickstart for Javascript Jobs HTTP api Added Quickstart for Javascript Jobs HTTP api Jan 17, 2025
@ConstantinChirila ConstantinChirila marked this pull request as ready for review January 17, 2025 13:05
@ConstantinChirila ConstantinChirila requested review from a team as code owners January 17, 2025 13:05
Copy link

@alicejgibbons alicejgibbons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be tested without the multi-app run files and with the single dapr commands.

jobs/javascript/http/README.md Outdated Show resolved Hide resolved
jobs/javascript/http/README.md Outdated Show resolved Hide resolved
jobs/javascript/http/README.md Show resolved Hide resolved
jobs/javascript/http/README.md Outdated Show resolved Hide resolved
jobs/javascript/http/job-service/package.json Outdated Show resolved Hide resolved
jobs/javascript/http/job-scheduler/package.json Outdated Show resolved Hide resolved
jobs/javascript/http/job-scheduler/package.json Outdated Show resolved Hide resolved
Signed-off-by: Constantin Chirila <[email protected]>
@ConstantinChirila
Copy link
Author

Needs to be tested without the multi-app run files and with the single dapr commands.

Thank you for the comments @alicejgibbons.
I have addressed your comments and also ran the apps with single Dapr commands.

@ConstantinChirila ConstantinChirila force-pushed the jobs-js-http-quickstart-1112 branch from ebdbc89 to 9884f19 Compare January 17, 2025 16:19
```

<!-- END_STEP -->

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need a step for stopping the dotnet multi app run file?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ConstantinChirila for when you're back, I figured out that to get the dapr stop -f . to work you need to add background: true in the previous step so that it wont end the app running for you.

You can look in mine if need: https://github.com/dapr/quickstarts/pull/1144/files

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alicejgibbons Seems to work when i validate it :)

expected_stderr_lines:
output_match_mode: substring
match_order: none
background: false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
background: false
background: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try this locally and lmk

Copy link
Contributor

@marcduiker marcduiker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested small changes related to #1152

Constantin Chirila added 2 commits January 30, 2025 10:21
Signed-off-by: Constantin Chirila <[email protected]>
Copy link

@alicejgibbons alicejgibbons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, ready to merge after Elena's PR: #1148

@@ -0,0 +1,184 @@
# Dapr Jobs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Dapr Jobs
# Dapr Jobs API (JS HTTP)

appDirPath: ./job-service/
appPort: 6200
daprHTTPPort: 6280
schedulerHostAddress: localhost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
schedulerHostAddress: localhost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are in the process of removing this line from all the quickstarts Constantin.

Copy link
Member

@msfussell msfussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@msfussell msfussell merged commit ce7638a into dapr:release-1.15 Jan 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants