Skip to content

Trigger full PR build on changes under src/Layers#8939

Merged
mazhelez merged 1 commit into
mainfrom
aholstrup1-friendly-barnacle
Jul 2, 2026
Merged

Trigger full PR build on changes under src/Layers#8939
mazhelez merged 1 commit into
mainfrom
aholstrup1-friendly-barnacle

Conversation

@aholstrup1

@aholstrup1 aholstrup1 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What & why

Incremental PR builds (incrementalBuilds.onPull_Request: true) only build projects whose appFolders/testFolders cover the modified files. The src/Layers/* folders (for example src/Layers/NL/BaseApp, src/Layers/W1/BaseApp) are consumed by projects but are not listed as project folders, so a PR that only touches a layer maps to zero projects. The "Determine Projects To Build" step then logs Did not find any projects to add to the build order, emits ProjectsJson=[], and every build job is skipped, producing a green PR build that compiled nothing.

Rather than disable incremental builds entirely, this adds a fullBuildPatterns entry for src/Layers/*. AL-Go's DetermineProjectsToBuild matches modified files against these patterns with PowerShell -like (where * spans path separators), so any change nested under src/Layers forces a full Pull Request build. Normal app-only changes keep fast incremental builds.

Linked work

AB#640966

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app(s) locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.
  • I added or updated tests for the new behavior, or explained below why none are needed.

What I tested and the outcome

Configuration-only change to .github/AL-Go-Settings.json; no app code affected, so no AL build or BC run applies. Root cause verified against the failing run on PR #8933 (run 28448705321), where the Initialization job logged Did not find any projects to add to the build order and ProjectsJson=[], causing all Build jobs to be skipped. Pattern semantics confirmed from AL-Go DetermineProjectsToBuild.psm1 (IsFullBuildRequired uses $modifiedFiles -like $fullBuildFolder after joining with the base folder).

Risk & compatibility

Low. Incremental builds stay enabled, so the only behavior change is that PRs touching src/Layers/* now build all projects (intended). If additional shared-but-unmapped roots are found later, they can be added to fullBuildPatterns the same way.

@aholstrup1
aholstrup1 requested review from a team June 30, 2026 14:29
@github-actions github-actions Bot added the Build: Automation Workflows and other setup in .github folder label Jun 30, 2026
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Copilot PR Review

Iteration 2 · Outcome: not-applicable

The diff contains no AL source changes (only .github/AL-Go-Settings.json, a CI/build-pipeline configuration file). All six AL-domain sub-skills declined with outcome 'not-applicable' because the task context lacks an AL dimension.

Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630

No findings were posted for this iteration.

Orchestrator pre-filter (13 file(s) excluded)

  • layer-disabled (knowledge) : 13 file(s)

Findings produced by the Copilot CLI agent against BCQuality at 822cae1b2771ac25f665f73369f69093bd4fd630. Reply 👎 on any inline comment to flag false positives.

@github-actions github-actions Bot added this to the Version 29.0 milestone Jun 30, 2026
@aholstrup1
aholstrup1 enabled auto-merge June 30, 2026 14:47
Add a fullBuildPatterns entry so any change under src/Layers forces a full Pull Request build. These layer folders are not referenced by any AL-Go project's appFolders/testFolders, so incremental builds matched such changes to zero projects and skipped every build job. Keeping incremental builds enabled preserves fast PR builds for normal app changes.
@aholstrup1
aholstrup1 force-pushed the aholstrup1-friendly-barnacle branch from a7a6dc0 to 4d45399 Compare July 1, 2026 06:29
@aholstrup1 aholstrup1 changed the title Disable incremental builds for pull requests Trigger full PR build on changes under src/Layers Jul 1, 2026
@mazhelez
mazhelez disabled auto-merge July 2, 2026 00:25
@mazhelez
mazhelez merged commit 6c6fb15 into main Jul 2, 2026
328 of 334 checks passed
@mazhelez
mazhelez deleted the aholstrup1-friendly-barnacle branch July 2, 2026 00:25
spetersenms added a commit that referenced this pull request Jul 2, 2026
The second fullBuildPatterns key (added in #8939) silently overrode the
original patterns when parsed by ConvertFrom-Json, dropping build/*,
src/rulesets/* and the workflow patterns. Merge src/Layers/* into the
single existing array so all patterns trigger a full build again.


[AB#612711](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/612711)

## How I validated this

- [ ] I read the full diff and it contains only changes I intended.
- [ ] I built the affected app(s) locally with no new analyzer warnings.
- [ ] I ran the change in Business Central and confirmed it behaves as
expected.
- [ ] I added or updated tests for the new behavior, or explained below
why none are needed.

**What I tested and the outcome** *(required — be specific: scenarios,
commands, screenshots for UI changes)*

<!-- Example:
- Ran the new "Post and Send" action on a sales invoice in a fresh
container; document posted and email queued (see screenshot).
- New unit tests in MyFeatureTest.Codeunit.al pass locally; full module
test suite green.
- No tests added because change is comment-only / refactor with existing
coverage. -->

## Risk & compatibility

<!-- Anything reviewers should watch for: breaking changes, upgrade/data
impact, permissions,
telemetry, feature flags, follow-up work. Write "None" if there's
nothing to call out. -->

Co-authored-by: spetersenms <spetersenms@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
alexei-dobriansky pushed a commit that referenced this pull request Jul 2, 2026
## What & why

Incremental PR builds (`incrementalBuilds.onPull_Request: true`) only
build projects whose `appFolders`/`testFolders` cover the modified
files. The `src/Layers/*` folders (for example `src/Layers/NL/BaseApp`,
`src/Layers/W1/BaseApp`) are consumed by projects but are not listed as
project folders, so a PR that only touches a layer maps to zero
projects. The "Determine Projects To Build" step then logs `Did not find
any projects to add to the build order`, emits `ProjectsJson=[]`, and
every build job is skipped, producing a green PR build that compiled
nothing.

Rather than disable incremental builds entirely, this adds a
`fullBuildPatterns` entry for `src/Layers/*`. AL-Go's
`DetermineProjectsToBuild` matches modified files against these patterns
with PowerShell `-like` (where `*` spans path separators), so any change
nested under `src/Layers` forces a full Pull Request build. Normal
app-only changes keep fast incremental builds.

## Linked work


[AB#640966](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/640966)

## How I validated this

- [x] I read the full diff and it contains only changes I intended.
- [ ] I built the affected app(s) locally with no new analyzer warnings.
- [ ] I ran the change in Business Central and confirmed it behaves as
expected.
- [ ] I added or updated tests for the new behavior, or explained below
why none are needed.

**What I tested and the outcome**

Configuration-only change to `.github/AL-Go-Settings.json`; no app code
affected, so no AL build or BC run applies. Root cause verified against
the failing run on PR #8933 (run 28448705321), where the Initialization
job logged `Did not find any projects to add to the build order` and
`ProjectsJson=[]`, causing all Build jobs to be skipped. Pattern
semantics confirmed from AL-Go `DetermineProjectsToBuild.psm1`
(`IsFullBuildRequired` uses `$modifiedFiles -like $fullBuildFolder`
after joining with the base folder).

## Risk & compatibility

Low. Incremental builds stay enabled, so the only behavior change is
that PRs touching `src/Layers/*` now build all projects (intended). If
additional shared-but-unmapped roots are found later, they can be added
to `fullBuildPatterns` the same way.

Co-authored-by: aholstrup1 <aholstrup1@users.noreply.github.com>
alexei-dobriansky pushed a commit that referenced this pull request Jul 2, 2026
The second fullBuildPatterns key (added in #8939) silently overrode the
original patterns when parsed by ConvertFrom-Json, dropping build/*,
src/rulesets/* and the workflow patterns. Merge src/Layers/* into the
single existing array so all patterns trigger a full build again.


[AB#612711](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/612711)

## How I validated this

- [ ] I read the full diff and it contains only changes I intended.
- [ ] I built the affected app(s) locally with no new analyzer warnings.
- [ ] I ran the change in Business Central and confirmed it behaves as
expected.
- [ ] I added or updated tests for the new behavior, or explained below
why none are needed.

**What I tested and the outcome** *(required — be specific: scenarios,
commands, screenshots for UI changes)*

<!-- Example:
- Ran the new "Post and Send" action on a sales invoice in a fresh
container; document posted and email queued (see screenshot).
- New unit tests in MyFeatureTest.Codeunit.al pass locally; full module
test suite green.
- No tests added because change is comment-only / refactor with existing
coverage. -->

## Risk & compatibility

<!-- Anything reviewers should watch for: breaking changes, upgrade/data
impact, permissions,
telemetry, feature flags, follow-up work. Write "None" if there's
nothing to call out. -->

Co-authored-by: spetersenms <spetersenms@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants