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

See if run changes will work #1194

Closed

Conversation

danieljbruce
Copy link
Contributor

Draft PR: Testing if changes to run will break integration tests

The fact that using a transaction object to do a commit results in a non-transaction should be documented so that if we decide to introduce a change later where this behaves differently then it is well documented.

# Conflicts:
#	test/transaction.ts
When begin transaction sends back an error, we want some tests to capture what the behavior is so that when we make changes to the run function then behavior is preserved.
A response should reach the user the right way. Add tests to make sure behavior is preserved.
In the run function delegate calls to runAsync and use run async to make promise calls
This allows this function to return a promise instead of a promise wrapped in a promise. This makes the tests pass and behave the way they should.
Do not call request from self
Comments should actually explain what is being done
The commit test for this PR should be removed because it is not really relevant for the async run functionality.
The types used should be very specific so that reading the code isn’t confusing.
Add a type to the resolve function just to introduce more clarity
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: datastore Issues related to the googleapis/nodejs-datastore API. labels Nov 1, 2023
Make the types more specific in the data client callback so that it is easier to track down the signature and match against the begin transaction function.
The parsing logic is going to be needed elsewhere so taking it apart now.
The interface name should be changed so that it matches what it is. It is the callback used to form a promise.
Change accessors to hide data completely instead of using the private modifier
Eliminate the early return as suggested in the PR
The comments capture the parameters and return type.
runAsync should be in promisfy excludes
Make sure it is explicit that we are parsing begin results.
Modify comment so that it doesn’t reference the way the code was before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the googleapis/nodejs-datastore API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant