bitwarden / clients

Bitwarden client apps (web, browser extension, desktop, and cli).
https://bitwarden.com
Other
8.65k stars 1.14k forks source link

[PM-6394] remove policy evaluator cache #9807

Open audreyality opened 4 days ago

audreyality commented 4 days ago

๐ŸŽŸ๏ธ Tracking

https://bitwarden.atlassian.net/browse/PM-6394

๐Ÿ“” Objective

The cache causes a performance regression on the CLI, preventing bw generate from exiting immediately after generating a credential.

Background: Policy evaluator construction was cached in the DefaultGeneratorService to avoid repeated allocations when bridging between observeables and promises. Now that the generator UI holds open a subscription, this code is unnecessary.

๐Ÿฆฎ Reviewer guidelines

codecov[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 29.31%. Comparing base (1495b06) to head (297e77b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9807 +/- ## ========================================== - Coverage 29.32% 29.31% -0.01% ========================================== Files 2527 2527 Lines 73783 73775 -8 Branches 13778 13776 -2 ========================================== - Hits 21637 21629 -8 Misses 50524 50524 Partials 1622 1622 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 4 days ago

Logo Checkmarx One โ€“ Scan Summary & Details โ€“ 8bf9690f-a545-4ad0-bfbf-82eb82a53a97

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1268 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1222 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...

Fixed Issues

Severity Issue Source File / Package
MEDIUM Client_Privacy_Violation /apps/browser/src/background/runtime.background.ts: 327
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1256
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1210
audreyality commented 3 days ago

Latest commit ensures that there won't be a performance regression once #9812 merges.

audreyality commented 2 days ago

๐Ÿ“ Merged main to fix the macOS build errors.