-
Notifications
You must be signed in to change notification settings - Fork 10
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
Error message after saving branch [racing condition problem] #157
Comments
It's an interesting problem. A couple of options come to mind.
|
Wait, so, why is the frontend even making those requests? I don't think it's an ID generation issue, because the backend generates the ID before putting the event on the stream, and it will return that ID to the frontend synchronously. From @pameck's screenshot, it seems the frontend is trying to fetch the new branch's groups and members, which is probably unnecessary. I think it's safe to assume that a brand new branch doesn't have any groups or members yet, so those fields can just be initialised to empty arrays, rather than fetching empty arrays from the backend. So proposed solution: just don't make those requests 😁 |
I havent looked too deep, but I think the issue is that the app selects the newly created branch which triggers a new API call for the branch details. So that would mean either not selecting, or creating some new flow. |
I think that on top of the change in the UI, the API should return an empty array instead of a |
But also you're right; ignore what I said about IDs. I had a blip and forgot that the create request returns one. |
Even if the branch can't be found? |
@yearofthedan right! It's the branch that's missing not the groups or members, back to the |
Error Description:
After a branch is created, the following message is displayed:
In the dev console, there is this:
To replicate:
Possible cause:
When a new branch is created, there are two subsequent requests:
GET /branches/{id}/groups
GET /branches/{id}/members
The problem is that we're adding the new branch to the core's store after it has gone through the event pipe, lambdas and back to core, but the requests from the UI get to the core before the new branch is added to the store which is why those two requests get a
404
error.The following diagram is for reference about the branch creation flow:
The text was updated successfully, but these errors were encountered: