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

feat(snap): add config interface with unique identifier #114

Conversation

MonicaisHer
Copy link
Contributor

@MonicaisHer MonicaisHer commented Oct 17, 2022

The device service snaps all have device-config as the config interface identifier. This is fine as long as we have one config provider per device service snaps. The identical names however prevent the user from having a single provider for multiple snaps.

Setting up a content provider to seed multiple device snaps would result in the following error:

connection not allowed by slot rule of interface "content"

It turns out that for manual connections (via snap connect or gadget's connections), the slot and plug name must be the same. From the docs:

A slot and a plug can only be connected if they have the same interface name.
https://snapcraft.io/docs/content-interface

This PR deprecates the old config interface in favor of one with a unique identifier.

Signed-off-by: Mengyi Wang mengyi.wang@canonical.com

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

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

New Dependency Instructions (If applicable)

Signed-off-by: Mengyi Wang <mengyi.wang@canonical.com>
@codecov-commenter
Copy link

Codecov Report

Merging #114 (1fa84fe) into main (b9a08de) will decrease coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
- Coverage   41.06%   41.00%   -0.06%     
==========================================
  Files          20       20              
  Lines        9006     9006              
==========================================
- Hits         3698     3693       -5     
- Misses       4140     4143       +3     
- Partials     1168     1170       +2     
Impacted Files Coverage Δ
internal/llrp/reader.go 40.13% <0.00%> (-1.11%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@farshidtz farshidtz merged commit 21adccc into edgexfoundry:main Oct 17, 2022
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.

3 participants