← Back to Pull requests

chore(flare): replace mholt/archiver with archive/zip #3363

Closed
unknown closed this pull request without merging on Nov 23, 2026 10:35 UTC
View on GitHub
unknown unknown commented on Aug 17, 2026 14:45 UTC
Author

What does this PR do?

Replaces github.com/mholt/archiver/v3 in kubectl datadog flare with Go's standard archive/zip package. It removes the old module and regenerates the dependency and third-party license files.

With a regular staging directory, the ZIP keeps its top-level datadog-operator/ directory and the collected files beneath it. The writer skips symlinks and other special files, reserves the archive filename exclusively, and removes incomplete archives after errors. Compression sizes and error messages can differ.

Motivation

The deprecated package carries extraction advisories. The flare command only writes ZIP files, so the standard library covers the format it needs. Upstream deprecation notice · ZIP advisory · TAR advisory

In local darwin/arm64 builds, removing the old package reduced the plugin size by about 2.1 MB compared with main.

Minimum Agent Versions

None. The change is confined to the kubectl plugin.

Describe your test plan

  • Ran go test ./... ./api/..., make lint, and make verify-licenses with Go 1.26.11.

  • Built the plugin from main and this branch, then ran both against the same local Kubernetes fixture with upload declined. Both ZIPs passed integrity checks and matched on entry order, compression methods, permissions, and extracted contents. The fixture API key was redacted in both.

  • Verified the updated binary's build metadata omits both third-party archive modules.
  • Checklist

  • PR has at least one valid label: bug, enhancement, refactoring,

  • documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label

  • All commits are signed (see: [signing commits][1])
  • [1]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

    Diff: 245 lines (+183 / -62) across 3 files Reviewer: wdhif Review duration: 140870m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 245 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.329
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3363"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 38.9% (MEDIUM) · Higher = larger blast radius
    38.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.3% · Safe to merge
    15.3%