Workspace Compilation Follow-up - Add support for BCPT and Upgrade Tests#2186
Workspace Compilation Follow-up - Add support for BCPT and Upgrade Tests#2186aholstrup1 wants to merge 7 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds missing pieces to workspace compilation so upgrade testing and AppSourceCop baselines can use previous-release apps, and extends workspace compilation to BCPT test folders.
Changes:
- Introduces a new
DownloadPreviousReleasecomposite action and wires it into project build templates. - Passes
previousAppsPaththroughCompileAppsandRunPipeline, and updates logic to consume previously-downloaded apps for upgrade scenarios. - Adds
New-AppSourceCopJsongeneration and BCPT compilation support, plus updates docs and tests.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/DownloadPreviousRelease.Action.Test.ps1 | Adds a compile/yaml-contract test for the new action |
| Tests/DetermineProjectsToBuild.Test.ps1 | Minor test adjustment in project build determination |
| Tests/CompileFromWorkspace.Test.ps1 | Adds unit tests for New-AppSourceCopJson behavior |
| Templates/Per Tenant Extension/.github/workflows/_BuildALGoProject.yaml | Downloads previous release and forwards previousAppsPath |
| Templates/AppSource App/.github/workflows/_BuildALGoProject.yaml | Downloads previous release and forwards previousAppsPath |
| Scenarios/settings.md | Updates workspace compilation documentation/requirements |
| Actions/RunPipeline/action.yaml | Adds previousAppsPath input and forwards it to script |
| Actions/RunPipeline/RunPipeline.ps1 | Consumes previousAppsPath for upgrade testing; adjusts workspace compilation folder handling |
| Actions/DownloadPreviousRelease/action.yaml | New composite action definition |
| Actions/DownloadPreviousRelease/README.md | New action documentation |
| Actions/DownloadPreviousRelease/DownloadPreviousRelease.ps1 | Implements previous release discovery/download and outputs path |
| Actions/CompileApps/action.yaml | Adds previousAppsPath input and forwards it to script |
| Actions/CompileApps/Compile.ps1 | Uses previous apps for AppSourceCop baseline and compiles BCPT folders |
| Actions/.Modules/CompileFromWorkspace.psm1 | Adds New-AppSourceCopJson and exports it |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mazhelez
left a comment
There was a problem hiding this comment.
Minor adjustments might be needed.
Just confirmed with Developer Experience: app ID and version are the only true parts of an app identity.
And, even if documentation is inaccurate, the Name and Publisher should be avoided.
| $appJson = Get-Content -Path $appJsonPath -Raw | ConvertFrom-Json | ||
| $key = "$($appJson.Publisher)_$($appJson.Name)" | ||
| if ($previousAppVersions.ContainsKey($key)) { | ||
| $appSourceCopJson["Publisher"] = $appJson.Publisher |
There was a problem hiding this comment.
Publisher and Name are not mandatory.
In fact, it might be problematic if the app was renamed.
If Version is specified in the AppSourceCop.json then the breaking changes logic would look for a package with that version and same app ID to use as a baseline.
| if ($previousApps.Count -gt 0) { | ||
| # Copy previous apps to the package cache so AppSourceCop can resolve them | ||
| $previousApps | ForEach-Object { | ||
| Copy-Item -Path $_ -Destination $packageCachePath -Force |
There was a problem hiding this comment.
Alternatively, and better in my opinion, is to set baselinePackageCachePath in the AppSourceCop.json.
| # Compile BCPT Test Apps | ||
| $testAppFiles += Build-AppsInWorkspace @buildParams ` | ||
| -Folders $settings.bcptTestFolders ` | ||
| -OutFolder $testAppOutputFolder ` |
There was a problem hiding this comment.
Is it intentional that test apps and BCPT test apps are not separated?
❔What, Why & How
This PR addresses a few follow-up items for supporting workspace compilation. Specifically
Related to AB#620485 and AB#620310
✅ Checklist