From f0ef1582ae592b4aea023b8b4931703568a5f72d Mon Sep 17 00:00:00 2001 From: Avery Date: Fri, 22 Nov 2024 11:06:21 -0800 Subject: [PATCH 01/13] Do not throw errors when trying to list members from a non-existent Google Group (#5522) * Do not throw errors when trying to list members from a non-existent Google Group * Update src/dispatch/plugins/dispatch_google/groups/plugin.py Co-authored-by: Marc Vilanova <39573146+mvilanova@users.noreply.github.com> Signed-off-by: Avery --------- Signed-off-by: Avery Co-authored-by: Marc Vilanova <39573146+mvilanova@users.noreply.github.com> --- src/dispatch/plugins/dispatch_google/groups/plugin.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/dispatch/plugins/dispatch_google/groups/plugin.py b/src/dispatch/plugins/dispatch_google/groups/plugin.py index 2d42c51d4ce3..ba53c3b20bf3 100644 --- a/src/dispatch/plugins/dispatch_google/groups/plugin.py +++ b/src/dispatch/plugins/dispatch_google/groups/plugin.py @@ -170,11 +170,16 @@ def remove(self, email: str, participants: List[str]): for p in participants: remove_member(client, email, p) - def list(self, email: str): + def list(self, email: str) -> list[str]: """Lists members from an existing Google Group.""" client = get_service(self.configuration, "admin", "directory_v1", self.scopes) - members = list_members(client, email) - return [m["email"] for m in members.get("members", [])] + try: + members = list_members(client, email) + return [m["email"] for m in members.get("members", [])] + except HttpError as e: + if e.resp.status == 404: + log.warning(f"Group does not exist. GroupKey={email} Trying to list members.") + return [] def delete(self, email: str): """Deletes an existing Google group.""" From 9fedaf7f9a629fab3f2db501e1a6da83c767bacf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:31:17 -0800 Subject: [PATCH 02/13] chore(deps): bump @tiptap/pm in /src/dispatch/static/dispatch (#5527) Bumps [@tiptap/pm](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/pm) from 2.9.1 to 2.10.2. - [Release notes](https://github.com/ueberdosis/tiptap/releases) - [Changelog](https://github.com/ueberdosis/tiptap/blob/@tiptap/pm@2.10.2/packages/pm/CHANGELOG.md) - [Commits](https://github.com/ueberdosis/tiptap/commits/@tiptap/pm@2.10.2/packages/pm) --- updated-dependencies: - dependency-name: "@tiptap/pm" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../static/dispatch/package-lock.json | 82 +++++++++---------- 1 file changed, 40 insertions(+), 42 deletions(-) diff --git a/src/dispatch/static/dispatch/package-lock.json b/src/dispatch/static/dispatch/package-lock.json index 2d061f67dcf7..6a9b9170fb25 100644 --- a/src/dispatch/static/dispatch/package-lock.json +++ b/src/dispatch/static/dispatch/package-lock.json @@ -1961,28 +1961,28 @@ } }, "node_modules/@tiptap/pm": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-2.9.1.tgz", - "integrity": "sha512-mvV86fr7kEuDYEApQ2uMPCKL2uagUE0BsXiyyz3KOkY1zifyVm1fzdkscb24Qy1GmLzWAIIihA+3UHNRgYdOlQ==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-2.10.2.tgz", + "integrity": "sha512-jEgC79uvuEl51XxulutUJPSlhkoY0xQc9R/G4MQltAi+JxJ+KE/pOxgqziWNxBpgUzQqloupjod0kLhLUL4Cig==", "dependencies": { "prosemirror-changeset": "^2.2.1", "prosemirror-collab": "^1.3.1", - "prosemirror-commands": "^1.6.0", + "prosemirror-commands": "^1.6.2", "prosemirror-dropcursor": "^1.8.1", "prosemirror-gapcursor": "^1.3.2", "prosemirror-history": "^1.4.1", "prosemirror-inputrules": "^1.4.0", "prosemirror-keymap": "^1.2.2", - "prosemirror-markdown": "^1.13.0", + "prosemirror-markdown": "^1.13.1", "prosemirror-menu": "^1.2.4", - "prosemirror-model": "^1.22.3", + "prosemirror-model": "^1.23.0", "prosemirror-schema-basic": "^1.2.3", "prosemirror-schema-list": "^1.4.1", "prosemirror-state": "^1.4.3", - "prosemirror-tables": "^1.4.0", + "prosemirror-tables": "^1.6.1", "prosemirror-trailing-node": "^3.0.0", - "prosemirror-transform": "^1.10.0", - "prosemirror-view": "^1.34.3" + "prosemirror-transform": "^1.10.2", + "prosemirror-view": "^1.36.0" }, "funding": { "type": "github", @@ -2079,26 +2079,23 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, "node_modules/@types/linkify-it": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz", - "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", - "peer": true + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==" }, "node_modules/@types/markdown-it": { - "version": "13.0.7", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-13.0.7.tgz", - "integrity": "sha512-U/CBi2YUUcTHBt5tjO2r5QV/x0Po6nsYwQU4Y04fBS6vfoImaiZ6f8bi3CjTCxBPQSO1LMyUqkByzi8AidyxfA==", - "peer": true, + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", + "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==", "dependencies": { - "@types/linkify-it": "*", - "@types/mdurl": "*" + "@types/linkify-it": "^5", + "@types/mdurl": "^2" } }, "node_modules/@types/mdurl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz", - "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", - "peer": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==" }, "node_modules/@types/node": { "version": "20.11.4", @@ -5949,13 +5946,13 @@ } }, "node_modules/prosemirror-commands": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.6.0.tgz", - "integrity": "sha512-xn1U/g36OqXn2tn5nGmvnnimAj/g1pUx2ypJJIe8WkVX83WyJVC5LTARaxZa2AtQRwntu9Jc5zXs9gL9svp/mg==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.6.2.tgz", + "integrity": "sha512-0nDHH++qcf/BuPLYvmqZTUUsPJUCPBUXt0J1ErTcDIS369CTp773itzLGIgIXG4LJXOlwYCr44+Mh4ii6MP1QA==", "dependencies": { "prosemirror-model": "^1.0.0", "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.0.0" + "prosemirror-transform": "^1.10.2" } }, "node_modules/prosemirror-dropcursor": { @@ -6009,10 +6006,11 @@ } }, "node_modules/prosemirror-markdown": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/prosemirror-markdown/-/prosemirror-markdown-1.13.0.tgz", - "integrity": "sha512-UziddX3ZYSYibgx8042hfGKmukq5Aljp2qoBiJRejD/8MH70siQNz5RB1TrdTPheqLMy4aCe4GYNF10/3lQS5g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/prosemirror-markdown/-/prosemirror-markdown-1.13.1.tgz", + "integrity": "sha512-Sl+oMfMtAjWtlcZoj/5L/Q39MpEnVZ840Xo330WJWUvgyhNmLBLN7MsHn07s53nG/KImevWHSE6fEj4q/GihHw==", "dependencies": { + "@types/markdown-it": "^14.0.0", "markdown-it": "^14.0.0", "prosemirror-model": "^1.20.0" } @@ -6029,9 +6027,9 @@ } }, "node_modules/prosemirror-model": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.22.3.tgz", - "integrity": "sha512-V4XCysitErI+i0rKFILGt/xClnFJaohe/wrrlT2NSZ+zk8ggQfDH4x2wNK7Gm0Hp4CIoWizvXFP7L9KMaCuI0Q==", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.23.0.tgz", + "integrity": "sha512-Q/fgsgl/dlOAW9ILu4OOhYWQbc7TQd4BwKH/RwmUjyVf8682Be4zj3rOYdLnYEcGzyg8LL9Q5IWYKD8tdToreQ==", "dependencies": { "orderedmap": "^2.0.0" } @@ -6065,9 +6063,9 @@ } }, "node_modules/prosemirror-tables": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.4.0.tgz", - "integrity": "sha512-fxryZZkQG12fSCNuZDrYx6Xvo2rLYZTbKLRd8rglOPgNJGMKIS8uvTt6gGC38m7UCu/ENnXIP9pEz5uDaPc+cA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.6.1.tgz", + "integrity": "sha512-p8WRJNA96jaNQjhJolmbxTzd6M4huRE5xQ8OxjvMhQUP0Nzpo4zz6TztEiwk6aoqGBhz9lxRWR1yRZLlpQN98w==", "dependencies": { "prosemirror-keymap": "^1.1.2", "prosemirror-model": "^1.8.1", @@ -6091,17 +6089,17 @@ } }, "node_modules/prosemirror-transform": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.10.0.tgz", - "integrity": "sha512-9UOgFSgN6Gj2ekQH5CTDJ8Rp/fnKR2IkYfGdzzp5zQMFsS4zDllLVx/+jGcX86YlACpG7UR5fwAXiWzxqWtBTg==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.10.2.tgz", + "integrity": "sha512-2iUq0wv2iRoJO/zj5mv8uDUriOHWzXRnOTVgCzSXnktS/2iQRa3UUQwVlkBlYZFtygw6Nh1+X4mGqoYBINn5KQ==", "dependencies": { "prosemirror-model": "^1.21.0" } }, "node_modules/prosemirror-view": { - "version": "1.34.3", - "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.34.3.tgz", - "integrity": "sha512-mKZ54PrX19sSaQye+sef+YjBbNu2voNwLS1ivb6aD2IRmxRGW64HU9B644+7OfJStGLyxvOreKqEgfvXa91WIA==", + "version": "1.36.0", + "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.36.0.tgz", + "integrity": "sha512-U0GQd5yFvV5qUtT41X1zCQfbw14vkbbKwLlQXhdylEmgpYVHkefXYcC4HHwWOfZa3x6Y8wxDLUBv7dxN5XQ3nA==", "dependencies": { "prosemirror-model": "^1.20.0", "prosemirror-state": "^1.0.0", From d7acabbd2f96bbc05a62c2f9bebda26a32b61fb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:31:25 -0800 Subject: [PATCH 03/13] chore(deps): bump @tanstack/vue-query in /src/dispatch/static/dispatch (#5526) Bumps [@tanstack/vue-query](https://github.com/TanStack/query/tree/HEAD/packages/vue-query) from 5.59.20 to 5.60.6. - [Release notes](https://github.com/TanStack/query/releases) - [Commits](https://github.com/TanStack/query/commits/v5.60.6/packages/vue-query) --- updated-dependencies: - dependency-name: "@tanstack/vue-query" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/dispatch/static/dispatch/package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dispatch/static/dispatch/package-lock.json b/src/dispatch/static/dispatch/package-lock.json index 6a9b9170fb25..e57c1d403f15 100644 --- a/src/dispatch/static/dispatch/package-lock.json +++ b/src/dispatch/static/dispatch/package-lock.json @@ -1613,21 +1613,21 @@ } }, "node_modules/@tanstack/query-core": { - "version": "5.59.20", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.59.20.tgz", - "integrity": "sha512-e8vw0lf7KwfGe1if4uPFhvZRWULqHjFcz3K8AebtieXvnMOz5FSzlZe3mTLlPuUBcydCnBRqYs2YJ5ys68wwLg==", + "version": "5.60.6", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.60.6.tgz", + "integrity": "sha512-tI+k0KyCo1EBJ54vxK1kY24LWj673ujTydCZmzEZKAew4NqZzTaVQJEuaG1qKj2M03kUHN46rchLRd+TxVq/zQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" } }, "node_modules/@tanstack/vue-query": { - "version": "5.59.20", - "resolved": "https://registry.npmjs.org/@tanstack/vue-query/-/vue-query-5.59.20.tgz", - "integrity": "sha512-kIs1GfXh7jVLycbnQDghfdrcvrZz5fxnMF7eAAp8O3ZfhHQWfP57DBXbOvww4Y+TI0EvVoh+hihX+LNFBGFKLg==", + "version": "5.60.6", + "resolved": "https://registry.npmjs.org/@tanstack/vue-query/-/vue-query-5.60.6.tgz", + "integrity": "sha512-VW8eN0nXdmDCjhhZPoNQVN0EWgs5XA0D5OARN8xEhCcYB3NUda9csxIjW45hiWhhqIiUfjLJRDYPJ75nYWbUSw==", "dependencies": { "@tanstack/match-sorter-utils": "^8.15.1", - "@tanstack/query-core": "5.59.20", + "@tanstack/query-core": "5.60.6", "@vue/devtools-api": "^6.6.3", "vue-demi": "^0.14.10" }, From efdd390c77f4849986f903ed4c90d3cfec62104f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:31:32 -0800 Subject: [PATCH 04/13] chore(deps): bump @tiptap/vue-3 in /src/dispatch/static/dispatch (#5525) Bumps [@tiptap/vue-3](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/vue-3) from 2.9.1 to 2.10.2. - [Release notes](https://github.com/ueberdosis/tiptap/releases) - [Changelog](https://github.com/ueberdosis/tiptap/blob/@tiptap/vue-3@2.10.2/packages/vue-3/CHANGELOG.md) - [Commits](https://github.com/ueberdosis/tiptap/commits/@tiptap/vue-3@2.10.2/packages/vue-3) --- updated-dependencies: - dependency-name: "@tiptap/vue-3" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../static/dispatch/package-lock.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/dispatch/static/dispatch/package-lock.json b/src/dispatch/static/dispatch/package-lock.json index e57c1d403f15..1c5630b1913a 100644 --- a/src/dispatch/static/dispatch/package-lock.json +++ b/src/dispatch/static/dispatch/package-lock.json @@ -1707,9 +1707,9 @@ } }, "node_modules/@tiptap/extension-bubble-menu": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.9.1.tgz", - "integrity": "sha512-DWUF6NG08/bZDWw0jCeotSTvpkyqZTi4meJPomG9Wzs/Ol7mEwlNCsCViD999g0+IjyXFatBk4DfUq1YDDu++Q==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.10.2.tgz", + "integrity": "sha512-KAh2bvYcixJ3RFv2P05kPNLAJ4uW6BDj1AfEMn0YguBWWTgZg8Kot1AzBRgTjBBFCInQS6b49db1ff4M07DGsg==", "dependencies": { "tippy.js": "^6.3.7" }, @@ -1785,9 +1785,9 @@ } }, "node_modules/@tiptap/extension-floating-menu": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-2.9.1.tgz", - "integrity": "sha512-MxZ7acNNsoNaKpetxfwi3Z11Bgrh0T2EJlCV77v9N1vWK38+st3H1WJanmLbPNtc2ocvhHJrz+DjDz3CWxQ9rQ==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-2.10.2.tgz", + "integrity": "sha512-s/KfW5YQY13BwhSQRlgomYmHuBT0k6FBxn8mgJLHcA9sTqgy/BriOhmNkMrredNzd4UOd5JVpcT6b+eckG4nkQ==", "dependencies": { "tippy.js": "^6.3.7" }, @@ -2022,12 +2022,12 @@ } }, "node_modules/@tiptap/vue-3": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@tiptap/vue-3/-/vue-3-2.9.1.tgz", - "integrity": "sha512-51mKa4C3hdKe+o6G7Pk7d4puZ/VjoHWtTo2WxE249oH+bCkh6FObqNu2wfRK+9obVuTGXQ9dAc988cmwY+2eyw==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@tiptap/vue-3/-/vue-3-2.10.2.tgz", + "integrity": "sha512-5iOXbiG1hWEhBa/D7A8APEdsmCKcsDaN8+b7c15itj/MOmniFLSOCRl5YE/agdDYXKZ/g6/fUvruYxmpT7UCuA==", "dependencies": { - "@tiptap/extension-bubble-menu": "^2.9.1", - "@tiptap/extension-floating-menu": "^2.9.1" + "@tiptap/extension-bubble-menu": "^2.10.2", + "@tiptap/extension-floating-menu": "^2.10.2" }, "funding": { "type": "github", From 1e1f043603453d331c6b14ff0be75f8577d3ab90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:31:40 -0800 Subject: [PATCH 05/13] chore(deps): bump @tiptap/extension-placeholder (#5524) Bumps [@tiptap/extension-placeholder](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-placeholder) from 2.9.1 to 2.10.2. - [Release notes](https://github.com/ueberdosis/tiptap/releases) - [Changelog](https://github.com/ueberdosis/tiptap/blob/@tiptap/extension-placeholder@2.10.2/packages/extension-placeholder/CHANGELOG.md) - [Commits](https://github.com/ueberdosis/tiptap/commits/@tiptap/extension-placeholder@2.10.2/packages/extension-placeholder) --- updated-dependencies: - dependency-name: "@tiptap/extension-placeholder" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/dispatch/static/dispatch/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dispatch/static/dispatch/package-lock.json b/src/dispatch/static/dispatch/package-lock.json index 1c5630b1913a..b38194be544f 100644 --- a/src/dispatch/static/dispatch/package-lock.json +++ b/src/dispatch/static/dispatch/package-lock.json @@ -1912,9 +1912,9 @@ } }, "node_modules/@tiptap/extension-placeholder": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-placeholder/-/extension-placeholder-2.9.1.tgz", - "integrity": "sha512-Q/w3OOg/C6jGBf4QKEWKF9k+iaCQCgPoaIg2IDTPx8QmaxRfgoVE5Csd+oTOY/brdmSNXOxykZWEci6OJP+MbA==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-placeholder/-/extension-placeholder-2.10.2.tgz", + "integrity": "sha512-QWzih69SetWYiylQzHsK29dMR8z1ParfcEw05hy3yyWqXE1DiKEot6rOGV1xenMVEA/SNGYYhQia15Bvco95TA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" From 5ad40cad82078cfbb1575608f64a02074495e2f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:31:48 -0800 Subject: [PATCH 06/13] chore(deps): bump uvicorn from 0.32.0 to 0.32.1 (#5517) Bumps [uvicorn](https://github.com/encode/uvicorn) from 0.32.0 to 0.32.1. - [Release notes](https://github.com/encode/uvicorn/releases) - [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md) - [Commits](https://github.com/encode/uvicorn/compare/0.32.0...0.32.1) --- updated-dependencies: - dependency-name: uvicorn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: David Whittaker <84562015+whitdog47@users.noreply.github.com> --- requirements-base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-base.txt b/requirements-base.txt index 6d51d6d9346a..f70b3b0fa4b9 100644 --- a/requirements-base.txt +++ b/requirements-base.txt @@ -510,7 +510,7 @@ urllib3==2.2.3 # pdpyras # requests # sentry-sdk -uvicorn==0.32.0 +uvicorn==0.32.1 # via -r requirements-base.in uvloop==0.21.0 # via -r requirements-base.in From e2f827c3a9f0ab081423b32c89115ead4d9c5493 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:31:56 -0800 Subject: [PATCH 07/13] chore(deps): bump google-api-python-client from 2.153.0 to 2.154.0 (#5516) Bumps [google-api-python-client](https://github.com/googleapis/google-api-python-client) from 2.153.0 to 2.154.0. - [Release notes](https://github.com/googleapis/google-api-python-client/releases) - [Commits](https://github.com/googleapis/google-api-python-client/compare/v2.153.0...v2.154.0) --- updated-dependencies: - dependency-name: google-api-python-client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-base.txt b/requirements-base.txt index f70b3b0fa4b9..012ba3935168 100644 --- a/requirements-base.txt +++ b/requirements-base.txt @@ -126,7 +126,7 @@ frozenlist==1.5.0 # aiosignal google-api-core==2.22.0 # via google-api-python-client -google-api-python-client==2.153.0 +google-api-python-client==2.154.0 # via -r requirements-base.in google-auth==2.36.0 # via From 4177688118d9cac252c12a0c1a247030c588aa3a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:32:04 -0800 Subject: [PATCH 08/13] chore(deps): bump slack-sdk from 3.33.3 to 3.33.4 (#5512) Bumps [slack-sdk](https://github.com/slackapi/python-slack-sdk) from 3.33.3 to 3.33.4. - [Release notes](https://github.com/slackapi/python-slack-sdk/releases) - [Commits](https://github.com/slackapi/python-slack-sdk/compare/v3.33.3...v3.33.4) --- updated-dependencies: - dependency-name: slack-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: David Whittaker <84562015+whitdog47@users.noreply.github.com> --- requirements-base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-base.txt b/requirements-base.txt index 012ba3935168..010c68d51d37 100644 --- a/requirements-base.txt +++ b/requirements-base.txt @@ -425,7 +425,7 @@ six==1.16.0 # validators slack-bolt==1.21.2 # via -r requirements-base.in -slack-sdk==3.33.3 +slack-sdk==3.33.4 # via # -r requirements-base.in # slack-bolt From f741e6fdfbf504017206cf3b8de0f45feb1b1014 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:32:12 -0800 Subject: [PATCH 09/13] chore(deps): bump dompurify in /src/dispatch/static/dispatch (#5510) Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.2.0 to 3.2.1. - [Release notes](https://github.com/cure53/DOMPurify/releases) - [Commits](https://github.com/cure53/DOMPurify/compare/3.2.0...3.2.1) --- updated-dependencies: - dependency-name: dompurify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/dispatch/static/dispatch/package-lock.json | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/dispatch/static/dispatch/package-lock.json b/src/dispatch/static/dispatch/package-lock.json index b38194be544f..815e1f02d5e2 100644 --- a/src/dispatch/static/dispatch/package-lock.json +++ b/src/dispatch/static/dispatch/package-lock.json @@ -2116,6 +2116,12 @@ "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.8.tgz", "integrity": "sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg==" }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "optional": true + }, "node_modules/@types/web-bluetooth": { "version": "0.0.20", "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", @@ -3647,9 +3653,12 @@ } }, "node_modules/dompurify": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.0.tgz", - "integrity": "sha512-AMdOzK44oFWqHEi0wpOqix/fUNY707OmoeFDnbi3Q5I8uOpy21ufUA5cDJPr0bosxrflOVD/H2DMSvuGKJGfmQ==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.1.tgz", + "integrity": "sha512-NBHEsc0/kzRYQd+AY6HR6B/IgsqzBABrqJbpCDQII/OK6h7B7LXzweZTDsqSW2LkTRpoxf18YUP+YjGySk6B3w==", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } }, "node_modules/domutils": { "version": "3.1.0", From a810b02ed435db6a9540b284628b0980467016ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:32:20 -0800 Subject: [PATCH 10/13] chore(deps): bump bcrypt from 4.2.0 to 4.2.1 (#5508) Bumps [bcrypt](https://github.com/pyca/bcrypt) from 4.2.0 to 4.2.1. - [Changelog](https://github.com/pyca/bcrypt/blob/main/release.py) - [Commits](https://github.com/pyca/bcrypt/compare/4.2.0...4.2.1) --- updated-dependencies: - dependency-name: bcrypt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-base.txt b/requirements-base.txt index 010c68d51d37..31953c1563c8 100644 --- a/requirements-base.txt +++ b/requirements-base.txt @@ -31,7 +31,7 @@ attrs==22.1.0 # jsonschema backoff==2.2.1 # via schemathesis -bcrypt==4.2.0 +bcrypt==4.2.1 # via -r requirements-base.in blis==1.0.1 # via thinc From 3cd2169f99af4ebef1ac4b225ca6e3c0a8a966a3 Mon Sep 17 00:00:00 2001 From: David Whittaker <84562015+whitdog47@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:45:25 -0800 Subject: [PATCH 11/13] fix(db): updating sass and remove document resolver plugin (#5518) * Updating sass and remove document resolver plugin * fixing database incident row with no name --- data/dispatch-sample-data.dump | 64 +-- src/dispatch/incident/metrics.py | 2 +- .../static/dispatch/package-lock.json | 413 +++++++++++++++++- src/dispatch/static/dispatch/package.json | 1 + src/dispatch/static/dispatch/vite.config.js | 7 + tests/static/e2e/incidents-table.spec.ts | 2 +- 6 files changed, 444 insertions(+), 45 deletions(-) diff --git a/data/dispatch-sample-data.dump b/data/dispatch-sample-data.dump index 475b49969892..af733b784449 100644 --- a/data/dispatch-sample-data.dump +++ b/data/dispatch-sample-data.dump @@ -2996,7 +2996,7 @@ CREATE TABLE dispatch_organization_default.entity ( name character varying, description character varying, value character varying, - source boolean, + source character varying, entity_type_id integer NOT NULL, search_vector tsvector, project_id integer, @@ -3037,7 +3037,7 @@ CREATE TABLE dispatch_organization_default.entity_type ( id integer NOT NULL, name character varying, description character varying, - jpath character varying NOT NULL, + jpath character varying, regular_expression character varying, enabled boolean, search_vector tsvector, @@ -3967,7 +3967,6 @@ ALTER SEQUENCE dispatch_organization_default.participant_role_id_seq OWNED BY di CREATE TABLE dispatch_organization_default.plugin_instance ( id integer NOT NULL, enabled boolean, - configuration json, plugin_id integer, project_id integer, _configuration character varying @@ -7666,7 +7665,7 @@ COPY dispatch_core.plugin_event (id, name, slug, description, plugin_id, search_ -- COPY dispatch_organization_default.alembic_version (version_num) FROM stdin; -3edb0476365a +928b725d64f6 \. @@ -7724,7 +7723,6 @@ COPY dispatch_organization_default.assoc_document_tags (document_id, tag_id) FRO COPY dispatch_organization_default.assoc_incident_tags (incident_id, tag_id) FROM stdin; 2 1 -7 1 \. @@ -8080,9 +8078,6 @@ COPY dispatch_organization_default.event (id, uuid, started_at, ended_at, source 56 6fe13da1-de96-41dd-ba9a-29a752060b46 2021-07-27 20:11:48.28756 2021-07-27 20:11:48.28756 Dispatch Core App Conversation added to incident null \N 6 'ad':5B 'app':3A 'convers':4B 'core':2A 'dispatch':1A 'incid':7B 2021-07-27 20:11:48.307412 2021-07-27 20:11:48.290557 \N \N \N \N \N 58 d66ec104-af72-46df-80a8-2b32a6fa8944 2021-07-27 20:11:59.021607 2021-07-27 20:11:59.021607 Dispatch Core App Incident notifications sent null \N 6 'app':3A 'core':2A 'dispatch':1A 'incid':4B 'notif':5B 'sent':6B 2021-07-27 20:11:59.04991 2021-07-27 20:11:59.022365 \N \N \N \N \N 59 7e011a9d-9bb9-4770-b5e3-1a21197e60c2 2021-07-28 17:13:49.192243 2021-07-28 17:13:49.192243 Dispatch Core App New incident task created by Kevin Glisson {"weblink": null} \N 4 'app':3A 'core':2A 'creat':7B 'dispatch':1A 'glisson':10B 'incid':5B 'kevin':9B 'new':4B 'task':6B 2021-07-28 17:13:49.218153 2021-07-28 17:13:49.199624 \N \N \N \N \N -60 2627886d-5466-47d8-a702-6596a17561a8 2024-02-04 02:51:26.185354 2024-02-04 02:51:26.185354 Dispatch Core App Incident created {"title": "Incident Test Created by Playwright", "description": "Test description created by Playwright", "type": "Denial of Service", "severity": "Undetermined", "priority": "Low", "status": "Active", "visibility": "Open"} \N 7 'app':3A 'core':2A 'creat':5B 'dispatch':1A 'incid':4B 2024-02-04 02:51:26.366892 2024-02-04 02:51:26.190379 \N \N Other \N t -61 5501e170-a4a6-4c29-a582-9d8e6367c35b 2024-02-04 02:51:26.752647 2024-02-04 02:51:26.752647 Dispatch Core App 3p1t6@example.com added to incident with Reporter role null \N 7 '3p1t6@example.com':4B 'ad':5B 'app':3A 'core':2A 'dispatch':1A 'incid':7B 'report':9B 'role':10B 2024-02-04 02:51:26.940241 2024-02-04 02:51:26.753164 \N \N Participant updated f -62 c1baff75-d46a-4cae-a793-9dab11d749e1 2024-02-04 02:51:27.112502 2024-02-04 02:51:27.112502 Dispatch Core App 3p1t6@example.com added to incident with Incident Commander role null \N 7 '3p1t6@example.com':4B 'ad':5B 'app':3A 'command':10B 'core':2A 'dispatch':1A 'incid':7B,9B 'role':11B 2024-02-04 02:51:27.222527 2024-02-04 02:51:27.113162 \N \N Participant updated f \. @@ -8135,7 +8130,6 @@ COPY dispatch_organization_default.incident (id, name, title, description, statu 4 dispatch-default-default-4 Heartbleed Sad PKI noises Stable Open 2021-07-27 19:52:57.757214 2021-07-27 19:54:03.96021 \N '4':9A 'default':7A,8A 'dispatch':6A 'dispatch-default-default':5A 'heartble':1B 'nois':4C 'pki':3C 'sad':2C 1 1 \N 1 2021-07-27 19:52:57.757221 2021-07-28 17:13:49.216785 Description of the actions taken to resolve the incident. Unknown America/Los_Angeles America/Los_Angeles America/Los_Angeles 2 2 2 \N \N \N 3 4 1 \N \N 5 dispatch-default-default-5 Solarwinds More like a solar tornado. Active Open 2021-07-27 20:06:15.252697 \N \N '5':11A 'default':9A,10A 'dispatch':8A 'dispatch-default-default':7A 'like':3C 'solar':5C 'solarwind':1B 'tornado':6C 2 1 \N 1 2021-07-27 20:06:15.252705 2021-07-27 20:06:41.627061 Description of the actions taken to resolve the incident. Unknown America/Los_Angeles America/Los_Angeles America/Los_Angeles 3 3 3 \N \N \N 5 6 1 \N \N 6 dispatch-default-default-6 Kaseya Those backups are good right? Active Open 2021-07-27 20:11:30.525883 \N \N '6':11A 'backup':3C 'default':9A,10A 'dispatch':8A 'dispatch-default-default':7A 'good':5C 'kaseya':1B 'right':6C 3 1 \N 1 2021-07-27 20:11:30.525893 2021-07-27 20:11:59.048666 Description of the actions taken to resolve the incident. Unknown America/Los_Angeles America/Los_Angeles America/Los_Angeles 4 4 4 \N \N \N 7 8 1 \N \N -7 \N Incident Test Created by Playwright Test description created by Playwright Active Open 2024-02-04 02:51:26.109901 \N \N 'creat':3B,8C 'descript':7C 'incid':1B 'playwright':5B,10C 'test':2B,6C 3 5 \N 1 2024-02-04 02:51:26.109912 2024-02-04 02:51:27.220352 Description of the actions taken to resolve the incident. example.com Unknown Unknown Unknown 5 5 \N \N \N \N \N \N 1 \N \N \. @@ -8272,7 +8266,6 @@ COPY dispatch_organization_default.participant (id, team, department, location, 2 Unknown Unknown America/Los_Angeles \N \N f \N 4 2 \N \N 3 Unknown Unknown America/Los_Angeles \N \N f \N 5 2 \N \N 4 Unknown Unknown America/Los_Angeles \N \N f \N 6 2 \N \N -5 example.com Unknown Unknown \N \N f \N 7 3 \N \N \. @@ -8301,8 +8294,6 @@ COPY dispatch_organization_default.participant_role (id, assumed_at, renounced_a 10 2021-07-27 20:11:32.314039 \N Reporter 4 1 11 2021-07-27 20:11:32.427753 \N Incident Commander 4 1 12 2021-07-27 20:11:32.491482 \N Liaison 4 1 -13 2024-02-04 02:51:26.570736 \N Reporter 5 0 -14 2024-02-04 02:51:27.008425 \N Incident Commander 5 0 \. @@ -8310,20 +8301,19 @@ COPY dispatch_organization_default.participant_role (id, assumed_at, renounced_a -- Data for Name: plugin_instance; Type: TABLE DATA; Schema: dispatch_organization_default; Owner: postgres -- -COPY dispatch_organization_default.plugin_instance (id, enabled, configuration, plugin_id, project_id, _configuration) FROM stdin; -1 t {} 2 1 \N -3 t {} 4 1 \N -9 \N {} 16 1 \N -11 f {} 19 1 \N -8 f {} 18 1 \N -7 f {} 13 1 \N -6 f {} 12 1 \N -14 f {} 10 1 \N -13 f {} 9 1 \N -12 f {} 8 1 \N -5 t {} 6 1 \N -2 t {} 3 1 \N -4 t {} 7 1 \N +COPY dispatch_organization_default.plugin_instance (id, enabled, plugin_id, project_id, _configuration) FROM stdin; +1 t 2 1 \N +9 \N 16 1 \N +11 f 19 1 \N +8 f 18 1 \N +7 f 13 1 \N +6 f 12 1 \N +14 f 10 1 \N +13 f 9 1 \N +12 f 8 1 \N +5 t 6 1 \N +2 t 3 1 \N +4 t 7 1 \N \. @@ -11676,6 +11666,13 @@ CREATE INDEX definition_search_vector_idx ON dispatch_organization_default.defin CREATE INDEX document_search_vector_idx ON dispatch_organization_default.document USING gin (search_vector); +-- +-- Name: entity_search_vector_idx; Type: INDEX; Schema: dispatch_organization_default; Owner: postgres +-- + +CREATE INDEX entity_search_vector_idx ON dispatch_organization_default.entity USING gin (search_vector); + + -- -- Name: entity_type_search_vector_idx; Type: INDEX; Schema: dispatch_organization_default; Owner: postgres -- @@ -11739,13 +11736,6 @@ CREATE INDEX incident_type_search_vector_idx ON dispatch_organization_default.in CREATE INDEX individual_contact_search_vector_idx ON dispatch_organization_default.individual_contact USING gin (search_vector); --- --- Name: ix_entity_search_vector; Type: INDEX; Schema: dispatch_organization_default; Owner: postgres --- - -CREATE INDEX ix_entity_search_vector ON dispatch_organization_default.entity USING gin (search_vector); - - -- -- Name: notification_search_vector_idx; Type: INDEX; Schema: dispatch_organization_default; Owner: postgres -- @@ -13664,14 +13654,6 @@ ALTER TABLE ONLY dispatch_organization_default.project ADD CONSTRAINT project_organization_id_fkey FOREIGN KEY (organization_id) REFERENCES dispatch_core.organization(id); --- --- Name: project project_stable_priority_id_fkey; Type: FK CONSTRAINT; Schema: dispatch_organization_default; Owner: postgres --- - -ALTER TABLE ONLY dispatch_organization_default.project - ADD CONSTRAINT project_stable_priority_id_fkey FOREIGN KEY (stable_priority_id) REFERENCES dispatch_organization_default.incident_priority(id); - - -- -- Name: query query_project_id_fkey; Type: FK CONSTRAINT; Schema: dispatch_organization_default; Owner: postgres -- diff --git a/src/dispatch/incident/metrics.py b/src/dispatch/incident/metrics.py index 42fa07c63797..36bf4a9716ab 100644 --- a/src/dispatch/incident/metrics.py +++ b/src/dispatch/incident/metrics.py @@ -76,7 +76,7 @@ def make_forecast(incidents: List[Incident]): dataframe.drop("ds", inplace=True, axis=1) # fill periods without incidents with 0 - idx = pd.date_range(dataframe.index[0], dataframe.index[-1], freq="M") + idx = pd.date_range(dataframe.index[0], dataframe.index[-1], freq="ME") dataframe.index = pd.DatetimeIndex(dataframe.index) dataframe = dataframe.reindex(idx, fill_value=0) diff --git a/src/dispatch/static/dispatch/package-lock.json b/src/dispatch/static/dispatch/package-lock.json index 815e1f02d5e2..6ff68a3c4c7b 100644 --- a/src/dispatch/static/dispatch/package-lock.json +++ b/src/dispatch/static/dispatch/package-lock.json @@ -50,6 +50,7 @@ "monaco-editor": "0.43.0", "register-service-worker": "^1.7.2", "roboto-fontface": "^0.10.0", + "sass-embedded": "^1.81.0", "sortablejs": "^1.15.0", "swrv": "^1.0.4", "vue": "^3.4.12", @@ -162,6 +163,11 @@ "node": ">=6.9.0" } }, + "node_modules/@bufbuild/protobuf": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.2.2.tgz", + "integrity": "sha512-UNtPCbrwrenpmrXuRwn9jYpPoweNXj8X5sMvYgsqYyaH8jQ6LfUJSk3dJLnBK+6sfYPrF4iAIo5sd5HQ+tg75A==" + }, "node_modules/@date-io/core": { "version": "2.17.0", "resolved": "https://registry.npmjs.org/@date-io/core/-/core-2.17.0.tgz", @@ -3044,6 +3050,11 @@ "node": ">=8" } }, + "node_modules/buffer-builder": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/buffer-builder/-/buffer-builder-0.2.0.tgz", + "integrity": "sha512-7VPMEPuYznPSoR21NE1zvd2Xna6c/CloiZCfcMXR1Jny6PjX0N4Nsa38zcBFo/FMK+BlA+FLKbJCQ0i2yxp+Xg==" + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -3259,6 +3270,11 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "node_modules/colorjs.io": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/colorjs.io/-/colorjs.io-0.5.2.tgz", + "integrity": "sha512-twmVoizEW7ylZSN32OgKdXRmo1qg+wT5/6C3xu5b9QsWzSFAhHLn2xd8ro0diCsKfCj1RdaTP/nrcW+vAoQPIw==" + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -4551,8 +4567,7 @@ "node_modules/immutable": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.2.tgz", - "integrity": "sha512-1NU7hWZDkV7hJ4PJ9dur9gTNQ4ePNPN4k9/0YhwjzykTi/+3Q5pF93YU5QoVj8BuOnhLgaY8gs0U2pj4kSYVcw==", - "dev": true + "integrity": "sha512-1NU7hWZDkV7hJ4PJ9dur9gTNQ4ePNPN4k9/0YhwjzykTi/+3Q5pF93YU5QoVj8BuOnhLgaY8gs0U2pj4kSYVcw==" }, "node_modules/import-fresh": { "version": "3.3.0", @@ -6373,6 +6388,19 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/rxjs/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -6398,6 +6426,363 @@ "@parcel/watcher": "^2.4.1" } }, + "node_modules/sass-embedded": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded/-/sass-embedded-1.81.0.tgz", + "integrity": "sha512-uZQ2Faxb1oWBHpeSSzjxnhClbMb3QadN0ql0ZFNuqWOLUxwaVhrMlMhPq6TDPbbfDUjihuwrMCuy695Bgna5RA==", + "dependencies": { + "@bufbuild/protobuf": "^2.0.0", + "buffer-builder": "^0.2.0", + "colorjs.io": "^0.5.0", + "immutable": "^5.0.2", + "rxjs": "^7.4.0", + "supports-color": "^8.1.1", + "sync-child-process": "^1.0.2", + "varint": "^6.0.0" + }, + "bin": { + "sass": "dist/bin/sass.js" + }, + "engines": { + "node": ">=16.0.0" + }, + "optionalDependencies": { + "sass-embedded-android-arm": "1.81.0", + "sass-embedded-android-arm64": "1.81.0", + "sass-embedded-android-ia32": "1.81.0", + "sass-embedded-android-riscv64": "1.81.0", + "sass-embedded-android-x64": "1.81.0", + "sass-embedded-darwin-arm64": "1.81.0", + "sass-embedded-darwin-x64": "1.81.0", + "sass-embedded-linux-arm": "1.81.0", + "sass-embedded-linux-arm64": "1.81.0", + "sass-embedded-linux-ia32": "1.81.0", + "sass-embedded-linux-musl-arm": "1.81.0", + "sass-embedded-linux-musl-arm64": "1.81.0", + "sass-embedded-linux-musl-ia32": "1.81.0", + "sass-embedded-linux-musl-riscv64": "1.81.0", + "sass-embedded-linux-musl-x64": "1.81.0", + "sass-embedded-linux-riscv64": "1.81.0", + "sass-embedded-linux-x64": "1.81.0", + "sass-embedded-win32-arm64": "1.81.0", + "sass-embedded-win32-ia32": "1.81.0", + "sass-embedded-win32-x64": "1.81.0" + } + }, + "node_modules/sass-embedded-android-arm": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-android-arm/-/sass-embedded-android-arm-1.81.0.tgz", + "integrity": "sha512-NWEmIuaIEsGFNsIRa+5JpIpPJyZ32H15E85CNZqEIhhwWlk9UNw7vlOCmTH8MtabtnACwC/2NG8VyNa3nxKzUQ==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-android-arm64": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-android-arm64/-/sass-embedded-android-arm64-1.81.0.tgz", + "integrity": "sha512-I36P77/PKAHx6sqOmexO2iEY5kpsmQ1VxcgITZSOxPMQhdB6m4t3bTabfDuWQQmCrqqiNFtLQHeytB65bUqwiw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-android-ia32": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-android-ia32/-/sass-embedded-android-ia32-1.81.0.tgz", + "integrity": "sha512-k8V1usXw30w1GVxvrteG1RzgYJzYQ9PfL2aeOqGdroBN7zYTD9VGJXTGcxA4IeeRxmRd7szVW2mKXXS472fh8g==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-android-riscv64": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-android-riscv64/-/sass-embedded-android-riscv64-1.81.0.tgz", + "integrity": "sha512-RXlanyLXEpN/DEehXgLuKPsqT//GYlsGFxKXgRiCc8hIPAueFLQXKJmLWlL3BEtHgmFdbsStIu4aZCcb1hOFlQ==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-android-x64": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-android-x64/-/sass-embedded-android-x64-1.81.0.tgz", + "integrity": "sha512-RQG0FxGQ1DERNyUDED8+BDVaLIjI+BNg8lVcyqlLZUrWY6NhzjwYEeiN/DNZmMmHtqDucAPNDcsdVUNQqsBy2A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-darwin-arm64": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-darwin-arm64/-/sass-embedded-darwin-arm64-1.81.0.tgz", + "integrity": "sha512-gLKbsfII9Ppua76N41ODFnKGutla9qv0OGAas8gxe0jYBeAQFi/1iKQYdNtQtKi4mA9n5TQTqz+HHCKszZCoyA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-darwin-x64": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-darwin-x64/-/sass-embedded-darwin-x64-1.81.0.tgz", + "integrity": "sha512-7uMOlT9hD2KUJCbTN2XcfghDxt/rc50ujjfSjSHjX1SYj7mGplkINUXvVbbvvaV2wt6t9vkGkCo5qNbeBhfwBg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-arm": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm/-/sass-embedded-linux-arm-1.81.0.tgz", + "integrity": "sha512-REqR9qM4RchCE3cKqzRy9Q4zigIV82SbSpCi/O4O3oK3pg2I1z7vkb3TiJsivusG/li7aqKZGmYOtAXjruGQDA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-arm64": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm64/-/sass-embedded-linux-arm64-1.81.0.tgz", + "integrity": "sha512-jy4bvhdUmqbyw1jv1f3Uxl+MF8EU/Y/GDx4w6XPJm4Ds+mwH/TwnyAwsxxoBhWfnBnW8q2ADy039DlS5p+9csQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-ia32": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-ia32/-/sass-embedded-linux-ia32-1.81.0.tgz", + "integrity": "sha512-ga/Jk4q5Bn1aC+iHJteDZuLSKnmBUiS3dEg1fnl/Z7GaHIChceKDJOw0zNaILRXI0qT2E1at9MwzoRaRA5Nn/g==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-musl-arm": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm/-/sass-embedded-linux-musl-arm-1.81.0.tgz", + "integrity": "sha512-oWVUvQ4d5Kx1Md75YXZl5z1WBjc+uOhfRRqzkJ3nWc8tjszxJN+y/5EOJavhsNI3/2yoTt6eMXRTqDD9b0tWSQ==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-musl-arm64": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm64/-/sass-embedded-linux-musl-arm64-1.81.0.tgz", + "integrity": "sha512-hpntWf5kjkoxncA1Vh8vhsUOquZ8AROZKx0rQh7ZjSRs4JrYZASz1cfevPKaEM3wIim/nYa6TJqm0VqWsrERlA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-musl-ia32": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-ia32/-/sass-embedded-linux-musl-ia32-1.81.0.tgz", + "integrity": "sha512-UEXUYkBuqTSwg5JNWiNlfMZ1Jx6SJkaEdx+fsL3Tk099L8cKSoJWH2EPz4ZJjNbyIMymrSdVfymheTeZ8u24xA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-musl-riscv64": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-riscv64/-/sass-embedded-linux-musl-riscv64-1.81.0.tgz", + "integrity": "sha512-1D7OznytbIhx2XDHWi1nuQ8d/uCVR7FGGzELgaU//T8A9DapVTUgPKvB70AF1k4GzChR9IXU/WvFZs2hDTbaJg==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-musl-x64": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-x64/-/sass-embedded-linux-musl-x64-1.81.0.tgz", + "integrity": "sha512-ia6VCTeVDQtBSMktXRFza1AZCt8/6aUoujot6Ugf4KmdytQqPJIHxkHaGftm5xwi9WdrMGYS7zgolToPijR11A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-riscv64": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-riscv64/-/sass-embedded-linux-riscv64-1.81.0.tgz", + "integrity": "sha512-KbxSsqu4tT1XbhZfJV/5NfW0VtJIGlD58RjqJqJBi8Rnjrx29/upBsuwoDWtsPV/LhoGwwU1XkSa9Q1ifCz4fQ==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-x64": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-x64/-/sass-embedded-linux-x64-1.81.0.tgz", + "integrity": "sha512-AMDeVY2T9WAnSFkuQcsOn5c29GRs/TuqnCiblKeXfxCSKym5uKdBl/N7GnTV6OjzoxiJBbkYKdVIaS5By7Gj4g==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-win32-arm64": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-win32-arm64/-/sass-embedded-win32-arm64-1.81.0.tgz", + "integrity": "sha512-YOmBRYnygwWUmCoH14QbMRHjcvCJufeJBAp0m61tOJXIQh64ziwV4mjdqjS/Rx3zhTT4T+nulDUw4d3kLiMncA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-win32-ia32": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-win32-ia32/-/sass-embedded-win32-ia32-1.81.0.tgz", + "integrity": "sha512-HFfr/C+uLJGGTENdnssuNTmXI/xnIasUuEHEKqI+2J0FHCWT5cpz3PGAOHymPyJcZVYGUG/7gIxIx/d7t0LFYw==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-win32-x64": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass-embedded-win32-x64/-/sass-embedded-win32-x64-1.81.0.tgz", + "integrity": "sha512-wxj52jDcIAwWcXb7ShZ7vQYKcVUkJ+04YM9l46jDY+qwHzliGuorAUyujLyKTE9heGD3gShJ3wPPC1lXzq6v9A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/sass/node_modules/chokidar": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", @@ -6755,6 +7140,25 @@ "vue": ">=3.2.26 < 4" } }, + "node_modules/sync-child-process": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/sync-child-process/-/sync-child-process-1.0.2.tgz", + "integrity": "sha512-8lD+t2KrrScJ/7KXCSyfhT3/hRq78rC0wBFqNJXv3mZyn6hW2ypM05JmlSvtqRbeq6jqA94oHbxAr2vYsJ8vDA==", + "dependencies": { + "sync-message-port": "^1.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/sync-message-port": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sync-message-port/-/sync-message-port-1.1.3.tgz", + "integrity": "sha512-GTt8rSKje5FilG+wEdfCkOcLL7LWqpMlr2c3LRuKt/YXxcJ52aGSbGBAdI4L3aaqfrBt6y711El53ItyH1NWzg==", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -7003,6 +7407,11 @@ "node": ">=10" } }, + "node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, "node_modules/vite": { "version": "5.4.11", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", diff --git a/src/dispatch/static/dispatch/package.json b/src/dispatch/static/dispatch/package.json index fe6c9a46130a..9dd2885a78c6 100644 --- a/src/dispatch/static/dispatch/package.json +++ b/src/dispatch/static/dispatch/package.json @@ -69,6 +69,7 @@ "monaco-editor": "0.43.0", "register-service-worker": "^1.7.2", "roboto-fontface": "^0.10.0", + "sass-embedded": "^1.81.0", "sortablejs": "^1.15.0", "swrv": "^1.0.4", "vue": "^3.4.12", diff --git a/src/dispatch/static/dispatch/vite.config.js b/src/dispatch/static/dispatch/vite.config.js index cec4a9c31111..0e5c12678c1d 100644 --- a/src/dispatch/static/dispatch/vite.config.js +++ b/src/dispatch/static/dispatch/vite.config.js @@ -30,6 +30,13 @@ export default defineConfig({ }, }, ], + css: { + preprocessorOptions: { + scss: { + api: "modern", + }, + }, + }, server: { port: 8080, proxy: { diff --git a/tests/static/e2e/incidents-table.spec.ts b/tests/static/e2e/incidents-table.spec.ts index 0dcd72196cbe..eb21aabf8339 100644 --- a/tests/static/e2e/incidents-table.spec.ts +++ b/tests/static/e2e/incidents-table.spec.ts @@ -5,7 +5,7 @@ test.describe("Authenticated Dispatch App", () => { test.beforeEach(async ({ authPage }) => { await register(authPage) }), - test("The edit list should appear after clicking the incident edit kebab.", async ({ + test("The edit list should appear after clicking the incident edit kebab.", async ({ page, incidentsPage, }) => { await incidentsPage.goto() From 6df78febc786f12596e0dc447de98bef0ffc7861 Mon Sep 17 00:00:00 2001 From: David Whittaker <84562015+whitdog47@users.noreply.github.com> Date: Fri, 22 Nov 2024 14:21:30 -0800 Subject: [PATCH 12/13] feat(slack): remove signal text from manual mfa engage and add user to channel (#5506) --- .../dispatch_slack/case/interactive.py | 75 ++++++++++++------- .../plugins/dispatch_slack/case/messages.py | 22 +++--- 2 files changed, 59 insertions(+), 38 deletions(-) diff --git a/src/dispatch/plugins/dispatch_slack/case/interactive.py b/src/dispatch/plugins/dispatch_slack/case/interactive.py index 0e87c13a0fce..5103848d790a 100644 --- a/src/dispatch/plugins/dispatch_slack/case/interactive.py +++ b/src/dispatch/plugins/dispatch_slack/case/interactive.py @@ -34,6 +34,7 @@ from dispatch.event import service as event_service from dispatch.exceptions import ExistsError from dispatch.individual.models import IndividualContactRead +from dispatch.participant import flows as participant_flows from dispatch.participant import service as participant_service from dispatch.participant.models import ParticipantUpdate from dispatch.participant_role import service as participant_role_service @@ -72,7 +73,6 @@ entity_select, incident_priority_select, incident_type_select, - participant_select, project_select, relative_date_picker_input, resolution_input, @@ -353,7 +353,6 @@ def handle_engage_user_command( """Handles engage user command.""" ack() - case = case_service.get(db_session=db_session, case_id=context["subject"].id) default_engagement = "We'd like to verify your identity. Can you please confirm this is you?" blocks = [ @@ -364,7 +363,7 @@ def handle_engage_user_command( ) ] ), - participant_select(label="Person to engage", participants=case.participants), + assignee_select(label="Person to engage", placeholder="Select user"), description_input(label="Engagement text", initial_value=default_engagement), ] @@ -402,14 +401,26 @@ def engage( """Handles the engage user action.""" ack() - if form_data.get(DefaultBlockIds.participant_select): - participant_id = form_data[DefaultBlockIds.participant_select]["value"] - participant = participant_service.get(db_session=db_session, participant_id=participant_id) - if participant: - user_email = participant.individual.email - else: - log.error(f"Participant not found for id {participant_id} when trying to engage user") - return + case = case_service.get(db_session=db_session, case_id=context["subject"].id) + if not case: + log.error("Case not found when trying to engage user") + return + + if form_data.get(DefaultBlockIds.case_assignee_select): + user_email = client.users_info( + user=form_data[DefaultBlockIds.case_assignee_select]["value"] + )["user"]["profile"]["email"] + conversation_flows.add_case_participants(case, [user_email], db_session) + participant = participant_service.get_by_case_id_and_email( + db_session=db_session, case_id=case.id, email=user_email + ) + if not participant: + participant_flows.add_participant( + user_email, + case, + db_session, + roles=[ParticipantRoleType.participant], + ) else: return @@ -419,8 +430,6 @@ def engage( log.warning("Engagement text not found") return - case = case_service.get(db_session=db_session, case_id=context["subject"].id) - user = client.users_lookupByEmail(email=user_email) result = client.chat_postMessage( @@ -1906,12 +1915,12 @@ def handle_resolve_submission_event( case_id=updated_case.id, previous_case=previous_case, db_session=db_session, - reporter_email=updated_case.reporter.individual.email - if updated_case.reporter - else None, - assignee_email=updated_case.assignee.individual.email - if updated_case.assignee - else None, + reporter_email=( + updated_case.reporter.individual.email if updated_case.reporter else None + ), + assignee_email=( + updated_case.assignee.individual.email if updated_case.assignee else None + ), organization_slug=context["subject"].organization_slug, ) except Exception as e: @@ -2423,6 +2432,9 @@ def handle_engagement_submission_event( mfa_plugin = plugin_service.get_active_instance( db_session=db_session, project_id=context["subject"].project_id, plugin_type="auth-mfa" ) + if not mfa_plugin: + log.error("Unable to engage user. No enabled MFA plugin found.") + return require_mfa = engagement.require_mfa if engagement else True mfa_enabled = True if mfa_plugin and require_mfa else False @@ -2532,14 +2544,23 @@ def send_engagement_response( if response == MfaChallengeStatus.APPROVED: # We only update engagement message (which removes Confirm/Deny button) for success # this allows the user to retry the confirmation if the MFA check failed - blocks = create_signal_engagement_message( - case=case, - channel_id=case.conversation.channel_id, - engagement=engagement, - signal_instance=signal_instance, - user_email=engaged_user, - engagement_status=engagement_status, - ) + if not engagement: + # assume the message is from a manual MFA challenge + blocks = create_manual_engagement_message( + case=case, + channel_id=case.conversation.channel_id, + user_email=engaged_user, + engagement_status=engagement_status, + ) + else: + blocks = create_signal_engagement_message( + case=case, + channel_id=case.conversation.channel_id, + engagement=engagement, + signal_instance=signal_instance, + user_email=engaged_user, + engagement_status=engagement_status, + ) if signal_instance: client.chat_update( blocks=blocks, diff --git a/src/dispatch/plugins/dispatch_slack/case/messages.py b/src/dispatch/plugins/dispatch_slack/case/messages.py index 50d5c0f31e47..963b0f3f6cc6 100644 --- a/src/dispatch/plugins/dispatch_slack/case/messages.py +++ b/src/dispatch/plugins/dispatch_slack/case/messages.py @@ -454,21 +454,20 @@ def create_signal_engagement_message( def create_manual_engagement_message( case: Case, channel_id: str, - engagement: str, user_email: str, - user_id: str, engagement_status: SignalEngagementStatus = SignalEngagementStatus.new, + user_id: str = "", + engagement: str = "", thread_ts: str = None, ) -> list[Block]: """ - Generate a list of blocks for a signal engagement message. + Generate a list of blocks for a manual engagement message. Args: - case (Case): The case object related to the signal instance. + case (Case): The case object related to the engagement. channel_id (str): The ID of the Slack channel where the message will be sent. - message (str): Additional context information to include in the message. + engagement_message (str): The engagement text. user_email (str): The email of the user being engaged. - engagement (str): The engagement text. Returns: list[Block]: A list of blocks representing the message structure for the engagement message. @@ -486,11 +485,12 @@ def create_manual_engagement_message( ).json() username, _ = user_email.split("@") - blocks = [ - Section( - text=f"<@{user_id}>: {engagement if engagement else 'No context provided for this alert.'}" - ), - ] + if engagement: + blocks = [ + Section(text=f"<@{user_id}>: {engagement}"), + ] + else: + blocks = [] if engagement_status == SignalEngagementStatus.new: blocks.extend( From 274aa0fb488f55971c4653b72fd757e664a462f6 Mon Sep 17 00:00:00 2001 From: David Whittaker <84562015+whitdog47@users.noreply.github.com> Date: Fri, 22 Nov 2024 14:56:36 -0800 Subject: [PATCH 13/13] fix(slack): ensure only one slash in tags (#5528) --- src/dispatch/plugins/dispatch_slack/incident/interactive.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dispatch/plugins/dispatch_slack/incident/interactive.py b/src/dispatch/plugins/dispatch_slack/incident/interactive.py index 92a4651a7b05..a27253e04600 100644 --- a/src/dispatch/plugins/dispatch_slack/incident/interactive.py +++ b/src/dispatch/plugins/dispatch_slack/incident/interactive.py @@ -249,6 +249,11 @@ def handle_tag_search_action( } if "/" in query_str: + # first check to make sure there's only one slash + if query_str.count("/") > 1: + ack() + return + tag_type, query_str = query_str.split("/") filter_spec["and"].append( {"model": "TagType", "op": "==", "field": "name", "value": tag_type}