Skip to content

chore: merge dev into main (features, bug fixes, infra updates) #1820

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

Merged
merged 86 commits into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes from 85 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
2dbb0b1
ci: Updated workflow to handle main, dev and demo branch | Dependabot…
Roopan-Microsoft Nov 25, 2024
97ced9f
fix: SFI Fixes & scope reverted to subscription (#1513)
Roopan-Microsoft Nov 25, 2024
903c259
ci: workflow updated for build docker (#1514)
Roopan-Microsoft Nov 25, 2024
4cf2972
ci: build docker updated for dev (#1522)
Roopan-Microsoft Nov 25, 2024
9158819
ci: workflow branch code updated (#1525)
Roopan-Microsoft Nov 25, 2024
4545a48
updated comment
AjitPadhi-Microsoft Nov 25, 2024
84a33b5
updated workflow
AjitPadhi-Microsoft Nov 25, 2024
f8c1c8f
updated workflow
AjitPadhi-Microsoft Nov 25, 2024
e31a661
updated workflow
AjitPadhi-Microsoft Nov 26, 2024
847ce7e
updated bicep for registry
AjitPadhi-Microsoft Nov 26, 2024
8f8cc98
fixed bicep
AjitPadhi-Microsoft Nov 26, 2024
15b948c
fix: bicep updated (#1527)
AjitPadhi-Microsoft Nov 26, 2024
1645e43
Merge branch 'main' into dev
Roopan-Microsoft Nov 27, 2024
8df387a
Merge branch 'dev' of https://github.com/Azure-Samples/chat-with-your…
Roopan-Microsoft Nov 27, 2024
e4dd5f2
fix: Container issue fix for multiple branch (#1539)
AjitPadhi-Microsoft Nov 27, 2024
88d06dc
fix: Updated workflow (#1540)
AjitPadhi-Microsoft Nov 27, 2024
e5cf4dd
ci: Psl container fix for checkout code from head branch (#1541)
Roopan-Microsoft Nov 27, 2024
02d0056
fix: multiple container tag issue fix (#1552)
AjitPadhi-Microsoft Dec 9, 2024
90e1040
fix: Workflow issue fix on docker image (#1554)
AjitPadhi-Microsoft Dec 9, 2024
8a5a1cb
fix: Downmerge dev (#1566)
Pavan-Microsoft Dec 18, 2024
131c323
fix: CWYD Citation Links to Documents Break After Specific Timeframe …
Harmanpreet-Microsoft Dec 18, 2024
93b84ed
fix: Commit changes bug (#1568)
UtkarshMishra-Microsoft Dec 18, 2024
0875b92
fix: Post-Deployment Script for Managing Bicep Outputs in .env File …
Pavan-Microsoft Dec 19, 2024
76190b3
fix: import error in env_helper.py (#1571)
Pavan-Microsoft Dec 19, 2024
c65bf01
fix: add conversation flow in environment variable for adminweb app (…
Priyanka-Microsoft Dec 19, 2024
1f326d9
fix: Update Hosting Model Configuration in ARM/Bicep Template (#1570)
Prasanjeet-Microsoft Dec 19, 2024
fc688c2
fix: Update main.json for changes conversation flow changes in bicep …
Priyanka-Microsoft Dec 19, 2024
56adb59
Merge branch 'main' into dev
Roopan-Microsoft Dec 24, 2024
afaabdc
build: Dependabotchanges merge to Dev branch (#1602)
Roopan-Microsoft Dec 30, 2024
03f52b3
feat: Configurable System Prompts for Flexibility and Maintenance - C…
Pavan-Microsoft Dec 31, 2024
e92eba1
fix: Add Missing Logs (#1609)
Pavan-Microsoft Jan 2, 2025
b0860ee
commented the prompt flow in azure yaml file
Roopan-Microsoft Jan 3, 2025
983b1f7
Merge branches 'dev' and 'dev' of https://github.com/Azure-Samples/ch…
Roopan-Microsoft Jan 3, 2025
dae4043
Add execute permissions parse_env.sh in postprovision hook
Pavan-Microsoft Jan 3, 2025
08ad207
fix: Build issue with docker
Prajwal-Microsoft Jan 4, 2025
c49ddfd
Update build-docker.yml
Prajwal-Microsoft Jan 5, 2025
5994f99
fix: Docker file failure issue
Prajwal-Microsoft Jan 5, 2025
dc7b87c
fix: Response getting ']' brackets, it's inconsistent (#1611)
AjitPadhi-Microsoft Jan 6, 2025
2d1af79
fix: Fix Duplication of Flattened JSON Keys in .env File During Multi…
Pavan-Microsoft Jan 7, 2025
c553312
fix: Role Duplication Error in azd up Command for PostgreSQL (#1621)
Pavan-Microsoft Jan 10, 2025
8213f0a
Merge branch 'main' into dev
Roopan-Microsoft Jan 10, 2025
1f22786
feat: Remove AI search service for PostgreSQL configuration to optimi…
Prasanjeet-Microsoft Jan 13, 2025
7c2391c
feat: Implement Consistent Versioning and Tagging for Accelerator Ima…
Pavan-Microsoft Jan 15, 2025
8393614
Merge branch 'main' into dev
Roopan-Microsoft Jan 20, 2025
3789d45
fix: Warning message displayed twice in chat history update (#1630)
Pavan-Microsoft Jan 24, 2025
699dff8
test: unit test cases changes (#1353)
Kiran-Siluveru-Microsoft Jan 28, 2025
461779f
Update default.json
Roopan-Microsoft Feb 6, 2025
e0be943
Update default_contract_assistant_prompt.txt
Roopan-Microsoft Feb 6, 2025
f28ddc6
Update open_ai_functions.py
Roopan-Microsoft Feb 6, 2025
63ec389
Update build-docker.yml
Roopan-Microsoft Feb 6, 2025
e1d37f1
Update create_app.py
Roopan-Microsoft Feb 6, 2025
ec42447
Update test_conversation.py
Roopan-Microsoft Feb 6, 2025
86dd916
Update test_iv_question_answer_tool.py
Roopan-Microsoft Feb 6, 2025
b1f2615
Update test_response_with_search_documents_tool.py
Roopan-Microsoft Feb 6, 2025
3431205
Update test_conversation_flow.py
Roopan-Microsoft Feb 6, 2025
7025c6e
ci: update docker registry logic for main, dev, and demo branches (#1…
Priyanka-Microsoft Feb 7, 2025
8fca481
fix: Updates to change the Azure OpenAI model from `gpt-35-turbo` to …
Roopan-Microsoft Feb 13, 2025
18e1dca
docs: updated numerical queries section in best practices readme (#1670)
Harsh-Microsoft Feb 17, 2025
c13b4e3
Merge branch 'main' into dev
Roopan-Microsoft Feb 17, 2025
1ed3f43
fix: Admin configuration issue fix (#1676)
AjitPadhi-Microsoft Feb 18, 2025
f083af8
Merge branch 'main' into dev
Roopan-Microsoft Feb 19, 2025
32ebef3
build: Merge Dependabot Changes into Dev Branch (#1679)
Prasanjeet-Microsoft Feb 28, 2025
2803e48
Merge branch 'main' into dev
Roopan-Microsoft Mar 3, 2025
b5f35ac
Package lock updated
Roopan-Microsoft Mar 3, 2025
0b01abb
Merge remote-tracking branch 'origin/main' into dev
Prajwal-Microsoft Mar 4, 2025
21b57da
docs: Added migration readme file (#1668)
Priyanka-Microsoft Mar 4, 2025
6f30b3f
refactor: enforcing authentication based on environment variable "ENF…
Harsh-Microsoft Mar 24, 2025
9de26fd
build: Merge Dependabot Changes into Dev Branch (#1749)
Prasanjeet-Microsoft Apr 11, 2025
f7a2ce9
chore: Update Azure OpenAI Vision Model configuration to turbo-2024-0…
Harmanpreet-Microsoft Apr 15, 2025
dc763c2
feat: json document processor (#1661)
cristofima Apr 16, 2025
9664143
fix: Resolve chunking issue during deployment when enabling advanced …
Priyanka-Microsoft Apr 21, 2025
e8382d3
Merge branch 'main' into dev
Roopan-Microsoft May 5, 2025
4f09b12
fix: bug(#1653) added tooltip for chat history items. (#1785)
Bangarraju-Microsoft May 6, 2025
c7f3e8d
build: Add .dockerignore to optimize Docker build context (#1790)
Prasanjeet-Microsoft May 6, 2025
cea820d
fix: Updated reset configuration to use dialog instead of popover whi…
Vamshi-Microsoft May 9, 2025
5d79d5d
refactor: centralize Azure resource naming with abbreviations.json an…
Harmanpreet-Microsoft May 12, 2025
a9d8511
fix: Changed the button label from "Reset Now" to "Reset" (#1796)
Vamshi-Microsoft May 13, 2025
88caa69
Merge branch 'main' into dev
Roopan-Microsoft May 22, 2025
5383461
main json updated
Roopan-Microsoft May 22, 2025
86ebab4
fix: hardcoded abbreviations in bicep (#1805)
Harsh-Microsoft May 22, 2025
03606b7
fix: Enhance Bicep Outputs for Environment Variable Configuration in …
Prasanjeet-Microsoft May 29, 2025
7ae4b79
fix: Add Cosmos DB Account Key Output for Environment Configuration (…
Prasanjeet-Microsoft May 29, 2025
69669bb
fix: error in 'Process and Ingest Web Pages' under 'Add URLs to the K…
Priyanka-Microsoft Jun 2, 2025
464139c
test: Migrate test automation scripts, llm evaluator and pipeline for…
Harsh-Microsoft Jun 3, 2025
27211e9
ci: configuration to include optional arguments for running tests dur…
Harsh-Microsoft Jun 3, 2025
4fec5b7
Merge branch 'main' into dev
Prasanjeet-Microsoft Jun 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 162 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Include any files or directories that you don't want to be copied to your
# container here (e.g., local build artifacts, temporary files, etc.).
#
# For more help, visit the .dockerignore file reference guide at
# https://docs.docker.com/engine/reference/builder/#dockerignore-file

**/.DS_Store
**/__pycache__
**/.venv
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/bin
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/*.Dockerfile
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.log

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# VS Code
.vscode/

# Ignore other unnecessary files
*.bak
*.swp
.DS_Store
*.pdb
*.sqlite3
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ AZURE_KEY_VAULT_ENDPOINT=
CONVERSATION_FLOW=
# Chat History CosmosDB Integration Settings
AZURE_COSMOSDB_ACCOUNT_NAME=
AZURE_COSMOSDB_ACCOUNT_KEY=
AZURE_COSMOSDB_DATABASE_NAME=
AZURE_COSMOSDB_CONVERSATIONS_CONTAINER_NAME=
AZURE_COSMOSDB_ENABLE_FEEDBACK=
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
imageName: ghcr.io/azure-samples/chat-with-your-data-solution-accelerator
cacheFrom: ghcr.io/azure-samples/chat-with-your-data-solution-accelerator
imageTag: ${{ env.imageTag }}
runCmd: make ci && make deploy
runCmd: export optional_args="./code/tests" && make ci && make deploy
refFilterForPush: refs/heads/${{ github.event_name == 'schedule' && 'main' || github.ref_name }}
env: |
AZURE_CLIENT_ID
Expand Down
106 changes: 106 additions & 0 deletions .github/workflows/test-automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Test Automation CWYD
on:
push:
branches:
- main
- dev
paths:
- 'tests/e2e-test/**'
schedule:
- cron: '0 13 * * 3' # Runs at 1 PM UTC once a week on Wednesday
workflow_dispatch:

env:
web_url: ${{ vars.CWYD_WEB_URL }}
admin_url: ${{ vars.CWYD_ADMIN_URL }}
accelerator_name: "Chat with your Data"

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/e2e-test/requirements.txt

- name: Ensure browsers are installed
run: python -m playwright install --with-deps chromium

- name: Run tests(1)
id: test1
run: |
xvfb-run pytest --headed --html=report/report.html --self-contained-html
working-directory: tests/e2e-test
continue-on-error: true

- name: Sleep for 30 seconds
if: ${{ steps.test1.outcome == 'failure' }}
run: sleep 30s
shell: bash

- name: Run tests(2)
id: test2
if: ${{ steps.test1.outcome == 'failure' }}
run: |
xvfb-run pytest --headed --html=report/report.html --self-contained-html
working-directory: tests/e2e-test
continue-on-error: true

- name: Sleep for 60 seconds
if: ${{ steps.test2.outcome == 'failure' }}
run: sleep 60s
shell: bash

- name: Run tests(3)
id: test3
if: ${{ steps.test2.outcome == 'failure' }}
run: |
xvfb-run pytest --headed --html=report/report.html --self-contained-html
working-directory: tests/e2e-test

- name: Upload test report
id: upload_report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: cwyd-test-report
path: tests/e2e-test/report/*

- name: Send Notification
if: always()
run: |
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
REPORT_URL=${{ steps.upload_report.outputs.artifact-url }}
IS_SUCCESS=${{ steps.test1.outcome == 'success' || steps.test2.outcome == 'success' || steps.test3.outcome == 'success' }}
# Construct the email body
if [ "$IS_SUCCESS" = "true" ]; then
EMAIL_BODY=$(cat <<EOF
{
"body": "<p>Dear Team,</p><p>We would like to inform you that the ${{ env.accelerator_name }} Test Automation process has completed successfully.</p><p><strong>Run URL:</strong> <a href=\"${RUN_URL}\">${RUN_URL}</a><br></p><p><strong>Test Report:</strong> <a href=\"${REPORT_URL}\">${REPORT_URL}</a></p><p>Best regards,<br>Your Automation Team</p>",
"subject": "${{ env.accelerator_name }} Test Automation - Success"
}
EOF
)
else
EMAIL_BODY=$(cat <<EOF
{
"body": "<p>Dear Team,</p><p>We would like to inform you that the ${{ env.accelerator_name }} Test Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Run URL:</strong> <a href=\"${RUN_URL}\">${RUN_URL}</a><br> ${OUTPUT}</p><p><strong>Test Report:</strong> <a href=\"${REPORT_URL}\">${REPORT_URL}</a></p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>",
"subject": "${{ env.accelerator_name }} Test Automation - Failure"
}
EOF
)
fi

# Send the notification
curl -X POST "${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}" \
-H "Content-Type: application/json" \
-d "$EMAIL_BODY" || echo "Failed to send notification"
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:

echo "MIN_COVERAGE=$MIN_COVERAGE" >> "$GITHUB_OUTPUT"
- name: Run Python Tests
run: make python-test optional_args="--junitxml=coverage-junit.xml --cov=. --cov-report xml:coverage.xml --cov-fail-under ${{ steps.coverage-value.outputs.MIN_COVERAGE }}"
run: make python-test optional_args="--junitxml=coverage-junit.xml --cov=. --cov-report xml:coverage.xml --cov-fail-under ${{ steps.coverage-value.outputs.MIN_COVERAGE }} ./code/tests"
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ temp/
# so that Azure App Service can install the dependencies
requirements.txt
!infra/prompt-flow/cwyd/requirements.txt
!tests/e2e-test/requirements.txt
!tests/llm-evaluator/requirements.txt

# Cypress UI tests screenshots folder
tests/integration/ui/cypress/screenshots/
Expand Down
5 changes: 5 additions & 0 deletions code/backend/pages/01_Ingest_Data.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ def sanitize_metadata_value(value):


def add_url_embeddings(urls: list[str]):
has_valid_url = bool(list(filter(str.strip, urls)))
if not has_valid_url:
st.error("Please enter at least one valid URL.")
return

params = {}
if env_helper.FUNCTION_KEY is not None:
params["code"] = env_helper.FUNCTION_KEY
Expand Down
52 changes: 29 additions & 23 deletions code/backend/pages/04_Configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,37 +491,43 @@ def validate_documents():
"Configuration saved successfully! Please restart the chat service for these changes to take effect."
)

with st.popover(":red[Reset configuration to defaults]"):

# Close button with a custom class
if st.button("X", key="close_popup", help="Close popup"):
st.session_state["popup_open"] = False
st.rerun()

st.write(
"**Resetting the configuration cannot be reversed, proceed with caution!**"
)
@st.dialog("Reset Configuration", width="small")
def reset_config_dialog():
st.write("**Resetting the configuration cannot be reversed. Proceed with caution!**")

st.text_input('Enter "reset" to proceed', key="reset_configuration")
if st.button(
":red[Reset]", disabled=st.session_state["reset_configuration"] != "reset"
":red[Reset]",
disabled=st.session_state.get("reset_configuration", "") != "reset",
key="confirm_reset"
):
try:
ConfigHelper.delete_config()
except ResourceNotFoundError:
pass

for key in st.session_state:
del st.session_state[key]

with st.spinner("Resetting Configuration to Default values..."):
try:
ConfigHelper.delete_config()
except ResourceNotFoundError:
pass

ConfigHelper.clear_config()
st.session_state.clear()
st.session_state["reset"] = True
st.session_state["reset_configuration"] = ""
st.session_state["show_reset_dialog"] = False
st.rerun()

if st.session_state.get("reset") is True:
st.success("Configuration reset successfully!")
del st.session_state["reset"]
del st.session_state["reset_configuration"]
# Reset configuration button
if st.button(":red[Reset configuration to defaults]"):
st.session_state["show_reset_dialog"] = True

# Open the dialog if needed
if st.session_state.get("show_reset_dialog"):
reset_config_dialog()
st.session_state["show_reset_dialog"] = False

# After reset success
if st.session_state.get("reset"):
st.success("Configuration reset successfully!")
del st.session_state["reset"]
del st.session_state["reset_configuration"]

except Exception as e:
logger.error(f"Error occurred: {e}")
Expand Down
Loading
Loading