-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
feat: Enable cross-trigger transactions via shared context #9794
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
base: alpha
Are you sure you want to change the base?
Changes from all commits
83ab9f7
c23c364
f6ada16
098d6cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # This configuration file was automatically generated by Gitpod. | ||
| # Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) | ||
| # and commit this file to your remote git repository to share the goodness with others. | ||
|
|
||
| # Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart | ||
|
|
||
| tasks: | ||
| - init: npm install && npm run build | ||
| command: npm run start | ||
|
|
||
|
|
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -97,6 +97,10 @@ function RestWrite(config, auth, className, query, data, originalData, clientSDK | |||||||||||||||||||||||||
| // Returns a promise for a {response, status, location} object. | ||||||||||||||||||||||||||
| // status and location are optional. | ||||||||||||||||||||||||||
| RestWrite.prototype.execute = function () { | ||||||||||||||||||||||||||
| if (this.context.transaction) { | ||||||||||||||||||||||||||
| this.config.database.setTransactionalSession(this.context.transaction) | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| return Promise.resolve() | ||||||||||||||||||||||||||
| .then(() => { | ||||||||||||||||||||||||||
| return this.getUserAndRoleACL(); | ||||||||||||||||||||||||||
|
|
@@ -167,7 +171,12 @@ RestWrite.prototype.execute = function () { | |||||||||||||||||||||||||
| throw new Parse.Error(Parse.Error.EMAIL_NOT_FOUND, 'User email is not verified.'); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| return this.response; | ||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||
| }).finally(() => { | ||||||||||||||||||||||||||
| if (this.context.transaction) { | ||||||||||||||||||||||||||
| // Ensure isolation even on uncaught errors | ||||||||||||||||||||||||||
| this.config.database.setTransactionalSession(null); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| });; | ||||||||||||||||||||||||||
|
Comment on lines
+174
to
+179
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Double semicolon produces an empty statement; remove the extra Line 179 has Proposed fix- }).finally(() => {
- if (this.context.transaction) {
- // Ensure isolation even on uncaught errors
- this.config.database.setTransactionalSession(null);
- }
- });;
+ }).finally(() => {
+ if (this.context.transaction) {
+ // Ensure isolation even on uncaught errors
+ this.config.database.setTransactionalSession(null);
+ }
+ });📝 Committable suggestion
Suggested change
🧰 Tools🪛 Biome (2.3.13)[error] 179-179: This code will never be reached ... ... because this statement will return from the function beforehand (lint/correctness/noUnreachable) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| // Uses the Auth object to get the list of roles, adds the user id | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.