Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
interfaces/builtin: add "network" interface #587
Conversation
zyga
changed the title from
interfaces/builtin: add "network" interface.
to
interfaces/builtin: add "network" interface
Mar 4, 2016
niemeyer
reviewed
Mar 4, 2016
| +) | ||
| + | ||
| +// http://bazaar.launchpad.net/~ubuntu-security/ubuntu-core-security/trunk/view/head:/data/apparmor/policygroups/ubuntu-core/16.04/network | ||
| +const connectedPlugAppArmorSnippet = ` |
niemeyer
Mar 4, 2016
Contributor
s/Snippet// on both, to reduce a bit the verbosity. It's very clear without it already.
niemeyer
reviewed
Mar 4, 2016
| + panic(fmt.Sprintf("slot is not of interface %q", iface.Name())) | ||
| + } | ||
| + if slot.Snap != "ubuntu-core" { | ||
| + return fmt.Errorf("slots using the network interface are reserved for ubuntu-core") |
|
LGTM, just a couple of trivial comments. |
zyga
added some commits
Mar 5, 2016
|
Looks good. |
added a commit
that referenced
this pull request
Mar 7, 2016
mvo5
merged commit 24b086a
into
snapcore:master
Mar 7, 2016
|
@zyga this is missing a snap that uses the new interface in https://github.com/ubuntu-core/snappy/tree/master/integration-tests/data/snaps + a test that confirms that it can be build, installed and used. Can you please make a new PR for this? |
|
@niemeyer The plan and agreement we had was that each developer will write their own integration tests, with Federico and I helping. If we have time for developers writing code but not for them to write tests, what we need is to look for more resources writing both code and tests. It makes no sense to get some people writing only production code, and some people writing only tests. |
|
@elopio this is not testable yet, once we get to the end of "interfaces work" card all of this code can be only tested with unit tests. |
|
@elopio I can do the integration tests (to the extent that I can create snaps that use each interface) but I see this more as a distributed effort (lots of ifaces, lots of various, production snaps) and one that will start after the basics are working. |
|
@zyga so, are we still missing code to put this interface in a snap.yaml and build it? |
|
@elopio we are missing the state engine actually installing snaps, with the snap manager recording the meta-data in the state so that the interface manager can create interfaces and so that connect/disconnect can operate on that state. It's not all integrated at all yet. |
zyga
deleted the
zyga:iface-network
branch
Mar 7, 2016
|
@zyga I would prefer for you to put the most basic integration test for each interface that you add, to make sure that it builds, installs and runs. If currently you can only build and install, I would still prefer to have that for each interface as you add it, and then write the last part of the test when all the required bits are ready. We then of course can add tests for more complex scenarios, as we document them. |
@elopio I didn't plan or agree to that.
@elopio Zyga is working on the foundation of interfaces for people to be able to have something working at all. Can you help us writing the integration tests for those? If you can't, I'll look for resources elsewhere. Thank you. |
|
-----BEGIN PGP SIGNED MESSAGE----- On 2016-03-07 12:47, Gustavo Niemeyer wrote:
This has been the plan since I joined the team, and it was discussed
I can write with zyga the first few tests. I can't write them all. And iQIcBAEBCAAGBQJW3c4GAAoJEIUvYw0No8DgryEQAJpbdrS4JENQsykvOdh8J9eo |
@elopio That's not true (hint: you were not even part of that conversation), but I really don't mind by now. We have a simple problem, and simple constraints. @zyga is working on the engine, and we're going to have other people doing the actual interfaces. Either you can help us out with integration tests, or we'll find someone else to do so. If you can engage with whoever works on the interfaces (might well come from the security team), that'd be great. If you don't want to help out with that side of things, we'll need to find someone that can. Both are fine approaches.. I just need to know sooner so we can mobilize the right people. |
|
-----BEGIN PGP SIGNED MESSAGE----- On 2016-03-07 13:05, Gustavo Niemeyer wrote:
You are clearly talking about a different conversation. Why would I be
zyga wrote this interface, I'm requesting him a test for this
I'm sorry, but I'm the one who decides what are good approaches for iQIcBAEBCAAGBQJW3dd7AAoJEIUvYw0No8Dgg7sQAKYqSRMhgcb3RgNxyIXOVqbs |
|
@elopio the interface is a straight copy out of ubuntu-core-security (source package). |
|
@zyga ok, but I'm still confused. If I do now snappy build on a snap.yaml that has this interface, will it succeed? |
And I'm saying no, sorry. Please stop bothering @zyga about this, thanks.
That's both harsh and far from the truth. Despite your nasty attitude, we'll find some good people to test the interfaces properly. Thanks. |
|
ok, I wish you well. |
zyga commentedMar 4, 2016
This patch adds the "network" snappy interface. This is somewhat
confusingly associated with the system of interfaces, not the system of
network interfaces.
Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@canonical.com