Skip to content

fix(downloader): skip OS packages when a binary is expected - #149

Merged
roxblnfk merged 5 commits into
1.xfrom
fix/package-assets
Oct 10, 2026
Merged

roxblnfk merged 5 commits into
1.xfrom
fix/package-assets

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

What was changed

  • When a binary is expected (a <binary> is configured and the type is not phar), OS packages — .deb, .rpm, .apk, .snap, .flatpak, .msi, .msix, .msixbundle, .appx, .appxbundle, .nupkg, .dmg, .pkg — are no longer selected. A release that has only a package for the host now counts as "no matching asset", and the downloader moves on to an older release.
  • The failure report names the skipped packages: such a release reads "only OS packages match …" and gets an extra line OS packages are skipped because a binary is expected: ….
  • Without a <binary>, packages are still offered, so downloading a .deb on purpose keeps working.

Why?

A selected package downloaded fine and only failed the installation with NothingExtracted. That happens after the downloader has returned, so older releases with a tar.gz were never tried and the whole get failed. Hit by roadrunner-php/cli#49 (VersionSelectionTest::fallsBackToOlderReleaseWhenNewestHasNoAssembly).

Treating NothingExtracted as an asset failure would also cover an archive without the binary, but it means moving the installation into the release loop. That is left for a separate change.

Checklist

  • Tested
    • Tested manually
    • Unit tests added
  • Documentation

@github-actions github-actions Bot added bug Something isn't working tests labels Oct 10, 2026
@codecov

codecov Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/Module/Downloader/Downloader.php 100.00% <100.00%> (ø)
...wnloader/Internal/AssetSelection/AssetSelector.php 100.00% <100.00%> (ø)
...oader/Internal/AssetSelection/Rule/PackageRule.php 100.00% <100.00%> (ø)
...e/Downloader/Internal/AssetSelection/Selection.php 100.00% <100.00%> (ø)
...Downloader/Internal/Diagnostics/ReleaseAttempt.php 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

docs: note that OS packages are not selected for a binary

A selected package downloads fine and only fails the installation with nothing extracted, after the release loop has ended, so an older release with an archive was never tried. Dropping packages at selection turns that release into "no matching asset" and the downloader moves on.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(downloader): skip snap, flatpak, msix, appx and nupkg packages too
test(downloader): cover the fallback to an older release over a package
docs: list every skipped package format and the new report lines

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…to an older one

docs: state that the package fallback reaches the 10 newest matching releases
refactor(downloader): name the cap on tried releases
test(downloader): cover the skipped OS packages line of the failure report

The cap stays at 10: raising it to the API page size would load further
release pages whenever the version constraint matches fewer releases.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…r repository

test(downloader): cover which skipped releases the packages-only warning names

The release that had only OS packages was remembered for the whole download, so a
later repository, or a refetched release list, warned that a version had only OS
packages while downloading that same or a newer version from elsewhere.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…se report

docs(downloader): note that the packages-only release is kept per repository pass

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk merged commit 2ead813 into 1.x Oct 10, 2026
23 checks passed
@roxblnfk
roxblnfk deleted the fix/package-assets branch October 10, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant