From d577f944ec5e03861a4c98825d826f7f4d33c733 Mon Sep 17 00:00:00 2001 From: Bence Gadanyi Date: Mon, 30 Mar 2026 14:03:58 +0000 Subject: [PATCH 1/5] feat: change the copy text of the bot document updating notifcation --- packages/cdk/resources/Functions.ts | 3 +- .../syncKnowledgeBaseFunction/app/handler.py | 43 +++++++------- .../tests/test_app.py | 24 ++++---- poetry.lock | 56 ++++++++++++++++++- pyproject.toml | 1 + 5 files changed, 93 insertions(+), 34 deletions(-) diff --git a/packages/cdk/resources/Functions.ts b/packages/cdk/resources/Functions.ts index 754457bf..ed0e559a 100644 --- a/packages/cdk/resources/Functions.ts +++ b/packages/cdk/resources/Functions.ts @@ -130,7 +130,8 @@ export class Functions extends Construct { environmentVariables: { "KNOWLEDGEBASE_ID": props.knowledgeBaseId, "SLACK_BOT_TOKEN_PARAMETER": props.slackBotTokenParameter.parameterName, - "SLACK_BOT_ACTIVE": `${!props.isPullRequest}`, + // TODO: Revert to `${!props.isPullRequest}` before merging - temporarily enabled for PR testing + "SLACK_BOT_ACTIVE": "true", "DATA_SOURCE_ID": props.dataSourceId, "KNOWLEDGE_SYNC_STATE_TABLE": props.knowledgeSyncStateTable.tableName }, diff --git a/packages/syncKnowledgeBaseFunction/app/handler.py b/packages/syncKnowledgeBaseFunction/app/handler.py index a9bee713..ccff58de 100644 --- a/packages/syncKnowledgeBaseFunction/app/handler.py +++ b/packages/syncKnowledgeBaseFunction/app/handler.py @@ -361,7 +361,9 @@ def initialise_slack(self): logger.warning("SKIPPING - Bot is not in any channels. No messages sent.") return [] - message_default_text = "I am currently syncing changes to my knowledge base.\n This may take a few minutes." + message_default_text = ( + "The documents I use to answer your questions are being updated. " "This will be completed in 10 minutes." + ) # Build blocks for Slack message blocks = [ @@ -375,7 +377,7 @@ def initialise_slack(self): { "type": "plan", "plan_id": uuid.uuid4().hex, - "title": "Processing File Changes...", + "title": "These are the documents that have been added:", "tasks": [ self.create_task( id=self.fetching_block_id, @@ -386,17 +388,13 @@ def initialise_slack(self): ), self.create_task( id=self.update_block_id, - title="Processing File Changes", + title="Processing documents", details=[], outputs=["Initialising"], status="in_progress", ), ], }, - { - "type": "context", - "elements": [{"type": "plain_text", "text": "Please wait up-to 10 minutes for changes to take effect"}], - }, ] return blocks @@ -477,6 +475,7 @@ def __init__(self): self.created = 0 self.modified = 0 self.deleted = 0 + self.document_names = [] @staticmethod def is_supported_file_type(file_key): @@ -513,27 +512,27 @@ def process_multiple_s3_events(self, records: list, slack_handler: SlackHandler) self.modified += len([r for r in records if "ObjectModified" in r.get("eventName", "")]) self.deleted += len([r for r in records if "ObjectRemoved" in r.get("eventName", "")]) - total = self.created + self.modified + self.deleted + # Extract document names from records + for r in records: + object_key = r.get("s3", {}).get("object", {}).get("key", "") + if object_key: + file_name = object_key.split("/")[-1] + if file_name and file_name not in self.document_names: + self.document_names.append(file_name) - counts = [ - ("created", self.created), - ("modified", self.modified), - ("deleted", self.deleted), - ] - - # Generate the list only for non-zero values - message_list = [f"{count} files {action}" for action, count in counts if count > 0] - - if message_list and len(message_list) > 0: + if self.document_names: slack_handler.update_task( id=slack_handler.update_block_id, message="Update pending", output_message="Processing...", replace=True ) - for i, message in enumerate(message_list): - output_message = f"Processed a total of {total} record(s)" if (i + 1 == len(message_list)) else None + for i, name in enumerate(self.document_names): + total = self.created + self.modified + self.deleted + output_message = ( + f"Processed a total of {total} record(s)" if (i + 1 == len(self.document_names)) else None + ) slack_handler.update_task( - id=slack_handler.update_block_id, message=message, output_message=output_message, replace=(i == 0) + id=slack_handler.update_block_id, message=name, output_message=output_message, replace=(i == 0) ) - slack_handler.update_task_db(created=self.created, modified=self.modified, deleted=self.deleted) + slack_handler.update_task_db(created=self.created, modified=self.modified, deleted=self.deleted) @staticmethod def start_ingestion_job(): diff --git a/packages/syncKnowledgeBaseFunction/tests/test_app.py b/packages/syncKnowledgeBaseFunction/tests/test_app.py index a8063a70..f76c9133 100644 --- a/packages/syncKnowledgeBaseFunction/tests/test_app.py +++ b/packages/syncKnowledgeBaseFunction/tests/test_app.py @@ -923,9 +923,9 @@ def mock_post_message_side_effect(**kwargs): calls = mock_slack_client.chat_update.call_args_list assert len(calls) > 0, "Expected chat_update to be called." - # Verify the formatted message made its way into the blocks sent to chat_update + # Verify the document names made their way into the blocks sent to chat_update last_call_blocks_str = str(calls[-1].kwargs.get("blocks", [])) - assert "2 files created" in last_call_blocks_str + assert "test-file.pdf" in last_call_blocks_str @patch("slack_sdk.WebClient") @@ -1012,11 +1012,13 @@ def mock_post_message_side_effect(**kwargs): calls = mock_slack_client.chat_update.call_args_list assert len(calls) > 0, "Expected chat_update to be called." - # Verify the formatted message made its way into the blocks sent to chat_update + # Verify the document names made their way into the blocks sent to chat_update last_call_blocks_str = str(calls[-1].kwargs.get("blocks", [])) - assert "4 files created" in last_call_blocks_str # +1 in initial call - assert "3 files modified" in last_call_blocks_str - assert "6 files deleted" in last_call_blocks_str + assert "test-file.pdf" in last_call_blocks_str + assert "file1.pdf" in last_call_blocks_str + assert "file4.pdf" in last_call_blocks_str + assert "file2.pdf" in last_call_blocks_str + assert "file3.pdf" in last_call_blocks_str @patch("slack_sdk.WebClient") @@ -1106,11 +1108,13 @@ def mock_post_message_side_effect(**kwargs): calls = mock_slack_client.chat_update.call_args_list assert len(calls) > 0, "Expected chat_update to be called." - # Verify the formatted message made its way into the blocks sent to chat_update + # Verify the document names made their way into the blocks sent to chat_update last_call_blocks_str = str(calls[-1].kwargs.get("blocks", [])) - assert "6 files created" in last_call_blocks_str # +1 initial call - assert "5 files modified" in last_call_blocks_str - assert "10 files deleted" in last_call_blocks_str + assert "test-file.pdf" in last_call_blocks_str + assert "file1.pdf" in last_call_blocks_str + assert "file4.pdf" in last_call_blocks_str + assert "file2.pdf" in last_call_blocks_str + assert "file3.pdf" in last_call_blocks_str @patch("boto3.client") diff --git a/poetry.lock b/poetry.lock index ed1012bf..d2c5c23a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -151,6 +151,59 @@ typing_extensions = ">=4.4" [package.extras] dev = ["black (==24.3.0)", "boto3 (>=1.34.0,<2.0.0)", "boto3-stubs[appconfig,serverlessrepo] (>=1.34.0,<2.0.0)", "coverage (>=5.3,<8)", "dateparser (>=1.1,<2.0)", "mypy (>=1.10.1,<1.11.0)", "parameterized (>=0.7,<1.0)", "pytest (>=6.2,<8)", "pytest-cov (>=2.10,<5)", "pytest-env (>=0.6,<1)", "pytest-rerunfailures (>=9.1,<12)", "pytest-xdist (>=2.5,<4)", "pyyaml (>=6.0,<7.0)", "requests (>=2.28,<3.0)", "ruamel.yaml (==0.17.21)", "ruff (>=0.4.5,<0.5.0)", "tenacity (>=9.0,<10.0)", "types-PyYAML (>=6.0,<7.0)", "types-jsonschema (>=3.2,<4.0)", "types-requests (>=2.28,<3.0)"] +[[package]] +name = "awscrt" +version = "0.31.2" +description = "A common runtime for AWS Python projects" +optional = false +python-versions = ">=3.8" +groups = ["preprocessingfunction"] +files = [ + {file = "awscrt-0.31.2-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:f0c179c930ad8e4648bca9e310ab05fc1f6d41b334d5c2b124019822ce05f4ed"}, + {file = "awscrt-0.31.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:28e5ec2fcc4e57e93f5b50dc748c0d2db449871102e390bbeb9e3ccc2c9ced07"}, + {file = "awscrt-0.31.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:18adbcfc8a92468988ff9fef8f78ec21b1a3b3e705adb7964bae85c61e59d8bb"}, + {file = "awscrt-0.31.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:333fd850a0352ab53468412663b67350cfacaaabc5006ede696ac69a3e822572"}, + {file = "awscrt-0.31.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b80b7970c6894b7ae4dddbf2870323e5b81a123027205a2a1597fa72d00a2df2"}, + {file = "awscrt-0.31.2-cp310-cp310-win32.whl", hash = "sha256:b3f4132550e51098a5a772313dfea38818adf909f314141cfe9ab3319fb0b0f0"}, + {file = "awscrt-0.31.2-cp310-cp310-win_amd64.whl", hash = "sha256:e13d3b3517f08ddefde3af6c4ecafe561676ec491e799a5fbda66d951613ee8e"}, + {file = "awscrt-0.31.2-cp311-abi3-macosx_10_15_universal2.whl", hash = "sha256:49c003d7fe40002dc4e26500f6cc63c61b399d44b4e38e66b5065845d296d230"}, + {file = "awscrt-0.31.2-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ac9d662de99c2f1393011cde357d0c8730aef9df4eedf258505bdf6ff20a3c01"}, + {file = "awscrt-0.31.2-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8387e72f856b7a92f7d08ff9a1dfa6960d6e9ed39509c63c5905e240071af23e"}, + {file = "awscrt-0.31.2-cp311-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:43b3f774afd5dc2471d38490a16ed3e789814f120b9552c76920cb2fb812376f"}, + {file = "awscrt-0.31.2-cp311-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:10d5541726b87246fbfeb4c70036373b7aba8b40f489e5ae886eabc09a68ef38"}, + {file = "awscrt-0.31.2-cp311-abi3-win32.whl", hash = "sha256:14e28cabf7857cfe6d82548821410c688e772a819dbf15d167359d7bc54cdb8d"}, + {file = "awscrt-0.31.2-cp311-abi3-win_amd64.whl", hash = "sha256:ebd98aaaf348334f72d3a38aed18c29b808fe978c295e7c6bc2e21deac5126c8"}, + {file = "awscrt-0.31.2-cp313-abi3-macosx_10_15_universal2.whl", hash = "sha256:3eb623d0abfbbe5e6666b9c39780737b472766b0e01168296b048a27ef9d13e8"}, + {file = "awscrt-0.31.2-cp313-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:03de99bd3077e1b3bbcd1eca9d06a735fdb8fd47b2af8b1d464d43ede00f125a"}, + {file = "awscrt-0.31.2-cp313-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1a4adc5ff6eae8a46f5bca4ed70ad68d36f1e272e2fcd60afeef71b4d02afe06"}, + {file = "awscrt-0.31.2-cp313-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:83d45c3ee9e1fe10c2d316b93402157199edb5d20b1584facf24f82981b55190"}, + {file = "awscrt-0.31.2-cp313-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:a1d1f3e07cdd926bbc9a3715826e5794217780e7a326c329bdbf453533d2141a"}, + {file = "awscrt-0.31.2-cp313-abi3-win32.whl", hash = "sha256:cf02b5db1181811f5e7c70e772986ef4a6577f722a6b3222842ae377df41d261"}, + {file = "awscrt-0.31.2-cp313-abi3-win_amd64.whl", hash = "sha256:4b459be11d9aba47d3cb37e10e97702eed2a2858aa381e2586f7f73d15d85bdf"}, + {file = "awscrt-0.31.2-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:046a514bd37dda049fdf3f76a1bbdef90f9344353080cfa5321dcb5007751455"}, + {file = "awscrt-0.31.2-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fed3f3686fbe796ea77a2aa3d12f4699aba5f2013acd3628d3065305146892d8"}, + {file = "awscrt-0.31.2-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:65c07cb76907beab233f00f1b840b5d1605abb28c21e2132c10ac8ef9dc7eb83"}, + {file = "awscrt-0.31.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:082c165dc61ef57dcafc8bf31fcc61d5daa6b7a15e36eada9af576ddc5293b49"}, + {file = "awscrt-0.31.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6b7bde2e6ec049777219513e97aae10d03b6c69654e174ab8e927ccc84387245"}, + {file = "awscrt-0.31.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:bf568eb0abc09bec507f7b37bd0017618d501b90518bd015d45b0f656face7dd"}, + {file = "awscrt-0.31.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b8eee6237b8290ead0dae7927b619973f094b1861a3d67c8144c314dc6dcc206"}, + {file = "awscrt-0.31.2-cp38-cp38-win32.whl", hash = "sha256:9aa7e780d08fd8e36010ada44489791d9ef0c15cfd838edf3fd2c23ebb2e1e0c"}, + {file = "awscrt-0.31.2-cp38-cp38-win_amd64.whl", hash = "sha256:5b8c9327ce4ea1d5091d119b03bd2c1c91b0547f3ad223cdd118edea1c525b0f"}, + {file = "awscrt-0.31.2-cp39-cp39-macosx_10_15_universal2.whl", hash = "sha256:5146741645c41dbba47a916d41ab4ced5d953853434e610a719da8c138fa642c"}, + {file = "awscrt-0.31.2-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:a5c36a1ba38492f983fd60bd81d5e604d1f74668ff4808a7c5ad34be17f0cc79"}, + {file = "awscrt-0.31.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:566e646ea06a67f223cb699f050fbf851dd7f342f249caf86f2e07c0729c2a27"}, + {file = "awscrt-0.31.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:dafbef04f4de7e255e2d6be4b5d243af7fe79b7c5e3c94d7b85c176979a9006b"}, + {file = "awscrt-0.31.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:1e042fcc0bb19114ab52a7e5d0f5adc595f8a470738e79a7e4d984a08e2d027d"}, + {file = "awscrt-0.31.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:52a88455e1db3045212d5ff05d42f78ec993f49ea35f9666ab244675202156ed"}, + {file = "awscrt-0.31.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cfcabf6410aa2076eadba310ff3d49c4690623a14c51d217fcdb48be853a76e2"}, + {file = "awscrt-0.31.2-cp39-cp39-win32.whl", hash = "sha256:90a3b579631ada24fc348dc88c86d341d0d286ffdd3a81ef20e53b2afcb49d4e"}, + {file = "awscrt-0.31.2-cp39-cp39-win_amd64.whl", hash = "sha256:783f988446b4788a87e058219a7119fb8654ce56937f3ece3d58f0dde6bca6ca"}, + {file = "awscrt-0.31.2.tar.gz", hash = "sha256:552555de1beff02d72a1f6d384cd49c5a7c283418310eae29d21bcb749c65792"}, +] + +[package.extras] +dev = ["autopep8 (>=2.3.1)", "build (>=1.2.2)", "h2 (==4.1.0)", "sphinx (>=7.2.6,<7.3) ; python_version >= \"3.9\"", "websockets (>=13.1)"] + [[package]] name = "azure-ai-documentintelligence" version = "1.0.2" @@ -759,6 +812,7 @@ files = [ ] [package.dependencies] +awscrt = {version = "0.31.2", optional = true, markers = "extra == \"crt\""} jmespath = ">=0.7.1,<2.0.0" python-dateutil = ">=2.1,<3.0.0" urllib3 = {version = ">=1.25.4,<2.2.0 || >2.2.0,<3", markers = "python_version >= \"3.10\""} @@ -3968,4 +4022,4 @@ requests = "*" [metadata] lock-version = "2.1" python-versions = "^3.14" -content-hash = "e46904d90f64903439c5084c53caa88a23e8e06b4eec99960c45194507ed4a4a" +content-hash = "9cc363a56596feb62d6a0b5e424506a722988668995064eda83f5cd45c51a7bc" diff --git a/pyproject.toml b/pyproject.toml index 5df4df66..b679edb4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,6 +58,7 @@ aws-lambda-powertools = "^3.26.0" [tool.poetry.group.preprocessingFunction.dependencies] boto3 = "^1.42.73" +botocore = {extras = ["crt"], version = "^1.42.73"} aws-lambda-powertools = "^3.26.0" markitdown = {extras = ["pdf", "docx", "xlsx"], version = "^0.0.1a12"} From 4019e0d1a167b1b6ff86c5e01e7fed728e82e8eb Mon Sep 17 00:00:00 2001 From: Bence Gadanyi Date: Mon, 30 Mar 2026 14:32:08 +0000 Subject: [PATCH 2/5] chore: cater for url-encoding --- packages/syncKnowledgeBaseFunction/app/handler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/syncKnowledgeBaseFunction/app/handler.py b/packages/syncKnowledgeBaseFunction/app/handler.py index ccff58de..c255d1f8 100644 --- a/packages/syncKnowledgeBaseFunction/app/handler.py +++ b/packages/syncKnowledgeBaseFunction/app/handler.py @@ -10,6 +10,7 @@ import time import traceback import uuid +from urllib.parse import unquote_plus import boto3 from typing import Literal from app.config.config import ( @@ -516,7 +517,8 @@ def process_multiple_s3_events(self, records: list, slack_handler: SlackHandler) for r in records: object_key = r.get("s3", {}).get("object", {}).get("key", "") if object_key: - file_name = object_key.split("/")[-1] + decoded_key = unquote_plus(object_key) + file_name = decoded_key.split("/")[-1] if file_name and file_name not in self.document_names: self.document_names.append(file_name) From 33f235f410c29e43c2db374458309055f174b388 Mon Sep 17 00:00:00 2001 From: Bence Gadanyi Date: Thu, 2 Apr 2026 13:28:35 +0000 Subject: [PATCH 3/5] chore: update copy --- .../syncKnowledgeBaseFunction/app/handler.py | 22 +++++-------------- .../tests/test_app.py | 3 ++- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/packages/syncKnowledgeBaseFunction/app/handler.py b/packages/syncKnowledgeBaseFunction/app/handler.py index c255d1f8..8d97a7b6 100644 --- a/packages/syncKnowledgeBaseFunction/app/handler.py +++ b/packages/syncKnowledgeBaseFunction/app/handler.py @@ -378,18 +378,11 @@ def initialise_slack(self): { "type": "plan", "plan_id": uuid.uuid4().hex, - "title": "These are the documents that have been added:", + "title": "Processing file updates...", "tasks": [ - self.create_task( - id=self.fetching_block_id, - title="Fetching changes", - details=[], - outputs=["Searching"], - status="complete", - ), self.create_task( id=self.update_block_id, - title="Processing documents", + title="", details=[], outputs=["Initialising"], status="in_progress", @@ -529,7 +522,9 @@ def process_multiple_s3_events(self, records: list, slack_handler: SlackHandler) for i, name in enumerate(self.document_names): total = self.created + self.modified + self.deleted output_message = ( - f"Processed a total of {total} record(s)" if (i + 1 == len(self.document_names)) else None + f"Processed {total} file {'update' if total == 1 else 'updates'}" + if (i + 1 == len(self.document_names)) + else None ) slack_handler.update_task( id=slack_handler.update_block_id, message=name, output_message=output_message, replace=(i == 0) @@ -588,13 +583,6 @@ def process_batched_queue_events(self, slack_handler: SlackHandler, events: list continue logger.info(f"Processing {len(sqs_records)} record(s)") - output_message = "Search Complete" if (i + 1 == len(events)) else None - slack_handler.update_task( - id=slack_handler.fetching_block_id, - message=f"Found {len(sqs_records)} events", - output_message=output_message, - replace=True, - ) self.process_multiple_sqs_events(slack_handler, sqs_records) diff --git a/packages/syncKnowledgeBaseFunction/tests/test_app.py b/packages/syncKnowledgeBaseFunction/tests/test_app.py index f76c9133..5ee7dda8 100644 --- a/packages/syncKnowledgeBaseFunction/tests/test_app.py +++ b/packages/syncKnowledgeBaseFunction/tests/test_app.py @@ -510,7 +510,8 @@ def mock_post_message_side_effect(**kwargs): # Assert Messages were posted and updated mock_slack_client.chat_postMessage.assert_called_once() - assert mock_slack_client.chat_update.call_count == 4 # Update details, update tasks (+ clear), close + # Update pending (replace), update with doc name, complete_plan + assert mock_slack_client.chat_update.call_count == 3 @patch("app.config.config.get_bot_active") From 1cb47cd57c72d0950e186cd84a57881a605e0624 Mon Sep 17 00:00:00 2001 From: Bence Gadanyi Date: Thu, 2 Apr 2026 14:26:03 +0000 Subject: [PATCH 4/5] chore: update copy --- packages/syncKnowledgeBaseFunction/app/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/syncKnowledgeBaseFunction/app/handler.py b/packages/syncKnowledgeBaseFunction/app/handler.py index 8d97a7b6..b7c98823 100644 --- a/packages/syncKnowledgeBaseFunction/app/handler.py +++ b/packages/syncKnowledgeBaseFunction/app/handler.py @@ -382,7 +382,7 @@ def initialise_slack(self): "tasks": [ self.create_task( id=self.update_block_id, - title="", + title="Processing file updates...", details=[], outputs=["Initialising"], status="in_progress", From a3c1c38666c3578c7938f7279aa007c0f7e7b743 Mon Sep 17 00:00:00 2001 From: Bence Gadanyi Date: Tue, 7 Apr 2026 09:53:38 +0000 Subject: [PATCH 5/5] chore: revert TODO comment --- packages/cdk/resources/Functions.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/cdk/resources/Functions.ts b/packages/cdk/resources/Functions.ts index ed0e559a..754457bf 100644 --- a/packages/cdk/resources/Functions.ts +++ b/packages/cdk/resources/Functions.ts @@ -130,8 +130,7 @@ export class Functions extends Construct { environmentVariables: { "KNOWLEDGEBASE_ID": props.knowledgeBaseId, "SLACK_BOT_TOKEN_PARAMETER": props.slackBotTokenParameter.parameterName, - // TODO: Revert to `${!props.isPullRequest}` before merging - temporarily enabled for PR testing - "SLACK_BOT_ACTIVE": "true", + "SLACK_BOT_ACTIVE": `${!props.isPullRequest}`, "DATA_SOURCE_ID": props.dataSourceId, "KNOWLEDGE_SYNC_STATE_TABLE": props.knowledgeSyncStateTable.tableName },