Skip to content

Improve error message for malformed third-party platform archives#3217

Open
nitishagar wants to merge 1 commit into
arduino:masterfrom
nitishagar:nitishagar/improve-3rd-party-archive-error
Open

Improve error message for malformed third-party platform archives#3217
nitishagar wants to merge 1 commit into
arduino:masterfrom
nitishagar:nitishagar/improve-3rd-party-archive-error

Conversation

@nitishagar

Copy link
Copy Markdown

What

Make the platform-archive structure errors in findPackageRoot user-actionable.

Why

Installing a third-party core whose archive is structured incorrectly surfaced a low-level internal message, e.g.:

searching package root dir: no unique root dir in archive, found '.../cores' and '.../firmwares'

This is hard for end users to act on, and GUI tools (e.g. Arduino IDE) sometimes display it verbatim. See #3131.

How

Reword both findPackageRoot errors (zero root folders / multiple root folders) to explain that the archive is malformed and that it is likely a problem with the third-party platform, pointing the user to the platform maintainer. The multiple-root case still lists the offending folders.

Fixes #3131

When a third-party core's downloaded archive is not structured correctly,
findPackageRoot surfaced a low-level message ("no unique root dir in
archive ...") that is hard for end users and GUIs to act on.

Reword both archive-structure errors to explain the problem and point the user
to the platform maintainer, while still listing the offending folders in the
multiple-root case.

Fixes arduino#3131
@nitishagar

Copy link
Copy Markdown
Author

The two failing checks here appear unrelated to this change, which only rewords two error strings in findPackageRoot:

  • test-integration (macos-latest, monitor) — a flaky monitor integration test (the same group also flaked on my unrelated PR Fix concurrent map read/write panic in configuration map #3216).
  • Create artifact Linux_ARM64 — failed on a transient Docker registry timeout while pulling debian:bookworm (Head "https://registry-1.docker.io/...": i/o timeout), i.e. an infrastructure hiccup, not a build error.

No integration test references the reworded strings, and the resources unit tests pass. Could a maintainer re-run the failed jobs when convenient? Thanks!

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.45%. Comparing base (f9fd5c7) to head (9335a89).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3217      +/-   ##
==========================================
+ Coverage   69.43%   69.45%   +0.01%     
==========================================
  Files         252      252              
  Lines       19595    19595              
==========================================
+ Hits        13606    13609       +3     
+ Misses       4718     4716       -2     
+ Partials     1271     1270       -1     
Flag Coverage Δ
unit 69.45% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant