Skip to content

Improved package index merging logic#2713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

cmaglie
Copy link
Member

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

In some sporadic cases, there may exist some stale package_*_index.json files with an invalid or empty entry in the tools section. In particular, due to the way the package indexes are loaded, the tool resource metadata may be overwritten or deleted by an invalid index. This change should improve the resilience of the Arduino CLI in most of these cases.

What is the current behavior?

What is the new behavior?

Does this PR introduce a breaking change, and is titled accordingly?

Other information

@cmagliecmaglie self-assigned this Oct 1, 2024
@cmagliecmaglie added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Oct 1, 2024
@cmagliecmaglie added this to the Arduino CLI v1.1.0 milestone Oct 1, 2024
@codecovCodecov
Copy link

codecovbot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.66%. Comparing base (863c1ec) to head (d350fdc).
Report is 10 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@## master #2713 +/- ## ========================================== - Coverage 67.68% 67.66% -0.02%  ========================================== Files 234 234 Lines 22226 22226 ========================================== - Hits 15043 15040 -3 - Misses 6001 6003 +2 - Partials 1182 1183 +1 
FlagCoverage Δ
unit67.66% <100.00%> (-0.02%)⬇️

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

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

@cmagliecmaglie merged commit ac6ec6d into arduino:masterOct 7, 2024
99 checks passed
@cmagliecmaglie deleted the improved_json_index_merging branch October 7, 2024 16:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: codeRelated to content of the project itselftype: enhancementProposed improvement
4 participants
@cmaglie@alessio-perugini@facchinm@Xayton
close