Merge lp://qastaging/~mterry/snapcraft/x-local-plugin into lp://qastaging/~snappy-dev/snapcraft/core

Proposed by Michael Terry
Status: Merged
Approved by: Michael Vogt
Approved revision: 94
Merged at revision: 98
Proposed branch: lp://qastaging/~mterry/snapcraft/x-local-plugin
Merge into: lp://qastaging/~snappy-dev/snapcraft/core
Diff against target: 286 lines (+123/-68)
5 files modified
integration-tests/data/local-plugin/snapcraft.yaml (+1/-1)
snapcraft/plugin.py (+70/-56)
snapcraft/tests/mock_plugin.py (+21/-0)
snapcraft/tests/test_plugin.py (+31/-4)
snapcraft/yaml.py (+0/-7)
To merge this branch: bzr merge lp://qastaging/~mterry/snapcraft/x-local-plugin
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Review via email: mp+265436@code.qastaging.launchpad.net

Commit message

Look for a local plugin if and only if the plugin name starts with 'x-'.

This was a Mark-requested feature at the IoM, and I think it's fine. It didn't get coded that way at first, because I forgot about it. :-/

This means that parts-from-the-sky or that were copy-and-pasted won't accidentally pick up your weird local plugin. It also means that the user is very explicitly opting into a local plugin (and thus we don't need the warning output about using a local plugin).

Description of the change

Look for a local plugin if and only if the plugin name starts with 'x-'.

This was a Mark-requested feature at the IoM, and I think it's fine. It didn't get coded that way at first, because I forgot about it. :-/

This means that parts-from-the-sky or that were copy-and-pasted won't accidentally pick up your weird local plugin. It also means that the user is very explicitly opting into a local plugin (and thus we don't need the warning output about using a local plugin).

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks a bunch for this branch. The code looks fine, the fact that there is no unittest bothered me a little bit and I created lp:~mvo/snapcraft/split_init that refactors __init__ a bit and adds a unittests for local/non-local loading of the plugins. I will do a MP against this branch so that you can let me know what you think there :)

Revision history for this message
Michael Vogt (mvo) wrote :

Branch itself is fine (plus it has a integration test). This would love to see something in a followup branch that makes Plugin.__init__ a bit easier to follow (either my attempt or a different one, I'm not fuzzy here :)

review: Approve
93. By Michael Terry

Unit tests and PluginHandler refactoring from mvo

94. By Michael Terry

Merge from trunk

Revision history for this message
Michael Terry (mterry) wrote :

You and your love of unit tests :)

Long live integration tests!

OK, I merged in your branch and trunk. I don't want to top-approve after that without you looking at it again, so please re-approve if you still like it.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks!

review: Approve
Revision history for this message
Michael Vogt (mvo) wrote :

I still like it :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches