particle-iot / particle-cli

Command Line Interface for Particle Cloud and devices
Apache License 2.0
212 stars 92 forks source link

Enhance Asset Verification by Checking Both Name and Hash #731

Closed keeramis closed 6 months ago

keeramis commented 6 months ago

Description

particle serial inspect looks only for the asset hash. Depending on some changes, we also would like to check the asset name.

How to Test


$ npm start -- serial inspect

> particle-cli@3.22.0 start
> node ./src/index.js serial inspect

Device: 0a10aced202194944a04af80
Platform: 35 - M SoM

Modules
  Bootloader module #0 - version 2600
  Size: 54.244 kB / MaxSize: 65.536 kB
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      Bootloader module #2 - version 7

  Bootloader module #1 - version 2
  Size: 4.204 kB / MaxSize: 8.192 kB
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS

  Bootloader module #2 - version 7
  Size: 20.312 kB / MaxSize: 303.104 kB
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS

  System part module #1 - version 5800
  Size: 1183.62 kB / MaxSize: 1572.864 kB
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      Bootloader module #0 - version 2600

  User part module #1 - version 6
  Size: 57.416 kB / MaxSize: 1572.864 kB
    UUID: a9758cd24747f45930141c5b970df1696f2096b2f3ceee01d08d29ff303b14a6
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System part module #1 - version 5800
    Asset Dependencies:
      Required:
        KG200ZAAR01A02K02P01.bin (FAIL)

Related Issues / Discussions

Completeness

monkbroc commented 6 months ago

You can ignore E2E test failures as Hugo migrated CI to GitHub Actions in #730

keeramis commented 6 months ago

This PR needs to wait until https://github.com/particle-iot/workbench/pull/245 is merged

monkbroc commented 6 months ago

There's no coupling with https://github.com/particle-iot/workbench/pull/245 so let's merge right away so it gets included when #721 is released.