Harden Linux SDK dependency setup - #770
Merged
Merged
Conversation
Refresh apt metadata before the cached installation, verify Bubblewrap and LXC afterward, and retry a direct install when the cache action leaves dependencies incomplete. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 52e48fee-23e1-4b05-803c-522812fcdda2
Richie Gomez (richiemsft)
requested review from
a team
and
a balanced review from Copilot
August 7, 2026 16:39
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
Author
|
hey Soham Das (@SohamDas2021) I've been getting some flaky results from the linux validation step, sometimes there is a 404 in the logs. adding retries to the job. |
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens Linux SDK integration dependency setup against stale APT metadata and incomplete cache restoration.
Changes:
- Refreshes APT indexes and bumps the cache namespace.
- Adds dependency verification, repair retries, and strict LXC service checks.
- One issue remains:
dpkg-queryforces repair on every cache hit.
Validate the commands restored by cache-apt-pkgs-action instead of querying dpkg state, which the action intentionally does not restore. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 52e48fee-23e1-4b05-803c-522812fcdda2
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
.github/workflows/SDK.Integration.Test.Job.yml:142
- The retry loop does not cover index-refresh failures: because
set -eis active andapt-get updateis outside theif, any transient update error exits the step on the first attempt instead of reaching attempts 2 and 3. Include the refresh in the conditional so the whole repair operation is retried as intended.
for attempt in 1 2 3; do
sudo apt-get -o Acquire::Retries=3 update
if sudo env DEBIAN_FRONTEND=noninteractive \
apt-get -o Acquire::Retries=3 install -y "${packages[@]}"; then
Use the top-level LXC AppArmor profile, reload systemd units after cache restoration, retry package index failures, and ensure cache action failures flow into explicit verification and repair. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 52e48fee-23e1-4b05-803c-522812fcdda2
Branden Bonaby (bbonaby)
approved these changes
Aug 7, 2026
Branden Bonaby (bbonaby)
left a comment
Collaborator
There was a problem hiding this comment.
Thanks Richie! This should unblock the other PRs in the queue
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.
📖 Description
Keep the cached Bubblewrap/LXC installation as the fast path while preventing stale Ubuntu package metadata from producing a green setup step with no packages installed.
bwrapandlxc-startafter restoration.🔗 References
Observed in https://github.com/microsoft/mxc/actions/runs/31195213220/job/92925641972
🔍 Validation
SDK.Integration.Test.Job.ymlas YAML.bash -n.git diff --check.✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see docs/pull-requests.md)📋 Issue Type
Microsoft Reviewers: Open in CodeFlow