edgexfoundry / device-usb-camera

Owner: Device WG
Apache License 2.0
12 stars 28 forks source link

fix: panic when device is missing CardName or SerialNumber #261

Closed ajcasagrande closed 1 year ago

ajcasagrande commented 1 year ago

See: https://github.com/orgs/edgexfoundry/discussions/129

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

Testing Instructions

New Dependency Instructions (If applicable)

lenny-goodell commented 1 year ago

@ajcasagrande , please fix on main (not minnesota since there is a work around) and create a BUG issue for it and list it here: https://wiki.edgexfoundry.org/display/FA/Minnesota#Minnesota-KnownBugs

presatish commented 1 year ago

It would be helpful if examples under https://github.com/EdgeX-Camera-Management/device-usb-camera/blob/fix-discover-panic/cmd/res/devices are updated too. There is no CardName here.

Yes, and not just in the Example App, also here in this repo. https://github.com/edgexfoundry/device-usb-camera/blob/main/cmd/res/devices/general.usb.camera.yaml.example https://github.com/edgexfoundry/device-usb-camera/blob/main/cmd/res/devices/hp.w200.yaml.example

@ajcasagrande , please fix these as part of this PR. THX!

@lenny-intel After looking into the issue more I don't think cardName and serialNumber need to be included in the examples. They are not the required parameters, they can be used if additional checking is required. Initially when I posted my comment I thought they are the required parameters.