Skip to content

Conversation

@aholstrup1
Copy link
Collaborator

@aholstrup1 aholstrup1 commented Nov 26, 2025

❔What, Why & How

Currently the Deliver function iterates over the AL-Go projects in the order they are returned by GetProjectsFromRepository. However, the output of this function is not sorted by dependencies. E.g. in BCApps the order would be:

  • build\projects\Apps (W1)
  • build\projects\Business Foundation Tests
  • build\projects\Performance Toolkit Tests
  • build\projects\System Application
  • build\projects\System Application Modules
  • build\projects\System Application Tests
  • build\projects\Test Stability Tools

This can be an issue when Publishing to AppSource if there are dependencies between the apps you are deploying.

Proposed solution: Deliver in the same order as the build. That would change the order to:

  • build\projects\System Application
  • build\projects\Test Stability Tools
  • build\projects\Apps (W1)
  • build\projects\Business Foundation Tests
  • build\projects\Performance Toolkit Tests
  • build\projects\System Application Modules
  • build\projects\System Application Tests

Related to issue: #2004

✅ Checklist

  • Add tests (E2E, unit tests)
  • Update RELEASENOTES.md
  • Update documentation (e.g. for new settings or scenarios)
  • Add telemetry

@aholstrup1 aholstrup1 requested a review from a team as a code owner November 26, 2025 10:48
Copilot AI review requested due to automatic review settings November 26, 2025 10:48
Copilot finished reviewing on behalf of aholstrup1 November 26, 2025 10:51
Copy link
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

This PR addresses issue #2004 by ensuring projects are delivered in dependency order when publishing to AppSource. Previously, the Deliver action processed projects in the order returned by GetProjectsFromRepository, which doesn't account for dependencies between projects. This could cause failures when deploying dependent apps.

Key changes:

  • Projects are now sorted using AnalyzeProjectDependencies before delivery, matching the build order
  • The sorted project list respects dependency relationships, ensuring base projects are delivered before dependent projects

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Comment on lines 72 to 76
$projectBuildInfo = AnalyzeProjectDependencies -baseFolder $baseFolder -projects $projectList
$sortedProjectList = @()
foreach($BuildOrder in $projectBuildInfo.FullProjectsOrder) {
$sortedProjectList += $BuildOrder.projects
}
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

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

The new project sorting logic lacks test coverage. Consider adding tests to verify that projects are correctly sorted by dependencies, especially for multi-project repositories with complex dependency chains. The test should verify that the sorted order matches the build order returned by AnalyzeProjectDependencies.

Copilot uses AI. Check for mistakes.
mazhelez
mazhelez previously approved these changes Nov 28, 2025
spetersenms
spetersenms previously approved these changes Dec 2, 2025
Copy link
Contributor

@spetersenms spetersenms left a comment

Choose a reason for hiding this comment

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

Copilots comments looks relevant, otherwise looks good.

@aholstrup1 aholstrup1 dismissed stale reviews from spetersenms and mazhelez via fb04b62 December 2, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants