Skip to content

chore: Dev to Main - #334

Merged
Avijit-Microsoft merged 12 commits into
mainfrom
dev
Aug 10, 2026
Merged

chore: Dev to Main#334
Avijit-Microsoft merged 12 commits into
mainfrom
dev

Conversation

@PadhiAjit-Microsoft

@PadhiAjit-Microsoft PadhiAjit-Microsoft commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Purpose

  • This pull request removes two assistant management scripts and several plugin modules, updates dependencies, and makes minor configuration and logging changes. The most significant updates are the removal of the orders_plugin.py and reference_plugin.py plugin modules, which previously provided order and reference document handling functionality, and the deletion of the scripts for creating and listing assistants. There are also dependency and logging adjustments to improve compatibility and maintainability.

Major removals:

  • Deleted the orders_plugin.py and reference_plugin.py modules from chat-app/backend/app/plugins, removing all order management and reference lookup plugin functionality. [1] [2]
  • Removed the create_assistants.py and list_assistants.py scripts from chat-app/backend/app, eliminating programmatic creation and listing of Azure AI Foundry assistants. [1] [2]

Dependency and configuration updates:

  • Upgraded python-multipart from version 0.0.20 to 0.0.32 in requirements.txt to ensure compatibility with other dependencies.
  • Updated .flake8 to ignore warning E226 in addition to previous ignores, relaxing linting requirements.

Logging and import changes:

  • Changed logging configuration in main.py to set the log level for azure.ai.projects instead of agent_framework_azure_ai._client.
  • Fixed the import path for AzureAIProjectAgentProvider in foundry_agent_utils.py to use the correct package name.
  • Minor formatting fix in chat.py for the AzureAIProjectAgentProvider instantiation.

Other:

  • Removed the placeholder comment from chat-app/backend/app/plugins/__init__.py, leaving the file empty.

These changes significantly reduce the backend's assistant and plugin management features, likely as part of a refactor or migration.

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Vamshi-Microsoft and others added 7 commits August 4, 2026 12:03
…roxy for WAF (avm-waf)

When AZURE_ENV_DEPLOYMENT_FLAVOR=avm-waf (enablePrivateNetworking=true), lock the
chat and scenario backend App Services down to private access and reverse-proxy
frontend /api/ traffic to them over the VNet.

infra/avm/main.bicep:
- chat_backend_app / scenario_backend_app: publicNetworkAccess Disabled when private,
  add 'sites' private endpoints (pep-chat-api-*, pep-scenario-api-*) on the
  privatelink.azurewebsites.net DNS zone
- chat_frontend_app / scenario_frontend_app: set BACKEND_API_URL and clear
  VITE_API_BASE_URL when private; scenario VITE_CHAT_API_BASE_URL points at the
  public chat frontend so the embedded widget reaches the private chat backend

Frontend containers (chat-app, scenario-app):
- nginx.conf includes runtime-generated /etc/nginx/conf.d/api-proxy.conf
- startup.sh generates the /api/ reverse proxy (with WebSocket support for voice)
  and serves the SPA against window.location.origin when BACKEND_API_URL is set
- Dockerfile seeds an empty api-proxy.conf placeholder

Recompiled infra/avm/main.json and infra/main.json. Non-WAF (bicep/avm) flavors
are unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7ef3c8d0-9f97-4140-8718-76818b387d35
Address Copilot review feedback on PR #332:
- Strip trailing slash from BACKEND_API_URL and quote the Host header so
  proxy_pass + the /api/ location prefix cannot produce a malformed path.
- Escape values interpolated into runtime-config.js so a scenario title
  containing a single quote or backslash no longer breaks the generated JS.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7ef3c8d0-9f97-4140-8718-76818b387d35
…-proxy

feat: Restrict backend APIs to private access with reverse proxy

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for WAF/private-networking deployments by routing frontend API calls through an nginx reverse proxy when backends are private, and updates infra templates to disable public access + provision private endpoints for backend App Services.

Changes:

  • Frontends: generate runtime config that can target window.location.origin in private deployments and generate /api/ reverse-proxy nginx config at startup.
  • Infra (AVM/WAF): disable public network access for backend apps when enablePrivateNetworking is on and add private endpoints + DNS zone dependencies.
  • Dependencies: bump axios/vite in both frontends and python-multipart in both backends.

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scenario-app/frontend/startup.sh Adds runtime-config generation, JS-escaping helper, and startup-generated nginx /api/ proxy config for private deployments.
scenario-app/frontend/package.json Bumps axios and vite versions.
scenario-app/frontend/package-lock.json Lockfile updates for axios/vite bumps and transitive deps.
scenario-app/frontend/nginx.conf Includes generated api-proxy.conf into server config.
scenario-app/frontend/Dockerfile Ensures /etc/nginx/conf.d/api-proxy.conf exists in the image.
scenario-app/backend/requirements.txt Bumps python-multipart version.
infra/main.json Regenerated router template reflecting AVM/WAF private-networking changes.
infra/avm/main.json Regenerated AVM/WAF ARM template with private endpoint + public access changes.
infra/avm/main.bicep Implements conditional public network access + private endpoints; passes BACKEND_API_URL/VITE_* settings for private deployments.
chat-app/frontend/startup.sh Adds private-deployment runtime-config behavior and startup-generated nginx /api/ proxy config.
chat-app/frontend/package.json Bumps axios and vite versions.
chat-app/frontend/package-lock.json Lockfile updates for axios/vite bumps and transitive deps.
chat-app/frontend/nginx.conf Includes generated api-proxy.conf into server config.
chat-app/frontend/Dockerfile Ensures /etc/nginx/conf.d/api-proxy.conf exists in the image.
chat-app/backend/requirements.txt Bumps python-multipart version.
Files not reviewed (2)
  • chat-app/frontend/package-lock.json: Generated file
  • scenario-app/frontend/package-lock.json: Generated file
Suppressed comments (2)

scenario-app/frontend/startup.sh:73

  • BACKEND_API_URL is written into the generated nginx config without validation. If it contains whitespace or a quote character, nginx may fail to start due to a malformed config. Add minimal validation before writing /etc/nginx/conf.d/api-proxy.conf.
location /api/ {
    resolver 168.63.129.16 valid=30s;
    set \$backend "${BACKEND_API_URL}";
    proxy_pass \$backend;
    proxy_set_header Host "${BACKEND_HOST}";

chat-app/frontend/startup.sh:43

  • BACKEND_API_URL is written into the generated nginx config without validation. If it contains whitespace or a quote character, nginx may fail to start due to a malformed config. Add minimal validation before writing /etc/nginx/conf.d/api-proxy.conf.
location /api/ {
    resolver 168.63.129.16 valid=30s;
    set \$backend "${BACKEND_API_URL}";
    proxy_pass \$backend;
    proxy_set_header Host "${BACKEND_HOST}";

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scenario-app/frontend/startup.sh
Comment thread chat-app/frontend/startup.sh
@PadhiAjit-Microsoft PadhiAjit-Microsoft changed the title Chore: Dev to Main chore: Dev to Main Aug 7, 2026
Copilot AI review requested due to automatic review settings August 7, 2026 12:41
Comment thread scenario-app/backend/app/main.py Dismissed
Comment thread scenario-app/backend/app/main.py Dismissed
Comment thread infra/scripts/scenario_bootstrap.py Dismissed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 46 out of 58 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • scenario-app/frontend/package-lock.json: Generated file
Suppressed comments (5)

chat-app/backend/requirements.txt:13

  • azure-ai-projects is specified as >=2.3.0 while other dependencies are pinned. This makes builds non-deterministic and can cause unexpected behavior changes over time.
azure-ai-projects>=2.3.0

infra/vscode_web/requirements.txt:1

  • azure-ai-projects is specified as >=2.3.0, which can lead to non-reproducible environments when installing these sample dependencies. Pinning improves repeatability for users following the sample.
azure-ai-projects>=2.3.0

infra/vscode_web/endpoint-requirements.txt:1

  • azure-ai-projects is specified as >=2.3.0, which can lead to non-reproducible environments when installing these sample dependencies. Pinning improves repeatability for users following the sample.
azure-ai-projects>=2.3.0

infra/scripts/post-provision/agent_scripts/requirements.txt:3

  • azure-ai-projects is specified as >=2.3.0 while other dependencies in this script environment are pinned. This can introduce unexpected breaking changes when a newer version is published.
azure-ai-projects>=2.3.0

scenario-app/backend/requirements.txt:14

  • azure-ai-projects is specified as >=2.3.0 while most other dependencies in this file are pinned. This makes deployments non-reproducible and can introduce unexpected breaking changes when a newer version is released.

Comment thread infra/vscode_web/codeSample.py
@Avijit-Microsoft
Avijit-Microsoft merged commit 68e81a4 into main Aug 10, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants