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

fix(app): fix infinitely hanging return to dashboard #16923

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

mjhuff
Copy link
Contributor

@mjhuff mjhuff commented Nov 20, 2024

Closes RABR-672

Overview

We gate the "return to dashboard" by a success close run response, but we probably should do this just onSettled.

Test Plan and Hands on Testing

  • Ran protocols on the ODD and clicked return to dashboard.

Review requests

  • does this seem reasonable?

Risk assessment

low

@mjhuff mjhuff requested review from sfoster1, smb2268 and a team November 20, 2024 22:18
@mjhuff mjhuff requested a review from a team as a code owner November 20, 2024 22:18
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Yeah it makes sense to me. I'd be a bit worried that we'd orphan runs though, do we know why the close failed?

@mjhuff
Copy link
Contributor Author

mjhuff commented Nov 20, 2024

Yeah it makes sense to me. I'd be a bit worried that we'd orphan runs though, do we know why the close failed?

No, I don't. I'll discuss with @SyntaxColoring and dig around a bit myself before merging!

EDIT: Ah...

@SyntaxColoring
Copy link
Contributor

SyntaxColoring commented Nov 20, 2024

Hm, so you're suggesting that the close request raced against something else that was also closing the run, and lost, so the button never "successfully closed the run," and that's what made the spinner spin infinitely?

If so, it kind of doesn't sound like we want to gate this on just a success response or just onSettled. Ideally, we'd want to gate it on <success 200 response> || <409 with RunNotCurrentError>?

@SyntaxColoring
Copy link
Contributor

SyntaxColoring commented Nov 20, 2024

Or the server should return a 2xx for that PATCH instead of a 409. Setting current: false on a run that's already current: false is just as much a successful no-op as it is a conflict.

@mjhuff
Copy link
Contributor Author

mjhuff commented Nov 20, 2024

Hm, so you're suggesting that the close request raced against something else that was also closing the run, and lost, so the button never "successfully closed the run," and that's what made the spinner spin infinitely?

Yeah, it seems quite likely that's the case since the desktop app implicitly closes a run in one circumstance.

If so, it kind of doesn't sound like we want to gate this on just a success response or just onSettled. Ideally, we'd want to gate it on <success 200 response> || <409 with RunNotCurrentError>?

I actually don't think we want to gate on error response, since any error blocks users from doing anything on the ODD.

Or the server should return a 2xx for that PATCH instead of a 409. Setting current: false on a run that's already current: false is just as much a successful no-op as it is a conflict.

I think that's reasonable. I still think we shouldn't block the client on error here, though.

@mjhuff mjhuff merged commit b980fd2 into chore_release-8.2.0 Nov 20, 2024
36 checks passed
@mjhuff mjhuff deleted the app_fix-no-dashboard-directing branch November 20, 2024 23:15
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.

3 participants