Skip to content

Conversation

AustinAbro321
Copy link
Contributor

Description

mholt/archives auto detection has been unreliable. Changing the code to instead detect the format using the filename

Fixes #3917

Checklist before merging

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
@AustinAbro321 AustinAbro321 requested review from a team as code owners July 9, 2025 13:46
Copy link

netlify bot commented Jul 9, 2025

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 54f8fbf
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/686e8b3afbe57a000818287e

@AustinAbro321 AustinAbro321 changed the title fix: detect archives from filename rather than mholt/archives auto detection fix: identify file type using filename rather than mholt/archives auto detection Jul 9, 2025
@AustinAbro321 AustinAbro321 changed the title fix: identify file type using filename rather than mholt/archives auto detection fix: identify file type using filename instead of mholt/archives auto detection Jul 9, 2025
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Copy link

codecov bot commented Jul 9, 2025

Codecov Report

Attention: Patch coverage is 59.25926% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pkg/archive/archive.go 61.53% 4 Missing and 6 partials ⚠️
src/pkg/packager/load/import.go 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/pkg/packager/load/import.go 47.68% <0.00%> (-0.13%) ⬇️
src/pkg/archive/archive.go 62.00% <61.53%> (+0.33%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Copy link
Member

@brandtkeller brandtkeller left a comment

Choose a reason for hiding this comment

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

Stepped through the code - switching from Identify() to the internal findArchiver() resolves the initially reported problem of compression being incorrectly identified as brotli.

The requirement for extractor on DecompressOpts is driven from the inability to determine the extractor of a oci blob sha - which for Zarf should be .tar .

@brandtkeller brandtkeller added this pull request to the merge queue Jul 9, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jul 9, 2025
… detection (#3977)

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 9, 2025
@brandtkeller brandtkeller added this pull request to the merge queue Jul 9, 2025
Merged via the queue into main with commit 16a3ba1 Jul 10, 2025
27 checks passed
@brandtkeller brandtkeller deleted the stop-archive-autodetection branch July 10, 2025 00:05
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.

Choosing 'auth' as ZarfPackageConfig component name will break deploy
2 participants