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

Update ldapjs to include fixes for syncing issues #210

Merged
merged 1 commit into from
Jan 27, 2022

Conversation

differsthecat
Copy link
Member

@differsthecat differsthecat commented Jan 19, 2022

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Fix issue where testing and syncing with an ldap connection would sometimes spin forever. This is due to an outdated version of the ldapjs package that has had many updates since it was last updated in this project(in 2019). This is one of the issues I was seeing locally: ldapjs/node-ldapjs#602

The version of ldapjs that was being used was a fork of the original package, and the fix implemented in the forked version has long been merged back to the original package: ldapjs/node-ldapjs#497

Asana Issue
Fix has been confirmed to fix issue locally by QA

Code changes

  • package.json & package-lock.json Update ldapjs to get several bug fixes for the search function used for to get users and groups.

Testing requirements

Test against various ldap services and make sure that syncing works as expected. This issue was noticed originally with Jumpcloud, but we should test others as well such as against a proper AD server. I did a smoke test of it locally and it worked fine but another set of eyes is always good.

Before you submit

  • I have checked for linting errors (npm run lint) (required)
  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

@differsthecat differsthecat changed the title Update ldapjs to include fix for EventEmitter issues Update ldapjs to include fixes for syncing issues Jan 19, 2022
@differsthecat differsthecat marked this pull request as ready for review January 20, 2022 03:43
@differsthecat differsthecat requested a review from a team January 20, 2022 03:43
@eliykat
Copy link
Member

eliykat commented Jan 20, 2022

I went through this exact process last year 😞

I'll try to find some of the internal tickets from the time, but from memory the customers experienced the same symptoms that caused us to fork the repo in the first place, even though the fix had been merged into the official repo for some time. The upgrade had passed QA and we couldn't figure out how to reproduce it, so it got shelved as the fork appeared to be working fine.

It might be time to try again, but we should consider what we can do to avoid history repeating before we merge.

@cscharf
Copy link
Contributor

cscharf commented Jan 20, 2022

It might be time to try again, but we should consider what we can do to avoid history repeating before we merge.

@differsthecat / @eliykat , perhaps we can re-engage those originally impacted customers, please work with @sevensixseven to see if we can get a preview test from the PR build to determine if it will work or break (if someone is willing).

@differsthecat
Copy link
Member Author

differsthecat commented Jan 20, 2022

@cscharf I'm a little concerned about giving a preview build from this PR to any clients at this point, it has a ton of changes such as the complete state service refactor and other tech debt items that I'm not sure have been regression tested yet. Also once they use this build, the state will be migrated so if it is broken, they won't be able to simply go back a version without having to re-enter their directory settings. I may be over worrying about that part though.

If we don't make this fix for the next release though, I'm worried that things will break regardless for a lot of people as both @Larry-Sussman and I saw syncing hang forever, sometimes for me but all of the time for him.

@differsthecat
Copy link
Member Author

@cscharf Do you think we can create a build/hotfix off of the last release with just this package update? Then we don't have all of the other stuff that needs to be tested in play, just the package update

@cscharf
Copy link
Contributor

cscharf commented Jan 20, 2022

Yes, we could do that. You should be able to just create another branch from the latest release tag and then merge this fix in... we can work with @bitwarden/dept-devops on getting a trial build of that done.

@differsthecat
Copy link
Member Author

I have created the branch update-ldapjs-2.9.8 off of our last release and did some testing locally both against jumpcloud and AD, with and without filters (which is what appears to have broken clients in the past) and everything is working as expected. I'll rope in DevOps and see if we can get a build of it.

@differsthecat
Copy link
Member Author

Holding off on merging this to see if we get any feedback from clients who saw errors when we updated this library last year

@addisonbeck
Copy link
Contributor

Would we want to merge this before Friday when we cut rc branches?

@patrick-bitwarden
Copy link
Member

@eliykat Robyn said she was planning on putting you in charge of merging this if everything looked good, since she's out this week. Did that conversation happen and, if so, does everything look good?

@eliykat
Copy link
Member

eliykat commented Jan 26, 2022

As discussed with @patrick-bitwarden, we're waiting on feedback from customers who had trouble with this dependency upgrade last time. If we don't hear anything then I think we have to merge it anyway though, it sounds like it's definitely broken at the moment without the upgrade, compared to the risk of some issues later with the upgrade. And get QA to give it a real good going over.

@addisonbeck addisonbeck merged commit bb4be60 into master Jan 27, 2022
@addisonbeck addisonbeck deleted the bug/ldap-search-hangs branch January 27, 2022 19:15
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.

5 participants