Skip to content

fix(kata-containers): drop Windows-only vendored import libraries - #18706

Closed
Andrew Phelps (anphel31) wants to merge 1 commit into
4.0from
anphel/fix-kata-containers-flagged-files
Closed

fix(kata-containers): drop Windows-only vendored import libraries#18706
Andrew Phelps (anphel31) wants to merge 1 commit into
4.0from
anphel/fix-kata-containers-flagged-files

Conversation

@anphel31

@anphel31 Andrew Phelps (anphel31) commented Sep 3, 2026

Copy link
Copy Markdown
Member

Removes the Windows-only static import libraries (and their now-dangling checksum references) from the kata-containers vendored-dependencies archive. The real problem these cause is that recursive source-archive scanning has to expand a ~1.6M-member ar-archive explosion in the SRPM, which fails the source package signing scan; the crates are all target-gated to Windows and never compiled on Linux.

What is removed

File removal — three file-remove overlays on the vendor archive (lib/ only):

  • **/winapi-*-pc-windows-*/lib/** — legacy winapi import libraries.
  • **/windows_*_gnu*/lib/** — the windows_*_{gnu,gnullvm} crates (the big one: each libwindows.*.a holds ~21,689 members, vendored per arch/toolchain).
  • **/windows_*_msvc*/lib/** — the windows_*_msvc .lib import archives.

Checksum cleanup — three file-search-replace overlays strip the now-dangling lib/... entries from each affected crate's .cargo-checksum.json (regex '"lib/[^"]*":"[a-f0-9]{64}",', replacement omitted so the match is deleted).

All these crates are target-gated ([target.*-pc-windows-*] / cfg(target_env = ...)), so a Linux build never compiles them (the vendor archive is fully unpacked in %prep, but cargo only verifies manifests for crates it actually builds). Only the lib/ archives (and their checksum entries) are dropped — each crate's Cargo.toml/src/skeleton is kept, so cargo's resolve stays intact.

The repacked archive is pinned via origin = { type = "overlay" }; the post-overlay SHA512 (2a9018a4...a447e4c) is filled into the source-files entry, the rendered sources, and the lock. The release is bumped to 3.26.0-2 via the azl_release counter (a build.defines macro folded into upstream's Release by one spec-set-tag overlay), matching the repo idiom for manual-release components (rubygem-rake, java-25-openjdk). No manual changelog entry is added — kata's spec isn't %autochangelog.

Impact

  • ar-member count: ~1.6M -> 71 (verified by extracting every remaining .a/.lib from the repacked tarball and summing ar t; the 71 are rustix Linux syscall archives that must stay).
  • Dangling checksum entries removed: 16,947 across 141 manifests (0 residual lib/ refs, 0 invalid JSON afterward).
  • Total files in the repacked tarball: 149,435, max nesting depth 2, no remaining decompression bomb.
  • SRPM: ~598 MB -> 457 MB.

Validation

The three AGENTS.md checks for output-affecting changes:

  • Build -- azldev comp build -p kata-containers succeeds -> kata-containers-3.26.0-2.azl4.x86_64.rpm. The Rust build resolves against the repacked vendor dir with the pruned manifests, confirming cargo tolerates both the removed files and the trimmed checksums on Linux.
  • Inspect -- rpm -qlp shows the expected payload (/usr/bin/kata-runtime, kata-ctl, kata-monitor, containerd-shim-kata-v2, .../kata-agent, ...).
  • Smoke-test -- installed into a mock chroot; kata-runtime --version -> 3.26.0, kata-monitor --version -> 0.3.0, kata-ctl loads (all rc=0).

render --check-only and update --check-only both pass with no drift.

Copilot AI balanced review requested due to automatic review settings September 3, 2026 22:21

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.

🟡 Changes recommended

The archive digest remains a placeholder, generated metadata is stale, and the changelog weekday is incorrect.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds an archive overlay to remove Windows-only import libraries from kata-containers’ vendored dependencies.

Changes:

  • Removes flagged Windows-only static libraries during rendering.
  • Pins the repacked vendor archive.
  • Bumps the package release and changelog.
File summaries
File Description
base/comps/kata-containers/kata-containers.comp.toml Adds the removal overlay and archive hash pin.
specs/k/kata-containers/kata-containers.spec Updates the rendered release and changelog.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 3
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread base/comps/kata-containers/kata-containers.comp.toml Outdated
Comment thread base/comps/kata-containers/kata-containers.comp.toml Outdated
Comment thread specs/k/kata-containers/kata-containers.spec Outdated
Copilot AI review requested due to automatic review settings September 3, 2026 23:01
@anphel31
Andrew Phelps (anphel31) force-pushed the anphel/fix-kata-containers-flagged-files branch from e5a3865 to 1df0131 Compare September 3, 2026 23:01
@anphel31
Andrew Phelps (anphel31) marked this pull request as ready for review September 3, 2026 23:02
@anphel31
Andrew Phelps (anphel31) requested a review from a team as a code owner September 3, 2026 23:02

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.

🟡 Changes recommended

The digest and lock are described as placeholders, and mandatory build, inspection, and smoke-test validation remains outstanding.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

base/comps/kata-containers/kata-containers.comp.toml:48

  • The PR description identifies this SHA-512 (and the derived sources/lock state) as a placeholder pending rendering. origin = { type = "overlay" } uses this value to pin the repacked archive, so it must be replaced with the actual post-overlay digest and the dependent sources and lock files regenerated before merge.
hash = "aa029a4bc258ef4d13b0c219230112e20a95957cf302c02307919a28b85165c79586b525274232b00b15dc161c7e21093d1c33b45d5d3856dfe1123ad112f62d"
  • Files reviewed: 3/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread base/comps/kata-containers/kata-containers.comp.toml Outdated

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.

🟡 Changes recommended

The file-removal overlay uses an incorrect metadata category.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 3/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread base/comps/kata-containers/kata-containers.comp.toml Outdated
Copilot AI review requested due to automatic review settings September 3, 2026 23:34
@anphel31
Andrew Phelps (anphel31) force-pushed the anphel/fix-kata-containers-flagged-files branch from 1df0131 to 5cdd572 Compare September 3, 2026 23:34

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.

🟢 Approval recommended

The targeted pruning is consistently rendered, locked, and supported by completed build and smoke-test validation.

Review details
  • Files reviewed: 3/4 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@anphel31

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

Copilot AI review requested due to automatic review settings September 4, 2026 02:16
@anphel31
Andrew Phelps (anphel31) force-pushed the anphel/fix-kata-containers-flagged-files branch from 5cdd572 to 2b64357 Compare September 4, 2026 02:16

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.

🟢 Approval recommended

The overlays are narrowly scoped, generated state is consistent, and the required build and smoke-test validation is documented.

Review details
  • Files reviewed: 3/4 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

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.

🟢 Approval recommended

The overlays, generated files, lock state, and documented build validation are consistent.

Review details
  • Files reviewed: 3/4 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@anphel31

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

Copilot AI review requested due to automatic review settings September 4, 2026 08:57

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.

🟡 Changes recommended

The component configuration still contains an all-zero source hash inconsistent with the generated sources and claimed validation.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 3/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread base/comps/kata-containers/kata-containers.comp.toml Outdated

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.

🟢 Approval recommended

The implementation and generated state are consistent, with only a non-blocking documentation correction identified.

Review details
  • Files reviewed: 3/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread base/comps/kata-containers/kata-containers.comp.toml Outdated
Copilot AI review requested due to automatic review settings September 4, 2026 19:18
@anphel31
Andrew Phelps (anphel31) force-pushed the anphel/fix-kata-containers-flagged-files branch from 48948c8 to 3b7681d Compare September 4, 2026 19:18

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.

🟡 Changes recommended

The rendered 3.26.0-2 package lacks the changelog entry claimed in the PR description.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 4/5 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread base/comps/kata-containers/kata-containers.comp.toml

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.

🟡 Changes recommended

The related pruning overlays should share one per-file metadata block as required by repository guidance.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 4/5 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread base/comps/kata-containers/kata-containers.comp.toml Outdated
Copilot AI review requested due to automatic review settings September 4, 2026 20:56
@anphel31
Andrew Phelps (anphel31) force-pushed the anphel/fix-kata-containers-flagged-files branch from 3b7681d to 891bb3f Compare September 4, 2026 20:56

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.

🟢 Approval recommended

The overlays, generated files, lock, release bump, and documented validation are consistent.

Review details
  • Files reviewed: 5/6 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@anphel31

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

@anphel31
Andrew Phelps (anphel31) marked this pull request as ready for review September 8, 2026 21:08
@anphel31 Andrew Phelps (anphel31) changed the title fix: kata-containers - remove flagged files fix(kata-containers): drop Windows-only vendored import libraries Sep 10, 2026
@anphel31
Andrew Phelps (anphel31) force-pushed the anphel/fix-kata-containers-flagged-files branch from 891bb3f to 6e9b6da Compare September 10, 2026 23:14
The vendored Rust dependencies ship target-gated Windows import libraries
(winapi-*-pc-windows-* and windows_*_{gnu,gnullvm,msvc}) whose lib/ static
archives hold ~1.6M ar members in aggregate, which blows up recursive source
package scanning. These crates are never compiled on Linux, so the lib/
archives are removed and their now-dangling entries are stripped from each
crate's .cargo-checksum.json, leaving cargo's resolve intact. The repacked
vendor tarball is pinned by SHA-512, and the release is bumped to 3.26.0-2
via the azl_release counter.

Signed-off-by: Andrew Phelps <anphel@microsoft.com>

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.

🟢 Approval recommended

The pruning, checksum cleanup, generated outputs, lock refresh, and required validation are consistent and complete.

Review details
  • Files reviewed: 5/6 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@anphel31

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

@christopherco

Copy link
Copy Markdown
Collaborator

Chatted with Andrew Phelps (@anphel31) offline and we can currently go with #18792
We will eventually reintroduce kata-containers with Azure Linux customizations, so I will also capture the work in this PR/branch in a work item if it is needed later

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.

5 participants