diff --git a/requirements-base.txt b/requirements-base.txt index 857688fbc7df..57a0608dedb6 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.0.1 +bcrypt==4.1.1 # via -r requirements-base.in blis==0.7.10 # via thinc @@ -246,7 +246,7 @@ oauthlib[signedtoken]==3.2.2 # atlassian-python-api # jira # requests-oauthlib -openai==1.3.5 +openai==1.3.6 # via -r requirements-base.in packaging==23.1 # via @@ -375,13 +375,13 @@ s3transfer==0.7.0 # via boto3 schedule==1.2.1 # via -r requirements-base.in -schemathesis==3.21.1 +schemathesis==3.21.2 # via -r requirements-base.in scipy==1.11.2 # via statsmodels sentry-asgi==0.2.0 # via -r requirements-base.in -sentry-sdk==1.37.1 +sentry-sdk==1.38.0 # via # -r requirements-base.in # sentry-asgi @@ -418,6 +418,7 @@ sniffio==1.3.0 # anyio # httpcore # httpx + # openai sortedcontainers==2.4.0 # via hypothesis spacy==3.7.2 diff --git a/src/dispatch/case/models.py b/src/dispatch/case/models.py index a423c99b2860..349aa82618b4 100644 --- a/src/dispatch/case/models.py +++ b/src/dispatch/case/models.py @@ -182,12 +182,11 @@ class SignalRead(DispatchBase): class SignalInstanceRead(DispatchBase): - signal: SignalRead + created_at: datetime entities: Optional[List[EntityRead]] = [] - tags: Optional[List[TagRead]] = [] raw: Any - fingerprint: Optional[str] - created_at: datetime + signal: SignalRead + tags: Optional[List[TagRead]] = [] class ProjectRead(DispatchBase): diff --git a/src/dispatch/database/revisions/tenant/versions/2023-11-29_580a18ec4c39.py b/src/dispatch/database/revisions/tenant/versions/2023-11-29_580a18ec4c39.py new file mode 100644 index 000000000000..77270583353a --- /dev/null +++ b/src/dispatch/database/revisions/tenant/versions/2023-11-29_580a18ec4c39.py @@ -0,0 +1,30 @@ +"""Removes unused fingerprint column from signal instance model + +Revision ID: 580a18ec4c39 +Revises: bdaeabba3e53 +Create Date: 2023-11-29 15:40:12.524085 + +""" +from alembic import op +import sqlalchemy as sa + +# revision identifiers, used by Alembic. +revision = "580a18ec4c39" +down_revision = "bdaeabba3e53" +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column("signal_instance", "fingerprint") + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column( + "signal_instance", + sa.Column("fingerprint", sa.VARCHAR(), autoincrement=False, nullable=True), + ) + # ### end Alembic commands ### diff --git a/src/dispatch/signal/models.py b/src/dispatch/signal/models.py index 87371134cee4..e558810a346f 100644 --- a/src/dispatch/signal/models.py +++ b/src/dispatch/signal/models.py @@ -229,7 +229,6 @@ class SignalInstance(Base, TimeStampMixin, ProjectMixin): case_type = relationship("CaseType", backref="signal_instances") case_priority_id = Column(Integer, ForeignKey(CasePriority.id)) case_priority = relationship("CasePriority", backref="signal_instances") - fingerprint = Column(String) filter_action = Column(String) canary = Column(Boolean, default=False) raw = Column(JSONB) @@ -381,7 +380,6 @@ class SignalInstanceCreate(SignalInstanceBase): class SignalInstanceRead(SignalInstanceBase): id: uuid.UUID - fingerprint: Optional[str] signal: SignalRead diff --git a/src/dispatch/static/dispatch/package-lock.json b/src/dispatch/static/dispatch/package-lock.json index 0b69cfe90b29..3e63e2b9f6d2 100644 --- a/src/dispatch/static/dispatch/package-lock.json +++ b/src/dispatch/static/dispatch/package-lock.json @@ -523,66 +523,66 @@ } }, "node_modules/@formkit/core": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@formkit/core/-/core-1.3.0.tgz", - "integrity": "sha512-g1Cx5US+uYai7PpixGSkJuFgKSEK++7R2xw6im8NuD9YaDQl7jg93yjJoRSHFS+I61xaEstViCrmquNFIcUYBA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@formkit/core/-/core-1.3.2.tgz", + "integrity": "sha512-sqspEsp4CnS9cx+HWWZhN91dYyQB2Mgrhtp5tVPHPiNDpS7Wvl1L9xI/6iUc3rXxH0YhHQ8ptyLIQKO2vNpfGg==", "dependencies": { - "@formkit/utils": "1.3.0" + "@formkit/utils": "1.3.2" } }, "node_modules/@formkit/dev": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@formkit/dev/-/dev-1.3.0.tgz", - "integrity": "sha512-Q/MBTGG8Jd5ZlqnQq02EdvH5UIVWPxzJTep+IzqLkPUFspZhMtCU8YV/kEm1QxXntLdFxjQtmjzYHrsuul0dPA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@formkit/dev/-/dev-1.3.2.tgz", + "integrity": "sha512-uv0mbRpOSEQ5cIvtLng5z6IaDcQo3jW6+H6XPzR+qi11qbGQfl3JOOeLRg1caBVxc2VlUEf1ik2pFfgALb48HQ==", "dependencies": { - "@formkit/core": "1.3.0", - "@formkit/utils": "1.3.0" + "@formkit/core": "1.3.2", + "@formkit/utils": "1.3.2" } }, "node_modules/@formkit/i18n": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@formkit/i18n/-/i18n-1.3.0.tgz", - "integrity": "sha512-nHMLIWxM9J9o3p94wQwhvWOqz/JtNCxErpuD2bKTxQP5DTwHkYfF0ajHclT/8FdHXx5a9+VhiI7mD9rVCtcdBA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@formkit/i18n/-/i18n-1.3.2.tgz", + "integrity": "sha512-fUp8DXTMcuQh0tR09Lmg1lAgXpVaocahGfYDOGgc5luUAy2MYKi7HXsvAoz3JP7wybwLs31W1LA+bLR26HIAjw==", "dependencies": { - "@formkit/core": "1.3.0", - "@formkit/utils": "1.3.0", - "@formkit/validation": "1.3.0" + "@formkit/core": "1.3.2", + "@formkit/utils": "1.3.2", + "@formkit/validation": "1.3.2" } }, "node_modules/@formkit/inputs": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@formkit/inputs/-/inputs-1.3.0.tgz", - "integrity": "sha512-LlaBjbBCKLt3S1LtalU+j45LWm+y5uy3uwgC+lH5iBosmPfqm5b7Hzok82QyTvaSBIx8CyYIunVlGKK++mmtlg==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@formkit/inputs/-/inputs-1.3.2.tgz", + "integrity": "sha512-Z8f3S5j/r7+RS4zexon1mMJbSmqchYtFxAJ7ROJTkA0CA9gA7hwlPAQHmA/+2Tc1PWIexGJEBCqI5IL8gCGCBA==", "dependencies": { - "@formkit/core": "1.3.0", - "@formkit/utils": "1.3.0" + "@formkit/core": "1.3.2", + "@formkit/utils": "1.3.2" } }, "node_modules/@formkit/observer": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@formkit/observer/-/observer-1.3.0.tgz", - "integrity": "sha512-u85sIeacLlqiOFYwgozRADd5QCmj6+wuh1wPDPIfdi1+dSWQR1y0RmSRgOUXxRfz0xA/hQK15zr80s8jRpcqxA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@formkit/observer/-/observer-1.3.2.tgz", + "integrity": "sha512-vyBVUUA5JBXfh/3WHKr04z51IYt0FU3ZucR3Us/P0Vr1eFXTnaRaiBTGiBwD39xdi5iBWvSEfpvM8lpwHjh/OA==", "dependencies": { - "@formkit/core": "1.3.0", - "@formkit/utils": "1.3.0" + "@formkit/core": "1.3.2", + "@formkit/utils": "1.3.2" } }, "node_modules/@formkit/rules": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@formkit/rules/-/rules-1.3.0.tgz", - "integrity": "sha512-dWMLnSRK5+ffRkLIWGDojM7eXT6rheI41lVWukcJXhr5avG4AMih0tCLjhLJkVrLERRbnkAD403FGg8JVzPMtw==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@formkit/rules/-/rules-1.3.2.tgz", + "integrity": "sha512-7sD/S9Rdn6z8RRplKI/Q42duV5085HRRAc15rQwvuxzL9oBhUnu2MXHJWyp+pxBJnuoAqFO0TssSHTVMWIydWA==", "dependencies": { - "@formkit/core": "1.3.0", - "@formkit/utils": "1.3.0", - "@formkit/validation": "1.3.0" + "@formkit/core": "1.3.2", + "@formkit/utils": "1.3.2", + "@formkit/validation": "1.3.2" } }, "node_modules/@formkit/themes": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@formkit/themes/-/themes-1.3.0.tgz", - "integrity": "sha512-y9YRhCjYbsgs1piuGaZYgcbXtcsfZqvdeMVM2vypppNdFskx1dhFdaXNDLZf1K2HL6vvx8cJ3AAxay35SAZmtQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@formkit/themes/-/themes-1.3.2.tgz", + "integrity": "sha512-rKa/pL0x6WUyWDox7PfvWvQgJQu3AsuQ30lyd1u848Wmq3LX61IeMx/mg1kYdG2ZOu6V4K07vAVBbDRpPd/UGQ==", "dependencies": { - "@formkit/core": "1.3.0" + "@formkit/core": "1.3.2" }, "peerDependencies": { "tailwindcss": "^3.2.0", @@ -601,38 +601,75 @@ } } }, + "node_modules/@formkit/themes/node_modules/@formkit/core": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@formkit/core/-/core-1.3.2.tgz", + "integrity": "sha512-sqspEsp4CnS9cx+HWWZhN91dYyQB2Mgrhtp5tVPHPiNDpS7Wvl1L9xI/6iUc3rXxH0YhHQ8ptyLIQKO2vNpfGg==", + "dependencies": { + "@formkit/utils": "1.3.2" + } + }, + "node_modules/@formkit/themes/node_modules/@formkit/utils": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@formkit/utils/-/utils-1.3.2.tgz", + "integrity": "sha512-L7ltaR5vV5NK6H4NKYx8xZ85l60TutgvQHv95B7ncj9pDNUUqKK9H56zkYFXPpCQhtKU/UbK19NNOuKI0OVfkw==" + }, "node_modules/@formkit/utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@formkit/utils/-/utils-1.3.0.tgz", - "integrity": "sha512-0r6/7q40FqHj7800xCVqLvcssGxXDPzgSXrSTRH6XV9tZcycZDvF5Wy+8sJtK6ZgjgOWB2gg86x+8WlZvYv7lg==" + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@formkit/utils/-/utils-1.3.2.tgz", + "integrity": "sha512-L7ltaR5vV5NK6H4NKYx8xZ85l60TutgvQHv95B7ncj9pDNUUqKK9H56zkYFXPpCQhtKU/UbK19NNOuKI0OVfkw==" }, "node_modules/@formkit/validation": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@formkit/validation/-/validation-1.3.0.tgz", - "integrity": "sha512-U3R1HbF7BEvTlzZxQhNu14Q8DEh9WT9QazSuq9qJNFibB9TmWDy7OT7u5CD69ZrQFedg6NCJU3DRgS9IKuYyiQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@formkit/validation/-/validation-1.3.2.tgz", + "integrity": "sha512-j1lcLHtxV4B2O23ot+S/y5tmL8eqjTYkRMVuTsI9qzQ8xdLcAJSu+KCdO+qL1c2czQ4W1R6e9vhhw0WKk+C3ug==", "dependencies": { - "@formkit/core": "1.3.0", - "@formkit/observer": "1.3.0", - "@formkit/utils": "1.3.0" + "@formkit/core": "1.3.2", + "@formkit/observer": "1.3.2", + "@formkit/utils": "1.3.2" } }, "node_modules/@formkit/vue": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@formkit/vue/-/vue-1.3.0.tgz", - "integrity": "sha512-4MM5qhFlOktJWta7cTG2H+PI8Z8Fm2YH+R3tcPnNEXM+KLLig5Xiy99Aaf3Xef5lR/ZXQdoSCJyT3OUd6V4eTA==", - "dependencies": { - "@formkit/core": "1.3.0", - "@formkit/dev": "1.3.0", - "@formkit/i18n": "1.3.0", - "@formkit/inputs": "1.3.0", - "@formkit/observer": "1.3.0", - "@formkit/rules": "1.3.0", - "@formkit/themes": "1.3.0", - "@formkit/utils": "1.3.0", - "@formkit/validation": "1.3.0", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@formkit/vue/-/vue-1.3.2.tgz", + "integrity": "sha512-6QZD90xx7u1zjrWkplsnYTA0McYlWU8VNu0A6hiPZZF6F+xDUSL/en+V14RgIz6NIrdycUI44taRwmI27/8cjQ==", + "dependencies": { + "@formkit/core": "1.3.2", + "@formkit/dev": "1.3.2", + "@formkit/i18n": "1.3.2", + "@formkit/inputs": "1.3.2", + "@formkit/observer": "1.3.2", + "@formkit/rules": "1.3.2", + "@formkit/themes": "1.3.2", + "@formkit/utils": "1.3.2", + "@formkit/validation": "1.3.2", "vue": "^3.3.4" } }, + "node_modules/@formkit/vue/node_modules/@formkit/themes": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@formkit/themes/-/themes-1.3.0.tgz", + "integrity": "sha512-y9YRhCjYbsgs1piuGaZYgcbXtcsfZqvdeMVM2vypppNdFskx1dhFdaXNDLZf1K2HL6vvx8cJ3AAxay35SAZmtQ==", + "dependencies": { + "@formkit/core": "1.3.0" + }, + "peerDependencies": { + "tailwindcss": "^3.2.0", + "unocss": "^0.31.0", + "windicss": "^3.0.0" + }, + "peerDependenciesMeta": { + "tailwindcss": { + "optional": true + }, + "unocss": { + "optional": true + }, + "windicss": { + "optional": true + } + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.13", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", @@ -758,12 +795,12 @@ } }, "node_modules/@playwright/test": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.0.tgz", - "integrity": "sha512-PdW+kn4eV99iP5gxWNSDQCbhMaDVej+RXL5xr6t04nbKLCBwYtA046t7ofoczHOm8u6c+45hpDKQVZqtqwkeQg==", + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.1.tgz", + "integrity": "sha512-EaaawMTOeEItCRvfmkI9v6rBkF1svM8wjl/YPRrg2N2Wmp+4qJYkWtJsbew1szfKKDm6fPLy4YAanBhIlf9dWw==", "dev": true, "dependencies": { - "playwright": "1.40.0" + "playwright": "1.40.1" }, "bin": { "playwright": "cli.js" @@ -4876,12 +4913,12 @@ } }, "node_modules/playwright": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.0.tgz", - "integrity": "sha512-gyHAgQjiDf1m34Xpwzaqb76KgfzYrhK7iih+2IzcOCoZWr/8ZqmdBw+t0RU85ZmfJMgtgAiNtBQ/KS2325INXw==", + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz", + "integrity": "sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==", "dev": true, "dependencies": { - "playwright-core": "1.40.0" + "playwright-core": "1.40.1" }, "bin": { "playwright": "cli.js" @@ -4894,9 +4931,9 @@ } }, "node_modules/playwright-core": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.0.tgz", - "integrity": "sha512-fvKewVJpGeca8t0ipM56jkVSU6Eo0RmFvQ/MaCQNDYm+sdvKkMBBWTE1FdeMqIdumRaXXjZChWHvIzCGM/tA/Q==", + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.1.tgz", + "integrity": "sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==", "dev": true, "bin": { "playwright-core": "cli.js" diff --git a/tests/factories.py b/tests/factories.py index bb39718abbc6..7b8291e5699a 100644 --- a/tests/factories.py +++ b/tests/factories.py @@ -831,7 +831,6 @@ class SignalInstanceFactory(BaseFactory): id = LazyFunction(uuid.uuid4) project = SubFactory(ProjectFactory) case = SubFactory(CaseFactory) - fingerprint = fake.md5() signal = SubFactory(SignalFactory) raw = { "action": [{"type": "AWS_API_CALL", "value": {"Api": "assumerole", "ServiceName": "sts"}}],