-
Notifications
You must be signed in to change notification settings - Fork 180
New feature: Offline mode #651
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
Conversation
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 fine to me.
Testing might be improved by forcing the network to not be accessible for the part of the tests that test this feature. |
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.
👍
I would think repository caching would be a good place. |
cc25c9f
to
21ddb46
Compare
Just rebased this on top of master (1.5.1) and added documentation entry for offline mode. @AnotherButler please review and make changes where necessary. |
Bump @AnotherButler |
20cf79a
to
f5dd41e
Compare
Now that the
mbed cache
is a default Mbed CLI feature (since v1.5.0), a new offline mode feature can take benefit from it. Offline mode is achieved by utilize the cache for various Mbed CLI operations and also preventing Mbed CLI to access remote repositories to avoid connection errors while in offline.Workflow
No impact to existing workflows.
This feature adds
--offline
switch tombed import
,mbed add
,mbed update
andmbed new
to enable offline mode as described above.How this works
While using
--offline
formbed import/add/update/new
, Mbed CLI will look up for locally cached repositories and use them without fetching new content from remote repositories.Lastly, Mbed CLI will print a banner when
--offline
is used to inform the user that they are in offline mode.Documentation
Documentation is not included with this PR. @AnotherButler please advise where offline mode should be mentioned. Perhaps in https://github.com/ARMmbed/mbed-cli#repository-caching or https://github.com/ARMmbed/mbed-cli#importing-an-existing-program, or both?
Tests
mbed new --offline
andmbed update --offline
is tested via circle.ymlResolves #351