Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
repo: use PlugInfo and SlotInfo for permanent plugs/slots #4120
Conversation
stolowski
added some commits
Oct 12, 2017
codecov-io
commented
Nov 2, 2017
•
Codecov Report
@@ Coverage Diff @@
## master #4120 +/- ##
=========================================
Coverage ? 75.72%
=========================================
Files ? 437
Lines ? 37867
Branches ? 0
=========================================
Hits ? 28674
Misses ? 7192
Partials ? 2001
Continue to review full report at Codecov.
|
zyga
approved these changes
Nov 2, 2017
LGTM
The bug in the ofono interface is something that needs to be fixed in 2.29. I'll propose a PR for that.
| } | ||
| type snippetDefiner4 interface { | ||
| - PermanentSlotSnippet(slot *interfaces.Slot, sec interfaces.SecuritySystem) error | ||
| + PermanentSlotSnippet(slot *snap.SlotInfo, sec interfaces.SecuritySystem) error | ||
| } |
zyga
Nov 2, 2017
Contributor
All the changes above are ok. Can you add a test that checks we are not merging any new interfaces with the old signature methods please?
zyga
Nov 2, 2017
Contributor
On second thought #4124 ensures this directly so please just merge it here after it lands in master.
| spec.AddSnippet(ofonoPermanentSlotAppArmor) | ||
| return nil | ||
| } | ||
| -func (iface *ofonoInterface) DBusPermanentSlot(spec *dbus.Specification, plug *interfaces.Plug, slot *interfaces.Slot) error { |
zyga
Nov 2, 2017
Contributor
Whoops, did this never work before!?
Perhaps we need a test that ensures that all of the known functions have the expected signatures.
|
Please land #4124 before merging this one. |
stolowski
requested a review
from
niemeyer
Nov 8, 2017
zyga
added some commits
Nov 10, 2017
mvo5
approved these changes
Nov 14, 2017
This looks good (and quite mechanical). If this is the agreed direction we should land this to avoid conflicts (as it touches a lot of files).
stolowski commentedNov 2, 2017
This is part of the changes outlined in the forum here: https://forum.snapcraft.io/t/preparing-the-interfaces-logic-for-connection-hooks/2184 (item no. 7). With this change all permanent plugs and slots method take PlugInfo and SlotInfo instead of Plug and Slot (which are going to be phased out as part of refactoring of interfaces code, a few more PRs will follow).