Skip to content

Updated validate pkg template to use packageInfo#12478

Merged
raych1 merged 11 commits intomainfrom
users/raych1/update-validat-pkg-template
Oct 20, 2025
Merged

Updated validate pkg template to use packageInfo#12478
raych1 merged 11 commits intomainfrom
users/raych1/update-validat-pkg-template

Conversation

@raych1
Copy link
Copy Markdown
Member

@raych1 raych1 commented Oct 13, 2025

The change is to support Java v2 library which needs to get groupId and artifactId from packageInfo to differenciate same artifactId.
Refer to #10229 for details.

  • Added a new PackageInfoFiles parameter to both the pipeline template and the PowerShell script

  • Refactored parameter handling in Validate-All-Packages.ps1 to prioritize Artifacts, then PackageInfoFiles, ensuring backward compatibility with previous usages while supporting the new method.

  • Refactored the ProcessPackage function to work with package info objects

  • Moved functions in the Validate-Package.ps1 to Validate-All-Packages.ps1 and the former script will be deleted in separate PR

  • Deprecated Update-DevOps-Release-WorkItem.ps1 and consolidated the code into the DevOps-WorkItem-Helpers.ps1

Copilot AI review requested due to automatic review settings October 13, 2025 23:11
@raych1 raych1 requested a review from a team as a code owner October 13, 2025 23:11
@raych1 raych1 self-assigned this Oct 13, 2025
@raych1 raych1 requested a review from weshaggard October 13, 2025 23:12
Copy link
Copy Markdown
Contributor

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

Updates the package validation pipeline template and scripts to support Java v2 library requirements by adding a new PackageInfoFiles parameter. This allows the system to differentiate packages with the same artifactId by using groupId and artifactId from packageInfo.

  • Added PackageInfoFiles parameter to both pipeline template and PowerShell scripts for direct package info file processing
  • Refactored parameter handling to prioritize Artifacts then PackageInfoFiles for backward compatibility
  • Consolidated validation functions from Validate-Package.ps1 into Validate-All-Packages.ps1 and moved DevOps work item functions to shared helpers

Reviewed Changes

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

File Description
eng/common/scripts/Validate-All-Packages.ps1 Major refactor consolidating validation logic, adding PackageInfoFiles support, and implementing Java groupId:artifactId handling
eng/common/scripts/Prepare-Release.ps1 Updated to use consolidated DevOps helper function instead of separate script
eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 Added consolidated functions for DevOps operations and authentication checks
eng/common/pipelines/templates/steps/validate-all-packages.yml Added PackageInfoFiles parameter with proper YAML structure

Comment thread eng/common/scripts/Validate-All-Packages.ps1 Outdated
Comment thread eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 Outdated
exit 1
}

&$EngCommonScriptsDir/Update-DevOps-Release-WorkItem.ps1 `
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I assume we should also update this script to use the newly created function.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There're only two places calling this script. One is the validate-package.ps1 and the other is the prepare-release.ps1. Both of them have been updated in this PR.

This script will be deleted as part of the clean-up task.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think I'm OK with deleting that script but please do update the docs at https://dev.azure.com/azure-sdk/internal/_wiki/wikis/internal.wiki/444/Marking-a-Package-as-In-Release what references it. I don't expect anyone is using it.


# If there's a groupId that means this is Java and pkgName = GroupId+ArtifactName
# but the VerifyAPIReview requires GroupId:ArtifactName
if ($packageInfo.PSObject.Members.Name -contains "Group") {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this the core of the changes? The rest seem mostly like refactoring, which is fine but I want to understand what we are actually changing.

Copy link
Copy Markdown
Member Author

@raych1 raych1 Oct 14, 2025

Choose a reason for hiding this comment

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

Line#32 to line#165 were copied from the original validate-package.ps1, which will be deleted as part of the clean-up task.

Main changes include:
ProcessPackage function was updated to take packageInfo parameter. When parameters.ArtifactList is provided for current usage, code was added(line#265) to parse them and create packageInfo, and then it will be passed into ProcessPackage function.

The following snippet is the original code, which means VerifyAPIReview already consumes the full name including groupId for Java package name.

# API review and package name validation
$fulPackageName = $pkgName
$groupId = $null
if ($pkgInfo.PSObject.Members.Name -contains "Group") {
    $groupId = $pkgInfo.Group
}
if ($groupId){
    $fulPackageName = "${groupId}:${pkgName}"
}

@praveenkuttappan do you know if Java uses groupId:artifactId as identifier in APIReview service? It seems to be the case from the apiview, e.g. https://spa.apiview.dev/review/c12fd0a7ffe74c2c8349a181345bffff?activeApiRevisionId=fe96d87ce3f84e48b7b42bc99b8082cd

@raych1
Copy link
Copy Markdown
Member Author

raych1 commented Oct 15, 2025

/azp run azure-sdk-tools - sync - eng-common

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@raych1 raych1 force-pushed the users/raych1/update-validat-pkg-template branch from 7903402 to 81699a8 Compare October 15, 2025 23:17
@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@raych1 raych1 moved this from 🤔 Triage to 🔬 Dev in PR in Azure SDK EngSys 🚀🌒🧑‍🚀 Oct 16, 2025
@raych1 raych1 added the Central-EngSys This issue is owned by the Engineering System team. label Oct 16, 2025
@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

azure-sdk added a commit to Azure/azure-sdk-for-js that referenced this pull request Oct 20, 2025
Sync eng/common directory with azure-sdk-tools for PR
Azure/azure-sdk-tools#12478 See [eng/common
workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow)

---------

Co-authored-by: ray chen <raychen@microsoft.com>
azure-sdk added a commit to Azure/azure-sdk-for-rust that referenced this pull request Oct 20, 2025
Sync eng/common directory with azure-sdk-tools for PR
Azure/azure-sdk-tools#12478 See [eng/common
workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow)

---------

Co-authored-by: ray chen <raychen@microsoft.com>
@raych1 raych1 merged commit a3663d4 into main Oct 20, 2025
10 checks passed
@raych1 raych1 deleted the users/raych1/update-validat-pkg-template branch October 20, 2025 17:29
@kurtzeborn kurtzeborn moved this from 🔬 Dev in PR to 🎊 Closed in Azure SDK EngSys 🚀🌒🧑‍🚀 Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Central-EngSys This issue is owned by the Engineering System team.

Projects

Development

Successfully merging this pull request may close these issues.

5 participants