Repository navigation
fix: dev to main - Fix environment lookup errors and simplify data setup process - #1061
Merged
Merged
Conversation
Prevent azd error output from being written into App Service settings when optional agent environment keys are missing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- setup-data.ps1: remove long wait/retry indexing logic added in PR #1044; restore pre-PR-1044 simple upload/cleanup flow since App Services keep VNet integration regardless of public network toggle. Keep -ResourceGroupName param and RG auto-discovery. - connect-data.ps1, setup-agent.ps1: fix Get-AzdEnvValue error detection (align with PR #1057) and only send USE_SQL/agent settings when valid/non-empty to avoid Pydantic bool validation crash on API startup. - nginx.conf: add client_max_body_size to fix 413 errors on manual UI uploads proxied through the frontend in private-networking mode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ulti-instance setup
fix: reject failed azd environment lookups
… in stale-file watchdog - sql_service.get_file_status now closes the connection in a finally block so a query exception doesn't leak the connection. - router.py's stale-file watchdog now runs the SQL status check via asyncio.to_thread so the blocking pyodbc call doesn't stall the event loop, and syncs the in-memory cache to the SQL status instead of just skipping the flip, so the UI stops showing stale 'processing' state on this instance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…dates chore: Simplify data setup and fix upload
docs: Add prerequisite note for Azure AI Search network access
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves deployment reliability and ingestion status correctness by hardening environment/appsettings sync logic, simplifying post-provision data setup to avoid long waits/timeouts, and adding a multi-instance-safe check before marking uploads as failed.
Changes:
- Increase Nginx upload size limit to align with backend upload constraints for proxied uploads.
- Add a SQL “source of truth” point-read and use it to avoid false “failed” flips in multi-instance ingestion scenarios.
- Refactor post-provision data setup to confirm upload registration only (not full ingestion completion) and simplify upload error handling.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/nginx.conf | Raises client_max_body_size so Nginx doesn’t block legitimate uploads before the API sees them. |
| src/api/storage/sql_service.py | Adds get_file_status SQL point-read used as a multi-instance consistency guard. |
| src/api/modules/ingestion/router.py | Uses SQL point-read (via asyncio.to_thread) before force-failing stale “processing” files. |
| infra/scripts/post-provision/setup-data.ps1 | Reworks post-provision flow to verify registration only and simplifies batch upload handling. |
| infra/scripts/post-provision/setup-agent.ps1 | Makes azd env get-value parsing safer and syncs only valid/non-empty app settings. |
| infra/scripts/post-provision/connect-data.ps1 | Mirrors safer azd env lookup and avoids pushing invalid agent settings. |
| docs/ConnectDataSource.md | Documents BYOD Search requirement for public network access. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Roopan-Microsoft
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request introduces several improvements and fixes across deployment scripts and the API ingestion module, focusing on more robust environment variable handling, safer agent settings synchronization, streamlined data upload and registration, and improved multi-instance ingestion status checks.
Deployment and Environment Handling Improvements:
Get-AzdEnvValuein bothconnect-data.ps1andsetup-agent.ps1to more robustly filter out error values and handle exit codes, preventing invalid data from being used in subsequent steps. [1] [2]Data Upload and Registration Workflow:
setup-data.ps1to confirm only upload registration (not full ingestion), reducing deployment time and risk of timeouts. The newConfirm-UploadRegisteredfunction replaces the previous ingestion completion polling and batch upload retry logic. [1] [2] [3]Documentation and API Reliability:
These changes together make the deployment process more robust, reduce the chance of configuration errors, and improve the reliability of file ingestion status reporting in multi-instance environments.
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation