Skip to content
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

[breaking] Do not prevent CLI startup if inventory.yaml is corrupted #2232

Merged
merged 3 commits into from
Jun 27, 2023

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Jun 26, 2023

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?

Allows the CLI to start if a corrupted inventory.yaml is found.

What is the current behavior?

The CLI do no start, forcing the user to manually remove inventory.yaml

What is the new behavior?

The CLI automatically replaces inventory.yaml with a new one.

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

The inventory packages has been made private.

Other information

Fix #2229

@cmaglie cmaglie added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jun 26, 2023
@cmaglie cmaglie self-assigned this Jun 26, 2023
@cmaglie cmaglie requested a review from ubidefeo June 26, 2023 15:34
@cmaglie cmaglie added this to the Arduino CLI 0.34.0 milestone Jun 26, 2023
@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (eca9d9a) 62.95% compared to head (c86aa78) 62.94%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2232      +/-   ##
==========================================
- Coverage   62.95%   62.94%   -0.01%     
==========================================
  Files         220      220              
  Lines       19478    19476       -2     
==========================================
- Hits        12263    12260       -3     
  Misses       6132     6132              
- Partials     1083     1084       +1     
Flag Coverage Δ
unit 62.94% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
commands/board/list.go 60.00% <ø> (ø)
commands/compile/compile.go 69.86% <ø> (ø)
internal/cli/cli.go 87.09% <ø> (ø)
internal/cli/updater/updater.go 15.15% <ø> (ø)
internal/inventory/inventory.go 53.19% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cmaglie cmaglie merged commit 64d019d into arduino:master Jun 27, 2023
@cmaglie cmaglie deleted the fix_inventory_bug branch June 27, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inventory.yaml edge case can break structure and prevent Arduino IDE 2.0 from starting
3 participants