-
Notifications
You must be signed in to change notification settings - Fork 1
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
FP-2988: Can't create Callback from node subscriber port "+" button #372
base: dev
Are you sure you want to change the base?
FP-2988: Can't create Callback from node subscriber port "+" button #372
Conversation
quirinpa
commented
Nov 12, 2024
•
edited by jira
bot
Loading
edited by jira
bot
- FP-2988: Can't create Callback from node subscriber port "+" button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the solution is quite like what you've done, but I'm afraid this way it might cause a racing condition. Having 2 promises running side by side and the last one is dependent on the first. I would suggest using async
await
here, this way we know that the promises are called when they are supposed.
I would agree with that, Manuel. Are we ensuring that the promise only resolves if the action is completed? |
Didn't understand what you meant here. |
I meant if it was an asynchronous action, I was asking if we were ensuring that it'd only resolve on completion. But I looked into it and saw that it wasn't an asynchronous call. So I think your comment does not apply. |
call returns a promise. So, yes it's an asynchronous call. Which means that in some weird case CREATE can finish after the SAVE, which will cause errors. This can be simply fixed by adding async await here
|
Even though call returns a promise (in some instances, at least), which it has to to ensure that remix plugin method calling mechanism supports async methods and promises, it doesn't necessarily mean that we have to use an await there. The code of the function is synchronous. The call implementation most probably calls the function synchronously and returns its result, which might be a promise, or not. Not having await there doesn't break anything. And adding it might. I don't have indefinite time for tasks, so please, consider spending less time holding my tasks. I don't pay you with the same coin and would appreciate that you stopped doing that. |
Quality Gate passedIssues Measures |
Did you test both options to see if any would bring regressions? |
What issues could adding an await there, that would in fact make sure that we only run the next code after we get the promise, can happen? What am I overlooking? |