Merge ~anonymouse67/review-tools:feature/mount-control-and-kernel-module-load-attrs into review-tools:master

Proposed by Ian Johnson
Status: Merged
Merged at revision: 28aeaee475615f1d808d92f4c8dfba0d0f4cfa59
Proposed branch: ~anonymouse67/review-tools:feature/mount-control-and-kernel-module-load-attrs
Merge into: review-tools:master
Diff against target: 14 lines (+2/-0)
1 file modified
reviewtools/sr_common.py (+2/-0)
Reviewer Review Type Date Requested Status
Emilia Torino Approve
Review via email: mp+416336@code.launchpad.net

Commit message

reviewtools/sr_common.py: add mount-control, kernel-module-load required attrs

This is needed in order to use these interfaces after they have been granted
via the snap-declaration, as currently review-tools fails like this:

Errors
------
 - declaration-snap-v2:valid_plugs:mount-control:allow-auto-connection_plug-attributes
        declaration malformed (unknown attribute 'mount')
 - declaration-snap-v2:valid_plugs:mount-control:allow-installation_plug-attributes
        declaration malformed (unknown attribute 'mount')
foo.snap: FAIL

Description of the change

reviewtools/sr_common.py: add mount-control, kernel-module-load required attrs

This is needed in order to use these interfaces after they have been granted
via the snap-declaration, as currently review-tools fails like this:

Errors
------
 - declaration-snap-v2:valid_plugs:mount-control:allow-auto-connection_plug-attributes
        declaration malformed (unknown attribute 'mount')
 - declaration-snap-v2:valid_plugs:mount-control:allow-installation_plug-attributes
        declaration malformed (unknown attribute 'mount')
foo.snap: FAIL

To post a comment you must log in.
Revision history for this message
Emilia Torino (emitorino) wrote :

LGTM, thanks!

review: Approve
Revision history for this message
Ian Johnson (anonymouse67) wrote :

Hmm, I ran make check and apparently there is one failure though I'm confused how it is related...

FAIL: test_check_get_package_revisions_valid (test_store.TestStore) (store_db=[{'publisher_email': '<email address hidden>', 'publisher_name': 'Rocks - server team', 'name': 'redis', 'revisions': [{'uploader_email': '<email address hidden>', 'uploader_name': 'Rocks - server team', 'channels': ['edge', 'beta'], 'manifest_yaml': "manifest-version: '1'\nname: redis\nos-release-id: ubuntu\nos-release-version-id: '20.04'\narchitectures: \n- amd64\nstage-packages: \n - adduser=3.118ubuntu2,adduser=3.118ubuntu2\n - apt=2.0.2ubuntu0.2,apt=2.0.2ubuntu0.2\n - bsdutils=1:2.34-0.1ubuntu9.1,util-linux=2.34-0.1ubuntu9.1\n - libxcursor1=1.0.0-2ubuntu1,tiff=1.0.0-2ubuntu1\n - libcurl4:amd64=7.74.0-1ubuntu2.1,curl=7.74.0-1ubuntu2.1\n", 'version': '5.0-20.04', 'revision': '852f7702e973', 'architectures': ['amd64']}, {'uploader_email': '<email address hidden>', 'uploader_name': 'Rocks - server team', 'channels': ['edge', 'beta'], 'manifest_yaml': "manifest-version: '1'\nname: redis\nos-release-id: ubuntu\nos-release-version-id: '21.04'\narchitectures: \n- amd64\nstage-packages: \n - adduser=3.118ubuntu2,adduser=3.118ubuntu2\n - apt=2.0.2ubuntu0.2,apt=2.0.2ubuntu0.2\n - bsdutils=1:2.34-0.1ubuntu9.1,util-linux=2.34-0.1ubuntu9.1\n - libxcursor1=1.0.0-2ubuntu1,tiff=1.0.0-2ubuntu1\n", 'version': '5.0-21.04', 'revision': '852f7702e974', 'architectures': ['amd64']}]}], name='redis', <email address hidden>', revision='852f7702e973', channel='beta', architecture='amd64', pkg_name='libxcursor1', usn='3501-1')
Test get_package_revisions() - valid snap and valid rock
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ijohnson/git/review-tools/reviewtools/tests/test_store.py", line 194, in test_check_get_package_revisions_valid
    self.assertEqual(len(res["additional"]), 0)
AssertionError: 3 != 0

----------------------------------------------------------------------
Ran 1182 tests in 199.502s

FAILED (failures=1)
make: *** [Makefile:36: test] Error 1

Revision history for this message
Alex Murray (alexmurray) wrote (last edit ):

That failure is unrelated and is due to a recent commit from https://code.launchpad.net/~emitorino/review-tools/+git/review-tools/+merge/416263 I believe - so this can be ignored (or just rebase this change ontop of the current review-tools master and it should pass).

Revision history for this message
Ian Johnson (anonymouse67) wrote :

Thanks, I just rebased and running make check is now happy

Revision history for this message
Alex Murray (alexmurray) wrote :

Thanks Ian - this is now merged.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reviewtools/sr_common.py b/reviewtools/sr_common.py
2index ebf5c22..63b5a8d 100644
3--- a/reviewtools/sr_common.py
4+++ b/reviewtools/sr_common.py
5@@ -251,7 +251,9 @@ class SnapReview(Review):
6 "home": {"read/plugs": ""},
7 "i2c": {"path/slots": ""},
8 "iio": {"path/slots": ""},
9+ "kernel-module-load": {"modules/plugs": []},
10 "kubernetes-support": {"flavor/plugs": ""},
11+ "mount-control": {"mount/plugs": []},
12 "mpris": {"name/slots": ""},
13 "netlink-driver": {
14 "family-name/slots": "",

Subscribers

People subscribed via source and target branches

to all changes: