Skip to content

Commit

Permalink
Merge branch 'master' into enhancement/refactor-case-cost-model
Browse files Browse the repository at this point in the history
  • Loading branch information
metroid-samus authored Dec 16, 2024
2 parents d310d66 + d4cef1b commit de05a87
Show file tree
Hide file tree
Showing 98 changed files with 1,863 additions and 552 deletions.
20 changes: 1 addition & 19 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,11 @@
"files.trimFinalNewlines": true,
"files.insertFinalNewline": true,
"vetur.format.enable": false,
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"--line-length",
"100"
],
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": [
"--ignore=E24,W504,E501",
"--verbose"
],
"python.testing.pytestEnabled": true,
"python.sortImports.args": [
"--settings-path",
"${workspaceFolder}/setup.cfg"
],
"python.linting.pylintArgs": [
"--rcfile",
"${workspaceFolder}/setup.cfg"
],
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "never"
}
},
"codeQL.githubDatabase.update": "never",
}
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.13.0-slim-bullseye as sdist
FROM python:3.11.10-slim-bullseye as sdist

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.title="Dispatch PyPI Wheel"
Expand Down Expand Up @@ -56,7 +56,7 @@ RUN YARN_CACHE_FOLDER="$(mktemp -d)" \
&& mv /usr/src/dispatch/dist /dist

# This is the image to be run
FROM python:3.13.0-slim-bullseye
FROM python:3.11.10-slim-bullseye

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.title="Dispatch"
Expand Down
22 changes: 22 additions & 0 deletions docs/docs/administration/settings/server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,28 @@ Make sure the reverse proxy strips this header from incoming requests (i.e. user

> The HTTP request header to use as the user name, this value is case-insensitive.
#### Configuration for `dispatch-auth-provider-aws-alb`

> Authenticate users based on [AWS Application Load Balancer authenticate](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-authenticate-users.html).
#### `DISPATCH_AUTHENTICATION_PROVIDER_AWS_ALB_ARN`

> ARN of your Load Balancer, used to validate the signer.
> The format is `arn:aws:elasticloadbalancing:region-code:account-id:loadbalancer/app/load-balancer-name/load-balancer-id`.
> This is required when using the `dispatch-auth-provider-aws-alb` auth provider.
#### `DISPATCH_AUTHENTICATION_PROVIDER_AWS_ALB_EMAIL_CLAIM` \['default': email\]

> Override where Dispatch should find the user email in the users claims.
#### `DISPATCH_AUTHENTICATION_PROVIDER_AWS_ALB_PUBLIC_KEY_CACHE_SECONDS` \['default': 300\]

> Override how long Dispatch should cache the public key, used to validate the payload.
:::info
Add a ALB listener action without authenticate for `/api/v1/{organization}/events/*` if you want plugins to be public. Plugins determine their own authentication.
:::

### Persistence

#### `DATABASE_HOSTNAME`
Expand Down
7 changes: 4 additions & 3 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ const config: PlaywrightTestConfig = {
screenshot: "on",
},
/* Maximum time one test can run for. */
timeout: 100 * 1000,
timeout: 200 * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 10000,
timeout: 20000,
},
/* Run tests in files in parallel */
fullyParallel: true,
Expand Down
1 change: 1 addition & 0 deletions requirements-base.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jinja2
jira==2.0.0
joblib
jsonpath_ng
lxml==5.3.0
markdown
msal
numpy
Expand Down
24 changes: 12 additions & 12 deletions requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ aiofiles==24.1.0
# via -r requirements-base.in
aiohappyeyeballs==2.4.3
# via aiohttp
aiohttp==3.11.6
aiohttp==3.11.10
# via -r requirements-base.in
aiosignal==1.3.1
# via aiohttp
Expand Down Expand Up @@ -118,15 +118,15 @@ email-validator==2.2.0
# via -r requirements-base.in
emails==0.6
# via -r requirements-base.in
fastapi==0.115.5
fastapi==0.115.6
# via -r requirements-base.in
frozenlist==1.5.0
# via
# aiohttp
# aiosignal
google-api-core==2.22.0
# via google-api-python-client
google-api-python-client==2.154.0
google-api-python-client==2.155.0
# via -r requirements-base.in
google-auth==2.36.0
# via
Expand Down Expand Up @@ -154,7 +154,7 @@ httplib2==0.22.0
# google-api-python-client
# google-auth-httplib2
# oauth2client
httpx==0.27.2
httpx==0.28.1
# via
# -r requirements-base.in
# openai
Expand Down Expand Up @@ -209,6 +209,7 @@ limits==3.13.0
# via slowapi
lxml==5.3.0
# via
# -r requirements-base.in
# emails
# premailer
mako==1.3.6
Expand Down Expand Up @@ -256,7 +257,7 @@ oauthlib[signedtoken]==3.2.2
# atlassian-python-api
# jira
# requests-oauthlib
openai==1.54.4
openai==1.57.4
# via -r requirements-base.in
packaging==24.2
# via
Expand Down Expand Up @@ -300,7 +301,7 @@ protobuf==4.23.4
# proto-plus
psycopg2-binary==2.9.10
# via -r requirements-base.in
pyarrow==18.0.0
pyarrow==18.1.0
# via -r requirements-base.in
pyasn1==0.6.1
# via
Expand Down Expand Up @@ -353,7 +354,7 @@ python-dateutil==2.9.0.post0
# pandas
python-jose==3.3.0
# via -r requirements-base.in
python-multipart==0.0.17
python-multipart==0.0.19
# via -r requirements-base.in
python-slugify==8.0.4
# via -r requirements-base.in
Expand Down Expand Up @@ -423,9 +424,9 @@ six==1.16.0
# python-dateutil
# sqlalchemy-filters
# validators
slack-bolt==1.21.2
slack-bolt==1.21.3
# via -r requirements-base.in
slack-sdk==3.33.4
slack-sdk==3.33.5
# via
# -r requirements-base.in
# slack-bolt
Expand All @@ -436,11 +437,10 @@ smart-open==7.0.5
sniffio==1.3.1
# via
# anyio
# httpx
# openai
sortedcontainers==2.4.0
# via hypothesis
spacy==3.8.2
spacy==3.8.3
# via -r requirements-base.in
spacy-legacy==3.0.12
# via spacy
Expand Down Expand Up @@ -510,7 +510,7 @@ urllib3==2.2.3
# pdpyras
# requests
# sentry-sdk
uvicorn==0.32.1
uvicorn==0.34.0
# via -r requirements-base.in
uvloop==0.21.0
# via -r requirements-base.in
Expand Down
2 changes: 2 additions & 0 deletions requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ black
click
coverage
devtools
easydict
factory-boy
faker
ipython
pre-commit
pytest==7.4.4
pytest-mock
ruff
vulture
16 changes: 11 additions & 5 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,23 @@ click==8.1.7
# via
# -r requirements-dev.in
# black
coverage==7.6.7
coverage==7.6.9
# via -r requirements-dev.in
decorator==5.1.1
# via ipython
devtools==0.12.2
# via -r requirements-dev.in
distlib==0.3.9
# via virtualenv
easydict==1.13
# via -r requirements-dev.in
executing==2.1.0
# via
# devtools
# stack-data
factory-boy==3.3.1
# via -r requirements-dev.in
faker==33.0.0
faker==33.1.0
# via
# -r requirements-dev.in
# factory-boy
Expand All @@ -42,7 +44,7 @@ identify==2.6.1
# via pre-commit
iniconfig==2.0.0
# via pytest
ipython==8.29.0
ipython==8.30.0
# via -r requirements-dev.in
jedi==0.19.1
# via ipython
Expand Down Expand Up @@ -81,12 +83,16 @@ pygments==2.18.0
# devtools
# ipython
pytest==7.4.4
# via
# -r requirements-dev.in
# pytest-mock
pytest-mock==3.14.0
# via -r requirements-dev.in
python-dateutil==2.9.0.post0
# via faker
pyyaml==6.0.2
# via pre-commit
ruff==0.7.4
ruff==0.8.3
# via -r requirements-dev.in
six==1.16.0
# via
Expand All @@ -104,7 +110,7 @@ typing-extensions==4.12.2
# ipython
virtualenv==20.27.1
# via pre-commit
vulture==2.13
vulture==2.14
# via -r requirements-dev.in
wcwidth==0.2.13
# via prompt-toolkit
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ def run(self):
"dispatch_atlassian_confluence = dispatch.plugins.dispatch_atlassian_confluence.plugin:ConfluencePagePlugin",
"dispatch_atlassian_confluence_document = dispatch.plugins.dispatch_atlassian_confluence.docs.plugin:ConfluencePageDocPlugin",
"dispatch_aws_sqs = dispatch.plugins.dispatch_aws.plugin:AWSSQSSignalConsumerPlugin",
"dispatch_aws_alb_auth = dispatch.plugins.dispatch_core.plugin:AwsAlbAuthProviderPlugin",
"dispatch_auth_mfa = dispatch.plugins.dispatch_core.plugin:DispatchMfaPlugin",
"dispatch_basic_auth = dispatch.plugins.dispatch_core.plugin:BasicAuthProviderPlugin",
"dispatch_contact = dispatch.plugins.dispatch_core.plugin:DispatchContactPlugin",
Expand Down
6 changes: 3 additions & 3 deletions src/dispatch/case/messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,9 @@ def send_case_welcome_participant_message(
"assignee_fullname": case.assignee.individual.name,
"assignee_team": case.assignee.team,
"assignee_weblink": case.assignee.individual.weblink,
"reporter_fullname": case.reporter.individual.name,
"reporter_team": case.reporter.team,
"reporter_weblink": case.reporter.individual.weblink,
"reporter_fullname": case.reporter.individual.name if case.reporter else None,
"reporter_team": case.reporter.team if case.reporter else None,
"reporter_weblink": case.reporter.individual.weblink if case.reporter else None,
"document_weblink": resolve_attr(case, "case_document.weblink"),
"storage_weblink": resolve_attr(case, "storage.weblink"),
"ticket_weblink": resolve_attr(case, "ticket.weblink"),
Expand Down
Loading

0 comments on commit de05a87

Please sign in to comment.