[PM-25903] [PM-25590] BWDC doesn't sync new users unless cache is cleared - #879
[PM-25903] [PM-25590] BWDC doesn't sync new users unless cache is cleared#879sso-bitwarden wants to merge 887 commits into
Conversation
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…en#507) * Add user list under each group when doing test sync * run prettier and lint, replace '@' with &bitwarden#64;
* Include action to support Checkmarx and Sonar * Update .github/workflows/scan.yml Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com> * Update .github/workflows/scan.yml Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com> * Bump versions for outdated github actions --------- Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
* Configure Codecov coverage and results * Actually produce reports
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This was previously set to ~10.4, but there is no node version that satisifed the constraint of node ~18 and npm ~10.4. This change follows the approach in the main `clients` repository.
* Delete NotificationsService * Remove SyncService * Delete VaultTimeoutService * Remove ProviderService * Remove UserVerificationService * Remove SendService * Remove EventService * Remove PasswordRepromptService * Remove UsernameGenerationService * Remove TotpService * Remove CollectionService * Remove FolderService * Remove AuditService * Remove CipherService and SearchService together * Remove FileUploadService * Remove SettingsService * Remove SystemService * Remove ElectronCryptoService * Remove unused deps
* [deps]: Update prettier to v3.3.3 * Run prettier --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…n#785) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
fix LDAP membership
fix LDAP membership
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
|
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #879 +/- ##
=======================================
Coverage ? 13.15%
=======================================
Files ? 68
Lines ? 2805
Branches ? 483
=======================================
Hits ? 369
Misses ? 2409
Partials ? 27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thank you for your contribution! We've added this to our internal tracking system for review. Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process. |
|
@sso-bitwarden Can you fill out the Objective, including details of the problem and solution? Also, add any screenshots of test artifacts (if there are any) or anything else you feel is relevant. |
|
Thank you for reporting this issue! We've added this to our internal tracking system. |
eliykat
left a comment
There was a problem hiding this comment.
Following up on our Slack discussions. Please feel free to open a new PR if you find the solution, otherwise it'll be picked up by AC Team soon. For now I'll close this one.
| const lastHash = await this.stateService.getLastSyncHash(); | ||
|
|
||
| return lastHash == null || (hashResult.hash !== lastHash && hashResult.hashLegacy !== lastHash); | ||
| return lastHash == null || hashResult.hash !== lastHash; |
There was a problem hiding this comment.
As discussed, it doesn't seem like this will fix the issue: hashResult.hashLegacy !== lastHash will always evaluate to true (not false) because nobody should be using the legacy hash anymore; but that means it could never block a sync here.
🎟️ Tracking
📔 Objective
The purpose of the cache is not to make API call if there is no new changes to the directory data.
Bug: The directory connector never sync data after the first initial sync. This is because there is a condition the prevented that.
The fix: Remove that condition because the hashLegacy is never used anyway.
📸 Screenshots
⏰ Reminders before review
🦮 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