Skip to content

Allow both current and previous major platform versions in manifest validation#6954

Open
Copilot wants to merge 2 commits intomainfrom
copilot/fix-platform-version-validation
Open

Allow both current and previous major platform versions in manifest validation#6954
Copilot wants to merge 2 commits intomainfrom
copilot/fix-platform-version-validation

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

Manifest validation was rejecting app.json files with a platform version from the previous major (e.g. 28.0.0.0) when the repo is on the current major (e.g. 29.0), blocking valid PRs targeting releases/28.x.

Changes

  • action.ps1: Replace single $expectedPlatformVersion (derived from repoVersion major.minor) with two explicit versions — $expectedPlatformVersionCurrent and $expectedPlatformVersionPrevious — passed as an array:

    $currentMajor = [int]($currentMajorMinor -split '\.')[0]
    $expectedPlatformVersionCurrent = "$currentMajor.0.0.0"
    $expectedPlatformVersionPrevious = "$($currentMajor - 1).0.0.0"
    Test-ApplicationManifests ... -ExpectedPlatformVersions @($expectedPlatformVersionCurrent, $expectedPlatformVersionPrevious)
  • AppObjectValidation.psm1: Updated Test-ApplicationManifests to accept [string[]] $ExpectedPlatformVersions and use -notin for the platform check. Error message now lists all allowed versions.

Original prompt

Fix platform version validation in .github/actions/TestObjectIdsAndManifests/action.ps1. Currently, it only allows a single platform version of "$currentMajorMinor.0.0", but validation expects either "currentMajor.0.0.0" or "(currentMajor-1).0.0.0".

Steps:

  1. Change the logic so $expectedPlatformVersion can accept both valid platform versions: "$currentMajor.0.0.0" and "($currentMajor-1).0.0.0".
  2. Update how $currentMajor is assigned, using "repoVersionMajor" as config key.
  3. Construct $expectedPlatformVersionCurrent and $expectedPlatformVersionPrevious for the two allowed versions.
  4. Pass both the allowed platform versions to Test-ApplicationManifests.

This should resolve manifest validation errors for PR #6921.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

AB#623973

…ajor versions

Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix platform version validation in action.ps1 Allow both current and previous major platform versions in manifest validation Mar 3, 2026
@github-actions github-actions bot added Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files labels Mar 3, 2026
@mazhelez mazhelez marked this pull request as ready for review March 3, 2026 13:07
@mazhelez mazhelez requested a review from a team as a code owner March 3, 2026 13:07
@github-actions github-actions bot added this to the Version 29.0 milestone Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants