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 inconsistency when concurrently starting a session and session.start() rejects #5628

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

seeM
Copy link
Contributor

@seeM seeM commented Dec 5, 2024

Related to #2671.

I didn't encounter this in practice but noticed the inconsistency while working with the code.

I assume it is intended for the outer call to not reject when session.start() rejects, so concurrent calls probably also shouldn't reject.

@seeM seeM requested a review from jmcphers December 5, 2024 13:56
Copy link
Collaborator

@jmcphers jmcphers left a comment

Choose a reason for hiding this comment

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

Instead of swallowing an error here, I think this inconsistency should be addressed by returning the startPromise.p (so the behavior of start() becomes like the behavior of concurrent start() rather than the other way around)

@seeM seeM force-pushed the fix-inconsistency-when-session-start-rejects branch from 444cabe to 7babed8 Compare December 9, 2024 12:27
@seeM
Copy link
Contributor Author

seeM commented Dec 9, 2024

@jmcphers I've made the change. Running the full test suite just in case throwing the error causes any unexpected issues: https://github.com/posit-dev/positron/actions/runs/12235628385 (EDIT: It passed)

@seeM seeM requested a review from jmcphers December 9, 2024 19:31
Copy link
Collaborator

@jmcphers jmcphers left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this improvement!

@seeM seeM merged commit 9e85741 into main Dec 11, 2024
10 checks passed
@seeM seeM deleted the fix-inconsistency-when-session-start-rejects branch December 11, 2024 13:30
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants