Skip to content

Conversation

hallipr
Copy link
Member

@hallipr hallipr commented Sep 23, 2025

What does this PR do?

  • Updates all build, test, package and release scripts to use a common build_info.json file
    • This file coordinates version numbers, package properties and platform details for all build artifacts
    • all other build and pack scripts should use build_info rather than pulling properties from project files
  • Removes the static build matrix
    • build_info.json also includes dynamically generated build and tests matrices
    • rather than special casing steps in yaml, we should update the build matrix in the script and use simple boolean variables to conditionally run pipeline steps
  • Updates the pack scripts to be server-generic. All ids and server specific settings that go into a package should be pulled from build_info.json, which is built using properties from the servers' project files

Sample build_info.json

GitHub issue number?

closes #53

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Updated command list in /docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

@joshfree joshfree moved this from Untriaged to In Progress in Azure MCP Server Sep 23, 2025
@hallipr hallipr force-pushed the users/pahallis/metadata-json branch 17 times, most recently from 11811f5 to 43e55ed Compare September 30, 2025 18:40
@hallipr hallipr linked an issue Sep 30, 2025 that may be closed by this pull request
@hallipr hallipr force-pushed the users/pahallis/metadata-json branch 5 times, most recently from 107bb97 to 0e55b21 Compare September 30, 2025 21:24
@hallipr hallipr force-pushed the users/pahallis/metadata-json branch from 0e55b21 to 38feff4 Compare September 30, 2025 21:52
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR centralizes build configuration by introducing a build_info.json file that coordinates version numbers, package properties, and platform details across all build artifacts. The changes replace static build matrices with dynamically generated ones and update pack scripts to be server-generic.

  • Updates all build, test, package and release scripts to use a common build_info.json file
  • Removes static build matrices in favor of dynamically generated ones from the build info
  • Converts pack scripts to be server-generic by pulling configuration from build_info.json

Reviewed Changes

Copilot reviewed 33 out of 36 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
servers//src/.csproj Reorganized packaging properties into consistent sections (npm, docker, dnx/nuget, vsix)
eng/scripts/New-BuildInfo.ps1 New script that generates the centralized build_info.json configuration file
eng/scripts/Build-Code.ps1 Updated to use build_info.json instead of individual project properties
eng/scripts/Pack-*.ps1 Refactored packaging scripts to read from build_info.json for server-agnostic configuration
eng/pipelines/ Updated pipeline templates to use dynamic matrices from build_info.json
eng/scripts/helpers/PathHelpers.ps1 New helper for repository path utilities

@hallipr
Copy link
Member Author

hallipr commented Oct 6, 2025

Also we should support pipeline tagging in the same way we do for unified pull request builds in the language repos, so that users can filter by server name in the tags dropdown for the pipeline.

I'll add a followup PR

@hallipr hallipr force-pushed the users/pahallis/metadata-json branch 2 times, most recently from af781a5 to d186241 Compare October 7, 2025 19:21
@joshfree joshfree added this to the 2025-10 milestone Oct 12, 2025
@hallipr hallipr force-pushed the users/pahallis/metadata-json branch from 3af3798 to 89e3351 Compare October 13, 2025 16:53
@hallipr hallipr requested review from conniey and g2vinay October 13, 2025 16:55

$version = $serverInfo.version
Write-Host "Setting variable DockerImageVersion to $version"
Write-Host "##vso[task.setvariable variable=DockerImageVersion;isOutput=true]$version"
Copy link
Member

Choose a reason for hiding this comment

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

nit: Do these need to be output variables now?

$platformSourcePath = "$RepoRoot/eng/npm/platform"

# When running locally, ignore missing artifacts instead of failing
$ignoreMissingArtifacts = $env:TF_BUILD -ne 'true'
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think we have shared function for this in common.

- task: Powershell@2
displayName: "Create build info file"
name: CreateBuildInfo
condition: and(succeeded(), ne(variables['NoPackagesChanged'],'true'))
Copy link
Member

Choose a reason for hiding this comment

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

Do we not need an empty build_info if NoPackagesChanged is set?

ServerName: ${{ parameters.ServerName }}
MatrixConfigs:
- Name: build_matrix
Path: eng/pipelines/build-matrix.json
Copy link
Member

Choose a reason for hiding this comment

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

This matrix no longer exists. You will need to try to share the matrix of the build.

Write-Host "Building version $version, $os-$arch in $outputDir" -ForegroundColor Green
foreach ($os in $OperatingSystem) {
foreach ($arch in $Architecture) {
$platform = $server.platforms
Copy link
Member

Choose a reason for hiding this comment

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

You might need to check that $platform is not empty or contains more than one entry.

if ($CleanBuild) {
# Clean up any previous build artifacts.
Write-Host "Removing existing bin and obj folders"
Remove-Item * -Recurse -Include 'obj', 'bin' -Force -ProgressAction SilentlyContinue
Copy link
Member

Choose a reason for hiding this comment

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

Why clean this way? I would call "dotnet clean" or "dotnet rebuild"

"."
)

Invoke-LoggedCommand "docker build $($dockerArgs -join ' ')"
Copy link
Member

Choose a reason for hiding this comment

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

We should handle the error code on these calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Build artifacts should have package-generic metadata

7 participants