Skip to content

Refactor: Use serde instead of TryFrom<Vec<u8>> traits in IPC #316

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

Merged

Conversation

coroiu
Copy link
Contributor

@coroiu coroiu commented Jun 18, 2025

🎟️ Tracking

📔 Objective

Refactoring the IPC to use serde instead. Putting this in a separate PR to make reviewing easier

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
    team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link
Contributor

github-actions bot commented Jun 18, 2025

Logo
Checkmarx One – Scan Summary & Detailse3d519f8-5981-4a81-a504-90e87f9b42d7

Great job, no security vulnerabilities found in this Pull Request

Copy link

codecov bot commented Jun 18, 2025

Codecov Report

Attention: Patch coverage is 91.22807% with 10 lines in your changes missing coverage. Please review.

Project coverage is 70.61%. Comparing base (4de8897) to head (eb5d363).
Report is 1 commits behind head on PM-18042-build-request-response-structure.

Files with missing lines Patch % Lines
crates/bitwarden-ipc/src/rpc/exec/handler.rs 33.33% 6 Missing ⚠️
crates/bitwarden-ipc/src/rpc/error.rs 0.00% 2 Missing ⚠️
crates/bitwarden-ipc/src/ipc_client.rs 97.82% 1 Missing ⚠️
crates/bitwarden-ipc/src/message.rs 83.33% 1 Missing ⚠️
Additional details and impacted files
@@                              Coverage Diff                              @@
##           PM-18042-build-request-response-structure     #316      +/-   ##
=============================================================================
- Coverage                                      72.01%   70.61%   -1.40%     
=============================================================================
  Files                                            231      222       -9     
  Lines                                          18796    17356    -1440     
=============================================================================
- Hits                                           13536    12256    -1280     
+ Misses                                          5260     5100     -160     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coroiu coroiu marked this pull request as ready for review June 23, 2025 09:03
@coroiu coroiu requested a review from a team as a code owner June 23, 2025 09:03
@coroiu coroiu requested a review from dani-garcia June 23, 2025 09:03
Copy link
Member

@dani-garcia dani-garcia left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me, erased serde seems to have improved the generic bounds of this a lot. I only have some small nits here and there.

I wonder why rust doesn't seem able to correctly guess the error types in all the .try_into().map_err() functions, that's annoying.

@@ -389,7 +375,7 @@ where
}
.try_into()
.map_err(
Copy link
Member

Choose a reason for hiding this comment

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

Same for this error:

                .map_err(|e: serde_utils::SerializeError| HandleError::Serialize(e.to_string()))?;

@coroiu coroiu requested a review from dani-garcia June 24, 2025 08:20
Copy link

@coroiu coroiu merged commit 64a8bd2 into PM-18042-build-request-response-structure Jun 24, 2025
42 checks passed
@coroiu coroiu deleted the coroiu/refactor-ipc-use-serde branch June 24, 2025 08:51
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.

2 participants