Skip to content

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

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 3 commits into from
Jun 27, 2023

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?

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

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

codecovbot 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 
FlagCoverage Δ
unit62.94% <0.00%> (-0.01%)⬇️

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

Impacted FilesCoverage Δ
commands/board/list.go60.00% <ø> (ø)
commands/compile/compile.go69.86% <ø> (ø)
internal/cli/cli.go87.09% <ø> (ø)
internal/cli/updater/updater.go15.15% <ø> (ø)
internal/inventory/inventory.go53.19% <0.00%> (ø)

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

@cmagliecmaglie merged commit 64d019d into arduino:masterJun 27, 2023
@cmagliecmaglie deleted the fix_inventory_bug branch June 27, 2023 13:16
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
3 participants
@cmaglie@alessio-perugini@umbynos
close