Skip to content

Isolate build resources and cleanup on shared Docker hosts - #2483

Open
spetersenms wants to merge 9 commits into
microsoft:mainfrom
spetersenms:spetersen-microsoft-pipeline-cleanup-isolation
Open

spetersenms wants to merge 9 commits into
microsoft:mainfrom
spetersenms:spetersen-microsoft-pipeline-cleanup-isolation

Conversation

@spetersenms

@spetersenms spetersenms commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

❔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

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

@spetersenms
spetersenms marked this pull request as ready for review December 2, 2026 15:00
@spetersenms
spetersenms requested a review from a team as a code owner December 2, 2026 15:00
Copilot AI balanced review requested due to automatic review settings December 2, 2026 15:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 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

No deployments
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.

2 participants