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

Added option to disable integrity checks in core install (for development purposes) #2740

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Oct 29, 2024

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?

We have added a new configuration option, board_manager.enable_unsafe_install, to allow the installation of platforms/tools that do not pass the checksum test. This option has been added to ease the platform's development phase, relieving the developer from having to regenerate the index every time, and is not intended for use in production environments.

What is the current behavior?

If a platform fails the checksum test, it will not be installed:

$ arduino-cli core install GD32Community:gd32
Downloading packages...
[...]
Installing platform GD32Community:[email protected]...
Error during install: Cannot install platform: installing platform GD32Community:[email protected]: testing local archive integrity: testing archive checksum: missing checksum for: ArduinoCore-GD32-main.zip
$

What is the new behavior?

The checksum test may be skipped:

$ ARDUINO_BOARD_MANAGER_ENABLE_UNSAFE_INSTALL=true arduino-cli core install GD32Community:gd32 
Tool GD32Community:[email protected] already installed
Tool GD32Community:[email protected] already installed
Tool GD32Community:[email protected] already installed
Downloading packages...
GD32Community:[email protected] downloaded                                                                                                                                                    
Installing platform GD32Community:[email protected]...
Configuring platform....
Platform GD32Community:[email protected] installed
$

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

No

Other information

Fix #1468

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 68.75000% with 15 lines in your changes missing coverage. Please review.

Project coverage is 67.60%. Comparing base (7ee4cf7) to head (c06d350).

Files with missing lines Patch % Lines
commands/instances.go 25.00% 0 Missing and 3 partials ⚠️
commands/service_platform_upgrade.go 40.00% 2 Missing and 1 partial ⚠️
internal/arduino/resources/install.go 62.50% 2 Missing and 1 partial ⚠️
commands/service_library_install.go 33.33% 0 Missing and 2 partials ⚠️
.../arduino/cores/packagemanager/install_uninstall.go 80.00% 0 Missing and 2 partials ⚠️
internal/arduino/cores/packagemanager/profiles.go 0.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2740      +/-   ##
==========================================
- Coverage   67.62%   67.60%   -0.02%     
==========================================
  Files         237      237              
  Lines       22354    22370      +16     
==========================================
+ Hits        15116    15124       +8     
- Misses       6048     6053       +5     
- Partials     1190     1193       +3     
Flag Coverage Δ
unit 67.60% <68.75%> (-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.

@cmaglie cmaglie self-assigned this Oct 29, 2024
@cmaglie cmaglie added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Oct 29, 2024
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.

Make size and checksum fields of package index optional
1 participant