Skip to content

Conversation

@RyanTSnow-eaton
Copy link
Contributor

@RyanTSnow-eaton RyanTSnow-eaton commented Oct 22, 2025

fix: #556

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

  1. Simply compile and run the changed src/c/examples/discovery device service. It should read the provision watchers inside of res/watchers and upload them, they should be visible in the UI via the Provision Watchers tab.
  2. Stop and start the service once again, now it should report that the provision watchers already exist and will not overwrite/reupload them.

In addition, I also created a number of different provision watcher objects and attempted to upload all of them at once to test different scenarios, the results are listed below with the filename somewhat describing the contents of the watcher. I am not super experienced with the provision watchers feature of EdgeX as I have never used it personally, so let me know if you see anything in those results that seems concerning. Let me know if you are interested in any of the watcher json objects I tried, I can provide those as needed but didn't want to upload some arbitrary ZIP file into the PR.

Watchers which register with core-metadata:

  • watcher2-minimal.json
  • watcher3-locked.json
  • watcher4-multiple-identifiers.json
  • watcher5-empty-blocking.json
  • watcher9-missing-servicename.json <- due to sdk appending service name if missing
  • watcher10-missing-adminstate.json <- due to sdk appending adminstate if missing
  • watcher13-missing-profile-name.json
  • watcher17-wrong-type-valuereplace.json
  • watcher21-complex-properties.json
  • watcher22-old-apiversion.json
  • watcher23-missing-apiversion.json <- due to sdk appending api version if missing
  • watcher24-special-regex.json
  • watcher25-extra-fields.json

Watchers which fail to register with core-metadata:

  • watcher6-missing-name.json
  • watcher7-missing-identifiers.json
  • watcher8-empty-identifiers.json
  • watcher11-wrong-adminstate.json
  • watcher12-missing-discovered-device.json
  • watcher14-wrong-type-name.json
  • watcher15-wrong-type-identifiers.json
  • watcher16-wrong-type-blocking.json
  • watcher18-null-name.json
  • watcher19-empty-name.json
  • watcher20-malformed-json.json

@RyanTSnow-eaton RyanTSnow-eaton force-pushed the EF-556-upload-predefined-provision-watchers branch from af407bb to 55a6d14 Compare October 22, 2025 22:15
Copy link
Member

@iain-anderson iain-anderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cloudxxx8 cloudxxx8 merged commit 5b487f3 into edgexfoundry:main Oct 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Predefined provision watchers are not auto-uploaded

3 participants