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(misc): return error via oneshot to prevent panicking #1449

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

dariusc93
Copy link
Contributor

What this PR does πŸ“–

  • Prevent a panic due to oneshot sender being dropped on error

Which issue(s) this PR fixes πŸ”¨

  • N/A

Special notes for reviewers πŸ—’οΈ

Additional comments 🎀

@dariusc93 dariusc93 self-assigned this Nov 3, 2023
Copy link

coderabbitai bot commented Nov 3, 2023

Walkthrough

Walkthrough

The modification in the codebase primarily focuses on enhancing error handling during the initialization of warp in the handle_login function. The change ensures that an error response is dispatched via the rsp channel if the warp initialization fails, thereby improving the robustness of the system.

Changes

File Path Summary
common/src/warp_runner/mod.rs Added a line of code in the handle_login function to send an error response (Err(e)) through the rsp channel if the initialization of warp fails.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai help to get help.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.json

@github-actions github-actions bot added Don't merge yet DO NOT MERGE Missing dev review Still needs to be reviewed by a dev labels Nov 3, 2023
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 2e6b28a and ce6eda4.
Files selected for processing (1)
  • common/src/warp_runner/mod.rs (1 hunks)
Additional comments: 1
common/src/warp_runner/mod.rs (1)
  • 174-179: The error handling here is good. It logs the error, sends the error back to the caller, and then returns from the function. This is a good practice as it allows the caller to decide what to do with the error.

@github-actions github-actions bot added the Failed Automated Test This PR is failing Luis's Appium test and needs revised label Nov 3, 2023
Copy link
Contributor

github-actions bot commented Nov 3, 2023

UI Automated Test Results Summary for MacOS/Windows

476 tests   266 βœ”οΈβ€ƒβ€ƒ1h 15m 57s ⏱️
βŸβ€„41 suites  210 πŸ’€
βŸβ€„βŸβ€„3 filesβ€„β€‚β€ƒβ€ƒβŸβ€„βŸβ€„0 ❌

Results for commit 80b0a14.

Copy link
Contributor

github-actions bot commented Nov 3, 2023

UI Automated Tests execution is complete! You can find the test results report here

@github-actions github-actions bot removed the Failed Automated Test This PR is failing Luis's Appium test and needs revised label Nov 3, 2023
@dariusc93 dariusc93 added Ready to Merge This PR is ready to merge QA Override Does not need QA Approval or does not requires testing (for code that doesnt affect functionality) and removed Missing dev review Still needs to be reviewed by a dev labels Nov 3, 2023
@dariusc93 dariusc93 merged commit c72f0d3 into dev Nov 3, 2023
11 checks passed
@dariusc93 dariusc93 deleted the fix/return-error-via-channel branch November 3, 2023 21:19
@github-actions github-actions bot removed Don't merge yet DO NOT MERGE Ready to Merge This PR is ready to merge QA Override Does not need QA Approval or does not requires testing (for code that doesnt affect functionality) labels Nov 3, 2023
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.

4 participants