Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to upstream v0.5.15 #9

Closed
wants to merge 106 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
8f26728
update command keys (#2271)
pablodanswer Aug 30, 2024
1835690
Minor search UX improvements + Critical connector fixes (#2259)
pablodanswer Aug 30, 2024
e2f4145
add better spacing (#2265)
pablodanswer Aug 30, 2024
b952dbe
Minor search formatting updates (#2276)
pablodanswer Aug 30, 2024
f2e8680
Account for edge case in indexing times with connectors #2190 (#2190)
pablodanswer Aug 30, 2024
44c45cb
Minor simplification to chat header (#2277)
pablodanswer Aug 30, 2024
4181124
add metadata to pdf extraction (#2278)
pablodanswer Aug 30, 2024
df31cac
allow users to deselect reranking (#2243)
pablodanswer Aug 30, 2024
762b7b1
Connector tests (#2273)
Weves Aug 30, 2024
355326f
Added frontend logical polish (#2274)
hagen-danswer Aug 30, 2024
21af852
Add connector creation docs
Weves Aug 30, 2024
5800c71
Add typing to pdf extraction (#2280)
pablodanswer Aug 31, 2024
76db4b7
Detect GPU on startup for default multi-pass indexing value (#2242)
pablodanswer Aug 31, 2024
f01027c
Catch LLM Eval Failures (#2272)
yuhongsun96 Aug 31, 2024
580848c
mypy (#2283)
yuhongsun96 Aug 31, 2024
634de83
Very minor update to divider logic (#2287)
pablodanswer Aug 31, 2024
8d443ad
Integration tests (#2256)
hagen-danswer Sep 1, 2024
a96cea2
logging improvements
hagen-danswer Sep 1, 2024
f871b4c
Update default anthropic / bedrock models
Weves Sep 2, 2024
c122be2
More explicit Confluence Connector (#2289)
pablodanswer Sep 2, 2024
aa84846
Connector deletion fix (#2293)
hagen-danswer Sep 2, 2024
910821c
Ordered indexing status (#2292)
pablodanswer Sep 2, 2024
299cb50
Add litellm proxy embeddings (#2291)
pablodanswer Sep 2, 2024
32e551b
Vespa Log No Response (#2295)
yuhongsun96 Sep 2, 2024
0027f16
Fix revisions
Weves Sep 2, 2024
14a9fec
update code block (#2297)
pablodanswer Sep 2, 2024
033ec0b
Remove unused env variables (#2299)
Weves Sep 2, 2024
2b14afe
Add proper typing such that tests pass mypy (#2301)
pablodanswer Sep 2, 2024
d988a3e
Productboard Minor Fix (#2303)
yuhongsun96 Sep 2, 2024
abe0114
Update CONTRIBUTING.md (#2298)
rkuo-danswer Sep 2, 2024
812ca69
Vespa Degraded Handling (#2304)
yuhongsun96 Sep 2, 2024
6afcaaf
Continue Generating (#2286)
pablodanswer Sep 2, 2024
90528ba
k
yuhongsun96 Sep 3, 2024
39c9465
Fix deletion due to foreign key issue
Weves Sep 3, 2024
7520fae
Add back test
Weves Sep 3, 2024
a3b1b1d
fixed doc set table (#2306)
hagen-danswer Sep 3, 2024
5b1f3c8
Formatting nits (#2311)
pablodanswer Sep 3, 2024
af66650
fail safely if lookup for document fails (#2309)
rkuo-danswer Sep 3, 2024
fb95398
Cleaner stream handling in Answer class (#2314)
pablodanswer Sep 3, 2024
5da6d79
Add ingestion as a "Source" for the FE + improve typing (#2312)
Weves Sep 3, 2024
32359d2
Add user dropdown seed-able list (#2308)
pablodanswer Sep 3, 2024
f96bd12
prevent accidental submission (#2318)
pablodanswer Sep 3, 2024
ebce3ff
added wait for sync after creating document set in tests (#2319)
hagen-danswer Sep 4, 2024
d68d281
Slight copy update (#2322)
yuhongsun96 Sep 4, 2024
0ff1a02
Minor search setting clarity (#2300)
pablodanswer Sep 4, 2024
2b7915f
Update Connector README PATH (#2323)
yuhongsun96 Sep 4, 2024
c358c91
Added instance domain to telemetry (#2310)
hagen-danswer Sep 4, 2024
630e224
fixing a race condition in celery task wrapper. could randomly blow u…
rkuo-danswer Sep 4, 2024
34ba318
Update auth for litellm proxy (#2316)
pablodanswer Sep 4, 2024
e4c8535
made connectors summary page faster (#2320)
hagen-danswer Sep 4, 2024
61a1731
rename directory if needed
pablodanswer Sep 4, 2024
420aabc
Update UX (#2324)
pablodanswer Sep 5, 2024
04f83eb
Proper popover behavior, no showing queries with no docs, + bubbles (…
pablodanswer Sep 5, 2024
ebe3674
update for edge case (#2336)
pablodanswer Sep 5, 2024
2d7b312
harden indexing-status endpoint against db changes happening in the b…
rkuo-danswer Sep 5, 2024
2bd3833
Update search settings + chat/search handling (#2333)
pablodanswer Sep 6, 2024
69c0419
Updated refreshing (#2327)
pablodanswer Sep 6, 2024
8977b1b
Paginate connector page (#2328)
hagen-danswer Sep 6, 2024
aeb6060
Add ability to delete users (#2342)
pablodanswer Sep 6, 2024
2933c35
first cut at redis (#2226)
rkuo-danswer Sep 6, 2024
5abf67f
PDF metadata + list defaults (#2341)
pablodanswer Sep 6, 2024
491f325
regeneration - don't remove human message unnecessarily
pablodanswer Sep 6, 2024
6cec310
CONTRIBUTING updates (#2354)
yuhongsun96 Sep 7, 2024
fb3d733
minor QOL improvement on first chat (#2353)
pablodanswer Sep 7, 2024
350482e
Squash misc UX bugs (#2356)
pablodanswer Sep 7, 2024
ccf9868
Add retries (#2358)
Weves Sep 8, 2024
7c03b6f
Fix responses for HTTPExceptions
Weves Sep 8, 2024
7d4f8ef
Minor Confluence Fixes for Robustification (#2349)
pablodanswer Sep 8, 2024
b43e573
Use user information in Slack bot DMs (#2360)
hj-danswer Sep 8, 2024
c1735fc
Google Drive connector - txt and markdown support (#1469)
lombax85 Sep 8, 2024
e2e04af
Bump msal from 1.26.0 to 1.28.0 in /backend/requirements (#1626)
dependabot[bot] Sep 8, 2024
57c1deb
Bump braces from 3.0.2 to 3.0.3 in /web (#1628)
dependabot[bot] Sep 8, 2024
51a13f5
Implement indexing of simple tables in Word files (#1651)
artmatsak Sep 8, 2024
c8891a5
Remove LangChain Community (#2362)
yuhongsun96 Sep 8, 2024
d985cd4
Fix JIRA comment indexing when author has no email (#1663)
artmatsak Sep 8, 2024
0c66da1
Web Connector - Get doc_updated_at from `Last-Modified` header (#1693)
moshe Sep 8, 2024
1e4b271
Bump torch from 2.0.1 to 2.2.0 in /backend/requirements (#1933)
dependabot[bot] Sep 8, 2024
6012a7c
Fix multilingual .env embedding dimension (#1976)
bartschuller Sep 8, 2024
50211ec
Bump nltk from 3.8.1 to 3.9 in /backend/requirements (#2174)
dependabot[bot] Sep 8, 2024
5e9c6d1
Bump aiohttp from 3.9.4 to 3.10.2 in /backend/requirements (#2097)
dependabot[bot] Sep 8, 2024
87b2704
changes to the docker file for mac (#1773)
kshitiz305 Sep 8, 2024
0896d3b
Fix content extraction from JIRA with API v2 vs. v3 (#1678)
artmatsak Sep 8, 2024
b0568ac
Sharepoint: Fix get all sites (#1700)
mboret Sep 8, 2024
e20c825
Notion Connector to skip reading external blocks in NotionConnector
colachg Sep 8, 2024
80de408
Fix formatting
Weves Sep 8, 2024
1555ac9
More explicit credential creation flow (#2363)
pablodanswer Sep 8, 2024
148c2a7
Remove wordnet (#2365)
yuhongsun96 Sep 8, 2024
ace0414
Clearer onboarding + Provider Updates (#2361)
pablodanswer Sep 8, 2024
be4b618
Fix streaming auth locally (#2357)
Weves Sep 8, 2024
3fa9676
[1802] adjust the code to support a different db schemas (#1803)
stianrincon Sep 8, 2024
362156f
Model inference for connector classifier on queries (#2137)
shukant-danswer Sep 8, 2024
f04ecbf
Un-bump nltk due to llamaindex issue
yuhongsun96 Sep 8, 2024
3a9b964
Add Litellm Rerank proxy (#2346)
pablodanswer Sep 9, 2024
c967f53
docker versions have been deprecated for a while, so fixing the annoy…
rkuo-danswer Sep 9, 2024
e4e4765
Add user when they interact outside of UI (e.g. Slack bot) (#2369)
hj-danswer Sep 9, 2024
dbd56f9
address pablo's nits (#2368)
pablodanswer Sep 9, 2024
a4dcae5
Google Drive Plaintext Types (#2371)
BaloMueller Sep 9, 2024
4558351
Zendesk tickets (#2192)
jwjordan Sep 9, 2024
aa86830
mypy
yuhongsun96 Sep 9, 2024
e563746
Consent screen (#2381)
pablodanswer Sep 10, 2024
f52d114
Fail instead of continuing if vespa cannot be reached within the time…
rkuo-danswer Sep 10, 2024
d3a3af1
Merge tag 'v0.5.15' into update/danswer-upstream
sd109 Sep 11, 2024
689533b
Move azimuth-specific files into correct chart folder
sd109 Sep 11, 2024
f944876
Bump chart and image tags for prerelease testing
sd109 Sep 11, 2024
6e94a97
Update chart paths
sd109 Sep 11, 2024
c792da7
Update charts dir in workflow
sd109 Sep 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
76 changes: 76 additions & 0 deletions .github/actions/custom-build-and-push/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: 'Build and Push Docker Image with Retry'
description: 'Attempts to build and push a Docker image, with a retry on failure'
inputs:
context:
description: 'Build context'
required: true
file:
description: 'Dockerfile location'
required: true
platforms:
description: 'Target platforms'
required: true
pull:
description: 'Always attempt to pull a newer version of the image'
required: false
default: 'true'
push:
description: 'Push the image to registry'
required: false
default: 'true'
load:
description: 'Load the image into Docker daemon'
required: false
default: 'true'
tags:
description: 'Image tags'
required: true
cache-from:
description: 'Cache sources'
required: false
cache-to:
description: 'Cache destinations'
required: false
retry-wait-time:
description: 'Time to wait before retry in seconds'
required: false
default: '5'

runs:
using: "composite"
steps:
- name: Build and push Docker image (First Attempt)
id: buildx1
uses: docker/build-push-action@v5
continue-on-error: true
with:
context: ${{ inputs.context }}
file: ${{ inputs.file }}
platforms: ${{ inputs.platforms }}
pull: ${{ inputs.pull }}
push: ${{ inputs.push }}
load: ${{ inputs.load }}
tags: ${{ inputs.tags }}
cache-from: ${{ inputs.cache-from }}
cache-to: ${{ inputs.cache-to }}

- name: Wait to retry
if: steps.buildx1.outcome != 'success'
run: |
echo "First attempt failed. Waiting ${{ inputs.retry-wait-time }} seconds before retry..."
sleep ${{ inputs.retry-wait-time }}
shell: bash

- name: Build and push Docker image (Retry Attempt)
if: steps.buildx1.outcome != 'success'
uses: docker/build-push-action@v5
with:
context: ${{ inputs.context }}
file: ${{ inputs.file }}
platforms: ${{ inputs.platforms }}
pull: ${{ inputs.pull }}
push: ${{ inputs.push }}
load: ${{ inputs.load }}
tags: ${{ inputs.tags }}
cache-from: ${{ inputs.cache-from }}
cache-to: ${{ inputs.cache-to }}
18 changes: 11 additions & 7 deletions .github/workflows/helm-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
workflow_dispatch:

env:
CHART_YAML_PATH: deployment/helm/charts/danswer/Chart.yaml
VALUES_YAML_PATH: deployment/helm/charts/danswer/values.yaml

jobs:
helm_chart_version_check:
runs-on: ubuntu-latest
Expand All @@ -20,11 +24,11 @@ jobs:
# on main or a stable tag on a dev branch.

- name: Fail on semver pre-release chart version
run: yq .version deployment/helm/Chart.yaml | grep -v '[a-zA-Z-]'
run: yq .version ${{ env.CHART_YAML_PATH }} | grep -v '[a-zA-Z-]'
if: ${{ github.ref_name == 'main' }}

- name: Fail on stable semver chart version
run: yq .version deployment/helm/Chart.yaml | grep '[a-zA-Z-]'
run: yq .version ${{ env.CHART_YAML_PATH }} | grep '[a-zA-Z-]'
if: ${{ github.ref_name != 'main' }}

# To reduce resource usage images are built only on tag.
Expand All @@ -37,19 +41,19 @@ jobs:
curl -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)"
https://ghcr.io/v2/stackhpc/danswer/danswer-backend/tags/list
| jq .tags
| grep $( yq .appVersion deployment/helm/Chart.yaml )-$( yq .tagSuffix deployment/helm/values.yaml )
| grep $( yq .appVersion ${{ env.CHART_YAML_PATH }} )-$( yq .tagSuffix ${{ env.VALUES_YAML_PATH }} )
&&
curl -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)"
https://ghcr.io/v2/stackhpc/danswer/danswer-web-server/tags/list
| jq .tags
| grep $( yq .appVersion deployment/helm/Chart.yaml )-$( yq .tagSuffix deployment/helm/values.yaml )
| grep $( yq .appVersion ${{ env.CHART_YAML_PATH }} )-$( yq .tagSuffix ${{ env.VALUES_YAML_PATH }} )

# Check if current chart version exists in releases already
- name: Check for Helm chart version bump
id: version_check
run: |
set -xe
chart_version=$(yq .version deployment/helm/Chart.yaml)
chart_version=$(yq .version ${{ env.CHART_YAML_PATH }})
if [[ $(curl https://api.github.com/repos/stackhpc/danswer/releases | jq '.[].tag_name' | grep danswer-helm-$chart_version) ]]; then
echo chart_version_changed=false >> $GITHUB_OUTPUT
else
Expand Down Expand Up @@ -84,12 +88,12 @@ jobs:
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add vespa https://unoplat.github.io/vespa-helm-charts
helm dependency build deployment/helm
helm dependency build deployment/helm/charts/danswer

- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: deployment
charts_dir: deployment/helm/charts
pages_branch: helm-publish
mark_as_latest: ${{ github.ref_name == 'main' }}
env:
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/pr-helm-chart-testing.yml.disabled.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# This workflow is intentionally disabled while we're still working on it
# It's close to ready, but a race condition needs to be fixed with
# API server and Vespa startup, and it needs to have a way to build/test against
# local containers

name: Helm - Lint and Test Charts

on:
merge_group:
pull_request:
branches: [ main ]

jobs:
lint-test:
runs-on: Amd64

# fetch-depth 0 is required for helm/chart-testing-action
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.14.4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: |
backend/requirements/default.txt
backend/requirements/dev.txt
backend/requirements/model_server.txt
- run: |
python -m pip install --upgrade pip
pip install -r backend/requirements/default.txt
pip install -r backend/requirements/dev.txt
pip install -r backend/requirements/model_server.txt

- name: Set up chart-testing
uses: helm/[email protected]

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Run chart-testing (lint)
# if: steps.list-changed.outputs.changed == 'true'
run: ct lint --all --config ct.yaml --target-branch ${{ github.event.repository.default_branch }}

- name: Create kind cluster
# if: steps.list-changed.outputs.changed == 'true'
uses: helm/[email protected]

- name: Run chart-testing (install)
# if: steps.list-changed.outputs.changed == 'true'
run: ct install --all --config ct.yaml
# run: ct install --target-branch ${{ github.event.repository.default_branch }}

57 changes: 57 additions & 0 deletions .github/workflows/pr-python-connector-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Connector Tests

on:
pull_request:
branches: [main]
schedule:
# This cron expression runs the job daily at 16:00 UTC (9am PT)
- cron: "0 16 * * *"

env:
# Confluence
CONFLUENCE_TEST_SPACE_URL: ${{ secrets.CONFLUENCE_TEST_SPACE_URL }}
CONFLUENCE_TEST_SPACE: ${{ secrets.CONFLUENCE_TEST_SPACE }}
CONFLUENCE_IS_CLOUD: ${{ secrets.CONFLUENCE_IS_CLOUD }}
CONFLUENCE_TEST_PAGE_ID: ${{ secrets.CONFLUENCE_TEST_PAGE_ID }}
CONFLUENCE_USER_NAME: ${{ secrets.CONFLUENCE_USER_NAME }}
CONFLUENCE_ACCESS_TOKEN: ${{ secrets.CONFLUENCE_ACCESS_TOKEN }}

jobs:
connectors-check:
runs-on: ubuntu-latest

env:
PYTHONPATH: ./backend

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: |
backend/requirements/default.txt
backend/requirements/dev.txt

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r backend/requirements/default.txt
pip install -r backend/requirements/dev.txt

- name: Run Tests
shell: script -q -e -c "bash --noprofile --norc -eo pipefail {0}"
run: py.test -o junit_family=xunit2 -xv --ff backend/tests/daily/connectors

- name: Alert on Failure
if: failure() && github.event_name == 'schedule'
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
run: |
curl -X POST \
-H 'Content-type: application/json' \
--data '{"text":"Scheduled Connector Tests failed! Check the run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"}' \
$SLACK_WEBHOOK
42 changes: 15 additions & 27 deletions .github/workflows/run-it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,60 +28,44 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build Web Docker image
uses: docker/build-push-action@v5
with:
context: ./web
file: ./web/Dockerfile
platforms: linux/arm64
pull: true
push: true
load: true
tags: danswer/danswer-web-server:it
cache-from: type=registry,ref=danswer/danswer-web-server:it
cache-to: |
type=registry,ref=danswer/danswer-web-server:it,mode=max
type=inline
# NOTE: we don't need to build the Web Docker image since it's not used
# during the IT for now. We have a separate action to verify it builds
# succesfully
- name: Pull Web Docker image
run: |
docker pull danswer/danswer-web-server:latest
docker tag danswer/danswer-web-server:latest danswer/danswer-web-server:it

- name: Build Backend Docker image
uses: docker/build-push-action@v5
uses: ./.github/actions/custom-build-and-push
with:
context: ./backend
file: ./backend/Dockerfile
platforms: linux/arm64
pull: true
push: true
load: true
tags: danswer/danswer-backend:it
cache-from: type=registry,ref=danswer/danswer-backend:it
cache-to: |
type=registry,ref=danswer/danswer-backend:it,mode=max
type=inline

- name: Build Model Server Docker image
uses: docker/build-push-action@v5
uses: ./.github/actions/custom-build-and-push
with:
context: ./backend
file: ./backend/Dockerfile.model_server
platforms: linux/arm64
pull: true
push: true
load: true
tags: danswer/danswer-model-server:it
cache-from: type=registry,ref=danswer/danswer-model-server:it
cache-to: |
type=registry,ref=danswer/danswer-model-server:it,mode=max
type=inline

- name: Build integration test Docker image
uses: docker/build-push-action@v5
uses: ./.github/actions/custom-build-and-push
with:
context: ./backend
file: ./backend/tests/integration/Dockerfile
platforms: linux/arm64
pull: true
push: true
load: true
tags: danswer/integration-test-runner:it
cache-from: type=registry,ref=danswer/integration-test-runner:it
cache-to: |
Expand All @@ -92,8 +76,11 @@ jobs:
run: |
cd deployment/docker_compose
ENABLE_PAID_ENTERPRISE_EDITION_FEATURES=true \
AUTH_TYPE=basic \
REQUIRE_EMAIL_VERIFICATION=false \
DISABLE_TELEMETRY=true \
IMAGE_TAG=it \
docker compose -f docker-compose.dev.yml -p danswer-stack up -d --build
docker compose -f docker-compose.dev.yml -p danswer-stack up -d
id: start_docker

- name: Wait for service to be ready
Expand Down Expand Up @@ -137,6 +124,7 @@ jobs:
-e POSTGRES_PASSWORD=password \
-e POSTGRES_DB=postgres \
-e VESPA_HOST=index \
-e REDIS_HOST=cache \
-e API_SERVER_HOST=api_server \
-e OPENAI_API_KEY=${OPENAI_API_KEY} \
danswer/integration-test-runner:it
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.mypy_cache
.idea
/deployment/data/nginx/app.conf
.vscode/launch.json
.vscode/
*.sw?
/backend/tests/regression/answer_quality/search_test_config.yaml
**.tgz
Loading