refactor: Refactor codebase by removing unused scripts and configurations#899
Closed
Kanchan-Microsoft wants to merge 7 commits into
Closed
refactor: Refactor codebase by removing unused scripts and configurations#899Kanchan-Microsoft wants to merge 7 commits into
Kanchan-Microsoft wants to merge 7 commits into
Conversation
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to refactor/trim the codebase by removing unused helper code, tests, scripts, and infrastructure configuration outputs, plus simplifying some frontend/runtime configuration handling and updating the compiled infra template artifacts.
Changes:
- Removes unused Python helper modules/tests (API
helpers/utils.py,helpers/streaming_helper.py) and related test files. - Removes frontend runtime config loader + bundled
public/config/config.json, and prunes several frontend npm dependencies. - Cleans up infra: deletes
infra/resources.bicep, removes various module outputs, updatesinfra/main.bicep/infra/main_custom.bicep, and refreshes the compiledinfra/main.json.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tests/api/helpers/test_utils.py | Deleted tests for removed API helper utilities. |
| src/tests/api/helpers/test_streaming_helper.py | Deleted tests for removed streaming helper. |
| src/tests/api/common/config/test_config.py | Removes an unused env var from the config test fixture. |
| src/App/src/configs/Utils.tsx | Removes unused loadConfig() utility. |
| src/App/public/config/config.json | Deletes a previously bundled UI config file. |
| src/App/package.json | Removes several npm deps; dependency graph updated (but see review comments on lockfile/overrides). |
| src/api/requirements.txt | Removes unused Python deps (aiohttp, openai). |
| src/api/helpers/utils.py | Deletes an unused API helper module. |
| src/api/helpers/streaming_helper.py | Deletes an unused API streaming helper module. |
| next-steps.md | Updates infra documentation to reflect infra/main.bicep as the primary template. |
| infra/scripts/index_scripts/00_create_sample_data_files.py | Deletes a sample/export script. |
| infra/resources.bicep | Removes a large legacy infra template file. |
| infra/modules/web-sites.config.bicep | Removes unused outputs from the module. |
| infra/modules/web-sites.bicep | Removes unused outputs from the module. |
| infra/modules/virtualNetwork.bicep | Removes unused subnet output(s). |
| infra/modules/role-assignment.bicep | Removes unused output from the module. |
| infra/modules/ai-services.bicep | Removes unused outputs from the module. |
| infra/main.json | Refreshes compiled ARM template output (includes some behavioral + formatting deltas). |
| infra/main.bicep | Updates infra template (notably Search module params and added comments/telemetry notes). |
| infra/main_custom.bicep | Updates custom infra template; removes some parameters and aligns with other infra changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
Comment on lines
+38518
to
+38522
| @@ -38599,6 +38519,7 @@ | |||
| "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]", | |||
| "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageQueue)]", | |||
| "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageFile)]", | |||
| "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]", | |||
Comment on lines
+769
to
+776
| // Respect the deployment-wide private networking setting for Search as well. | ||
| publicNetworkAccess: enablePrivateNetworking ? 'Disabled' : 'Enabled' | ||
| privateEndpoints: enablePrivateNetworking | ||
| ? [ | ||
| { | ||
| name: 'pep-search-${solutionSuffix}' | ||
| subnetResourceId: virtualNetwork!.outputs.pepsSubnetResourceId | ||
| privateDnsZoneGroup: { |
Comment on lines
+752
to
+759
| // Respect the deployment-wide private networking setting for Search as well. | ||
| publicNetworkAccess: enablePrivateNetworking ? 'Disabled' : 'Enabled' | ||
| privateEndpoints: enablePrivateNetworking | ||
| ? [ | ||
| { | ||
| name: 'pep-search-${solutionSuffix}' | ||
| subnetResourceId: virtualNetwork!.outputs.pepsSubnetResourceId | ||
| privateDnsZoneGroup: { |
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 makes several updates to the infrastructure code, focusing on improving documentation, aligning network and security configurations, and cleaning up unused or redundant code. The changes also update the Bicep-to-ARM template output and remove some previously required parameters and outputs.
Key changes include:
Documentation and Clarity Improvements:
infra/main.bicepfile for AVM telemetry, Azure Bastion Host, and Jumpbox VM sections, explaining their purpose and deployment scenarios.Networking and Security Configuration:
enablePrivateNetworkingparameter). When private networking is enabled, public access is disabled and private endpoints are created.bastionSubnetResourceIdanddeploymentScriptsSubnetResourceId) from the ARM template output, streamlining the generated infrastructure.AI Services and Parameters Cleanup:
aiFoundryAIservicesEnabledvariable and related conditional logic, always deploying the AI Foundry AI Services module and cleaning up related parameters.existingOpenAIEndpointvariable.Scalability and Redundancy Configuration:
skuCapacityparameter for the App Service Plan to always use a value of 1, regardless of scalability settings.Template and Metadata Updates:
main.jsonfile, reflecting the latest code generation.privatelink.azurewebsites.netandwebAppto support additional private networking scenarios.These changes improve maintainability, security, and clarity of the deployment templates.
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information