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

HTTP WFID test/fixes #676

Merged
merged 5 commits into from
Dec 12, 2024
Merged

HTTP WFID test/fixes #676

merged 5 commits into from
Dec 12, 2024

Conversation

chuck-dbos
Copy link
Collaborator

Way to launch HTTP in unit tests
More unit tests (outside of template)
Fix for WFID in HTTP header
Clarify withNextWorkflowID use of ID.

@chuck-dbos chuck-dbos requested review from kraftp and qianl15 December 12, 2024 17:11
@@ -224,12 +225,27 @@ export class DBOS {
return DBOSExecutor.globalInstance as DBOSExecutorContext;
}

static async launchAppHTTPServer() {
Copy link
Member

Choose a reason for hiding this comment

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

Do users need to manually invoke this in their app, or is it just for testing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the current solution for testing purposes.
The HTTP server had been held by testingRuntime, which is not in use.
launch() had been making it under certain conditions; @maxdml changed those. We may clean up a bit after the dust settles there.

@qianl15
Copy link
Member

qianl15 commented Dec 12, 2024

I don't see any changes regarding withNextWorkflowID -- can you point me to it, and is there a new test for this?

@chuck-dbos
Copy link
Collaborator Author

I don't see any changes regarding withNextWorkflowID -- can you point me to it, and is there a new test for this?

Search for getNextWFID, which takes the cleanup place of dbos.ts old line 716. We could set a flag / have it throw an error if the user does two, but I didn't see a precedent for that in Python, which has a similar construct.

@chuck-dbos chuck-dbos merged commit ff28585 into main Dec 12, 2024
5 checks passed
@chuck-dbos chuck-dbos deleted the chuck/http_wfid branch December 12, 2024 19:12
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.

3 participants