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

Removes "default" options from the invocation #125

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

avillega
Copy link
Contributor

Default options in the invocation were in reality
the registered options from the top level function call. This commit changes the code to express that more clearly and removes the split functions that were a source of confusion.

Default options in the invocation were in reality
the registered options from the top level function call.
This commit changes the code to express that more clearly and
removes the split functions that were a source of confusion.
@avillega avillega requested review from dtornow and dfarr June 21, 2024 00:08
@avillega
Copy link
Contributor Author

In this change I also included a few smaller changes that I think make the code a bit more clear like naming the storedPromise explicitly instead of nesting its creation in the DurablePromise.create

@@ -210,22 +210,36 @@ export class Context {
// the id is either:
// 1. a provided string in the case of a deferred execution
// 2. a generated string in the case of an ordinary execution
const id = typeof func === "string" ? func : `${parent.id}.${parent.counter}`;
const id = typeof func === "string" ? func : `${parent.id}.${parent.counter}.${func.name}`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is probably the controvertial change in this PR. I added the name of the function to the id. My idea is to have more insight into the distributed call graph, once we get to observability.

Copy link
Member

Choose a reason for hiding this comment

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

Looks good! I like that it's informational only, we don't rely on the name of the function to ensure uniqueness

@avillega avillega merged commit 7bf23ef into main Jun 24, 2024
2 checks passed
@avillega avillega deleted the avillega/remove-defaults-from-invok branch June 24, 2024 18:43
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.

None yet

2 participants