From 66aa05c23c7700f19c18a6327e521db6c26405fa Mon Sep 17 00:00:00 2001 From: Jen Evans Date: Wed, 23 Feb 2022 10:49:29 -0800 Subject: [PATCH 1/3] Fix pagePause true bug Signed-off-by: Jen Evans --- .changeset/spicy-lies-grin.md | 5 +++++ plugins/catalog-backend-module-ldap/src/ldap/client.ts | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 .changeset/spicy-lies-grin.md diff --git a/.changeset/spicy-lies-grin.md b/.changeset/spicy-lies-grin.md new file mode 100644 index 0000000000..f984c1a4ef --- /dev/null +++ b/.changeset/spicy-lies-grin.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-ldap': patch +--- + +Fixed bug in Catalog LDAP module to ack page events to continue receiving entries if pagePause=true diff --git a/plugins/catalog-backend-module-ldap/src/ldap/client.ts b/plugins/catalog-backend-module-ldap/src/ldap/client.ts index 91fbd87c39..708d53b7f7 100644 --- a/plugins/catalog-backend-module-ldap/src/ldap/client.ts +++ b/plugins/catalog-backend-module-ldap/src/ldap/client.ts @@ -106,6 +106,12 @@ export class LdapClient { reject(new Error(errorString(e))); }); + res.on('page', (result, cb) => { + if (cb) { + cb(); + } + }); + res.on('end', r => { if (!r) { reject(new Error('Null response')); From fca67af35643fa2ffa6463b954cad55d59d04a25 Mon Sep 17 00:00:00 2001 From: Jen Evans Date: Thu, 24 Feb 2022 13:34:47 -0800 Subject: [PATCH 2/3] Mark first parameter as unused Signed-off-by: Jen Evans --- plugins/catalog-backend-module-ldap/src/ldap/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/catalog-backend-module-ldap/src/ldap/client.ts b/plugins/catalog-backend-module-ldap/src/ldap/client.ts index 708d53b7f7..414d043d3d 100644 --- a/plugins/catalog-backend-module-ldap/src/ldap/client.ts +++ b/plugins/catalog-backend-module-ldap/src/ldap/client.ts @@ -106,7 +106,7 @@ export class LdapClient { reject(new Error(errorString(e))); }); - res.on('page', (result, cb) => { + res.on('page', (_result, cb) => { if (cb) { cb(); } From 52acdac58e75e4b9983a96fa0e9ea2e0cbfac654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 25 Feb 2022 11:55:30 +0100 Subject: [PATCH 3/3] expand the word acknowledge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/spicy-lies-grin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/spicy-lies-grin.md b/.changeset/spicy-lies-grin.md index f984c1a4ef..b7e020f1db 100644 --- a/.changeset/spicy-lies-grin.md +++ b/.changeset/spicy-lies-grin.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog-backend-module-ldap': patch --- -Fixed bug in Catalog LDAP module to ack page events to continue receiving entries if pagePause=true +Fixed bug in Catalog LDAP module to acknowledge page events to continue receiving entries if pagePause=true