Repository navigation
Isolate build resources and cleanup on shared Docker hosts - #2483
Open
spetersenms wants to merge 9 commits into
Open
spetersenms wants to merge 9 commits into
spetersenms wants to merge 9 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2 of 3 tasks
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The cache selectors depend on the still-unmerged microsoft/navcontainerhelper#4249 casing fix, requiring maintainer-coordinated release sequencing to avoid silently skipping shared-cache maintenance.
No open issues 🎉
What changed in this PR
Isolates AL-Go build resources on shared Docker hosts so parallel jobs do not reuse or remove each other’s containers or compiler folders.
Changes:
- Persists a unique GUID-based resource identity across each job’s steps.
- Adds job-specific cleanup and limits shared maintenance to caches and images.
- Adds regression tests and documents shared-host cleanup behavior.
| File | Description |
|---|---|
| Tests/RunPipeline.Action.Test.ps1 | Tests shared-cache selectors and retention. |
| Tests/PipelineCleanup.Action.Test.ps1 | Tests job-specific cleanup and non-fatal failures. |
| Tests/BuildResources.Test.ps1 | Tests identity uniqueness, persistence, and validation. |
| Tests/BuildResourceLifecycle.Test.ps1 | Tests initialization and compiler-folder cleanup. |
| Scenarios/settings.md | Clarifies cache retention scope and concurrency risks. |
| Scenarios/SelfHostedGitHubRunner.md | Documents resource ownership and manual cleanup. |
| RELEASENOTES.md | Announces isolation and related issue fixes. |
| Actions/RunPipeline/RunPipeline.ps1 | Uses job identity and restricts shared maintenance. |
| Actions/PipelineCleanup/PipelineCleanup.ps1 | Targets the persisted job identity or skips cleanup. |
| Actions/CompileApps/Compile.ps1 | Protects existing folders and cleans the assigned compiler folder. |
| Actions/AL-Go-Helper.ps1 | Adds job resource identity initialization and persistence. |
| Actions/.Modules/settings.schema.json | Aligns cache retention metadata with documentation. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
❔What, Why & How
Give each build job a unique GUID-based container/compiler-folder name, persisted across its steps, so parallel build modes no longer replace or remove each other's resources. Clean up the assigned compiler folder in the compile action and restrict shared maintenance to caches/images instead of sweeping containers and compiler folders across the host.
No ownership labels or workflow YAML changes. Resources left by interrupted builds require manual cleanup; existing non-fatal pipeline cleanup logging is preserved.
Companion PR: microsoft/navcontainerhelper#4249 fixes cache-selector casing so the explicit cache categories continue to run without all.
Related to issue: #2416, #2453, #1675
✅ Checklist