Skip to content

fix(deps): report the proxy archive rejection instead of a later HTTP 404 - #3375

Open
Mohammed Alkindi (MohammedAlkindi) wants to merge 3 commits into
microsoft:mainfrom
MohammedAlkindi:fix/proxy-archive-error-diagnostic
Open

Mohammed Alkindi (MohammedAlkindi) wants to merge 3 commits into
microsoft:mainfrom
MohammedAlkindi:fix/proxy-archive-error-diagnostic

Conversation

@MohammedAlkindi

Copy link
Copy Markdown
Contributor

Description

Behind PROXY_REGISTRY_URL, a rejected proxy archive (symlink member or non-zip body) was followed by fallback 404s, so the error read "Last error: HTTP 404". The download now keeps the first rejection and reports it as Archive error: when no URL succeeds. A later valid archive still wins.

Issue and approved scope

Issue: Refs #3110

Human scope-approval comment: #3110 (comment)

Does this PR complete the issue, or what remains? No: diagnostic slice only; symlink handling stays deferred.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass (one existing exec-bit test fails on Windows on main too)
  • Added tests for new functionality (if applicable)

Spec conformance (OpenAPM v0.1)

  • Spec edit: docs/src/content/docs/specs/openapm-v0.1.md updated (new/changed <a id="req-XXX"></a> anchor + prose + Appendix C row).
  • Manifest edit: docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.yml updated.
  • Test edit: a @pytest.mark.req("req-XXX") test under tests/spec_conformance/ added or extended.
  • CONFORMANCE.{md,json} regenerated via uv run --extra dev python -m tests.spec_conformance.gen_statement and committed.
  • N/A -- this PR does not change OpenAPM-observable behaviour.

When a registry proxy URL returns 200 but the archive is rejected (unsafe
member such as a symlink, or a body that is not a zip), the loop moved on
to the remaining fallback URLs and their 404s overwrote the cause, so the
error ended in "Last error: HTTP 404". Track the first archive rejection
separately and report it when no URL succeeds. A later valid archive
still wins.

Refs microsoft#3110

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

This branch has not been deployed

No deployments
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.

2 participants