-
Notifications
You must be signed in to change notification settings - Fork 448
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
cli: refactor re-execution into legacy #2571
Conversation
c1b5a84
to
8fb4ca5
Compare
Did some testing: cleanbuild with and without legacy, looked good. Ran unit tests, looked good. Ran refresh, update, search, and define -- looked good too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Codecov Report
@@ Coverage Diff @@
## master #2571 +/- ##
=========================================
Coverage ? 89.01%
=========================================
Files ? 205
Lines ? 13986
Branches ? 2118
=========================================
Hits ? 12450
Misses ? 1083
Partials ? 453
Continue to review full report at Codecov.
|
This refactor makes it easy to still use the old commands regardless of the existence of a base in the project and to use the store related commands from non-legacy regardless of where this is run from. To acheive this, the decision to re-execute into legacy is in the lifecycle logic by checking for the existence of a base and by providing hidden commands for the older, previously unavailable, commands. Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
d8b79f4
to
8e8a4e1
Compare
Did some testing on latest: cleanbuild with and without legacy, refresh, update, search, and define -- all systems seemed fine. LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was somewhat difficult to follow because things were added and later removed, but overall it seems to be working.
This refactor makes it easy to still use the old commands regardless of the existence of a base in the project and to use the store related commands from non-legacy regardless of where this is run from. To achieve this, a new class command inherited from click.Command was created that can detect if invocation of the legacy code base is required. Simple skeletons to handle remote parts, search, update and define, were created that simply execute into the legacy snapcraft. Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
This refactor makes it easy to still use the old commands regardless of the
existence of a base in the project and to use the store related commands
from non-legacy regardless of where this is run from.
To achieve this, a new class command inherited from click.Command
was created that can detect if invocation of the legacy code base is
required.
Simple skeletons to handle remote parts, search, update and define,
were created that simply execute into the legacy snapcraft.
Signed-off-by: Sergio Schvezov sergio.schvezov@canonical.com
./runtests.sh static
?./runtests.sh tests/unit
?