-
Notifications
You must be signed in to change notification settings - Fork 174
Sort list of projects before delivering to appsource #2041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
AnalyzeProjectDependenciesbefore 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.
Actions/Deliver/Deliver.ps1
Outdated
| $projectBuildInfo = AnalyzeProjectDependencies -baseFolder $baseFolder -projects $projectList | ||
| $sortedProjectList = @() | ||
| foreach($BuildOrder in $projectBuildInfo.FullProjectsOrder) { | ||
| $sortedProjectList += $BuildOrder.projects | ||
| } |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
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.
spetersenms
left a comment
There was a problem hiding this 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.
❔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:
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:
Related to issue: #2004
✅ Checklist