chore: dev to main merge - #91
Merged
Merged
Conversation
fix: Pin GitHub Actions to commit SHAs
Routes all pip installs (devcontainer, azd hooks, dev tooling, GitHub Actions workflows) through the Microsoft Package Feed Proxy (https://packagefeedproxy.microsoft.io/pypi/simple/) instead of directly hitting pypi.org, so builds keep working once direct public registry access is blocked on Microsoft-managed devices/networks. PIP_INDEX_URL is overridable via devcontainer variable substitution / repo-env Variable / env var everywhere it is set. - devcontainer.json: set PIP_INDEX_URL via containerEnv with localEnv override support - post-create.sh: export PIP_INDEX_URL fallback; apply --index-url to all pip install calls (pip upgrade, root requirements.txt, datagen requirements.txt, fabric-launcher editable install, dev tooling) - Run-PythonScript.ps1: new -PipIndexUrl param (defaults to proxy, override via env var or flag, validated non-empty), applied to pip upgrade + requirements install - shared by azd postprovision/predown hooks - azure-dev.yml, template-validation.yml: set PIP_INDEX_URL in env block (vars.PIP_INDEX_URL override with proxy fallback) - .devcontainer/README.md: document the proxy default and how to override it back to public PyPI Note: this repo has no package.json/NuGet.config (pip-only), so the npm/NuGet acceptance criteria from the parent work item are not applicable here. Live connectivity to packagefeedproxy.microsoft.io can only be validated on a Microsoft-managed network/CI runner, not from a public sandbox, since package downloads redirect to vsblob.vsassets.io. AB#50845
Per the Configure Package Feeds via the Microsoft Package Feed Proxy guidance, add '--index-url https://packagefeedproxy.microsoft.io/pypi/simple/' as the first directive in both requirements.txt files in this repo, so pip honors the proxy even when a requirements file is installed directly (e.g. 'pip install -r requirements.txt') without relying solely on PIP_INDEX_URL/ --index-url from the calling script. Updated files: - requirements.txt - src/fabric/datagen/requirements.txt AB#50845
fix: preserve ontology ID and wait for graph readiness
The PipIndexUrl default only fell back to the Microsoft Package Feed Proxy when the host PIP_INDEX_URL env var was empty/unset. Any non-empty but malformed value (e.g. a bare scheme like 'https', or whitespace) was passed straight through to pip, producing 'index url seems invalid' / 'Location is ignored' warnings and broken installs. Now validate that PIP_INDEX_URL looks like a real http(s) URL with a host; otherwise fall back to the proxy default and warn. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…kage-feed-proxy feat: configure Microsoft Package Feed Proxy for pip installs
Saswato-Microsoft
requested review from
Avijit-Microsoft,
Prajwal-Microsoft,
Roopan-Microsoft,
Vinay Sharma (Vinay-Microsoft) and
Anish Arora (aniaroramsft)
as code owners
August 25, 2026 04:53
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes configurable pip package-feed usage across development, CI, and deployment tooling, while improving Fabric deployment automation.
Changes:
- Adds Microsoft Package Feed Proxy defaults and override support.
- Pins GitHub Actions to commit SHAs.
- Enhances ontology resolution, graph readiness checks, and Data Agent publishing.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Summary / final review notes |
|---|---|
src/fabric/datagen/requirements.txt |
Adds package-feed configuration for data-generation dependencies. |
requirements.txt |
Adds the default package-feed configuration. |
infra/scripts/utils/Run-PythonScript.ps1 |
Adds pip-index selection and validation. Critical findings: redact URLs in fallback and deployment logs (2 votes each). Moderate finding: anchor or replace URL validation so malformed values cannot pass (3 votes). |
infra/fabric/deploy/fabric_solution_installer.ipynb |
Improves ontology and Data Agent deployment. Moderate finding: missing expected agents must fail or be retried rather than silently skipped (2 votes). Nit: update deployment documentation for readiness, retry, publishing, and troubleshooting behavior (3 votes). |
.github/workflows/template-validation.yml |
Configures the pip proxy and pins workflow actions. |
.github/workflows/azure-dev.yml |
Configures pip proxy defaults and pins workflow actions. |
.devcontainer/README.md |
Documents package-feed configuration and overrides. |
.devcontainer/post-create.sh |
Routes installs through the configured index. Critical finding: do not log raw index URLs because credentials may be exposed (2 votes). |
.devcontainer/devcontainer.json |
Sets the default pip index environment variable. |
Suppressed comments (5)
infra/fabric/deploy/fabric_solution_installer.ipynb:523
- Despite the docstring saying to retry only when the background refresh failed, this unconditionally sleeps and starts a new
RefreshGraphjob. On every rerun, including when the graph is already ready, this forces another refresh and can race Fabric's initial refresh; inspect/poll the graph model's actual state first and submit a refresh only when needed.
" print(f\"⏳ Waiting {initial_wait_seconds}s for '{ontology_name}' graph model to finish its initial load...\")\n",
" time.sleep(initial_wait_seconds)\n",
"\n",
" for attempt in range(1, attempts + 1):\n",
" response = client.post(f\"v1/workspaces/{workspace_id}/graphModels/{match['id']}/jobs/instances?jobType=RefreshGraph\")\n",
infra/fabric/deploy/fabric_solution_installer.ipynb:595
- Regardless of the HTTP result, this branch prints a success message. A 4xx/5xx response—or a 202 asynchronous publish that has not completed—is therefore reported as a published agent and the notebook can finish in a broken state. Validate the response and poll any asynchronous operation before reporting success.
" response = client.post(\n",
" f\"v1/workspaces/{workspace_id}/dataAgents/{agent['id']}/staging/publish\",\n",
" json={\"publishedDescription\": \"Published by the Microsoft IQ solution installer\"},\n",
" )\n",
" print(f\" ✅ Data Agent '{agent['displayName']}' published successfully\")"
infra/fabric/deploy/fabric_solution_installer.ipynb:512
- The graph-model list is queried only once, before the six-minute wait. If Fabric has not made the graph model visible yet after ontology creation, this returns immediately and the readiness/refresh logic is skipped entirely, after which the Data Agent is published anyway. Retry the list until the model appears or fail the deployment rather than bypassing the check.
" graph_models_response = client.get(f\"v1/workspaces/{workspace_id}/graphModels\")\n",
" if graph_models_response.status_code != 200:\n",
" print(f\" ⚠️ Failed to list graph models for '{ontology_name}': HTTP {graph_models_response.status_code} {graph_models_response.text}\")\n",
" return\n",
" graph_models = graph_models_response.json().get(\"value\", [])\n",
infra/fabric/deploy/fabric_solution_installer.ipynb:527
- If the RefreshGraph API returns 202 without a
Locationheader,job_urlremainsNoneand the next iteration callsclient.get(None), aborting the notebook. Treat a missing monitor URL as a failed attempt (and validate polling responses) instead of invoking the client withNone.
" job_url = response.headers.get(\"Location\")\n",
infra/fabric/deploy/fabric_solution_installer.ipynb:533
- Fabric jobs can report
QueuedorRunningwhile active andSucceededwhen complete (the existinginfra/scripts/fabric/fabric_api.pypolling logic handles these states), but this loop only pollsNotStarted/InProgressand the later check accepts onlyCompleted. A normal successful refresh can therefore be reported as unsuccessful and trigger another POST, potentially starting duplicate refresh jobs before the cell ends with a warning. Include all active states and acceptSucceededas terminal success.
" while job_status in (\"NotStarted\", \"InProgress\") and elapsed < 300:\n",
" time.sleep(wait_seconds)\n",
" elapsed += wait_seconds\n",
" job_status = client.get(job_url).json().get(\"status\")\n",
💡 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
Aug 25, 2026
Avijit-Microsoft
approved these changes
Aug 25, 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 comprehensive improvements to Python package management across development, CI, and deployment environments, with a focus on ensuring reliable pip installs on Microsoft-managed devices. It standardizes the use of the Microsoft Package Feed Proxy as the default pip index, adds robust configuration and documentation, and enhances deployment scripts for better reliability and maintainability.
Python Package Feed Proxy Integration and Configuration:
https://packagefeedproxy.microsoft.io/pypi/simple/) as the default pip index in the dev container via thePIP_INDEX_URLenvironment variable indevcontainer.json, with clear override instructions for non-Microsoft environments. (.devcontainer/devcontainer.json, .devcontainer/README.md) [1] [2]PIP_INDEX_URLfor all pip installations, ensuring compatibility with Microsoft-managed networks and allowing overrides. (.devcontainer/post-create.sh) [1] [2] [3] [4] [5]Run-PythonScript.ps1) to accept and validate aPipIndexUrlparameter, defaulting to the package feed proxy and guarding against malformed URLs. (infra/scripts/utils/Run-PythonScript.ps1) [1] [2] [3] [4] [5]Fabric Solution Installer Improvements:
Other Maintenance:
These changes collectively ensure that Python dependency management is robust, secure, and consistent across all environments, especially for users and CI runners on Microsoft-managed networks.
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information