Skip to content
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

appcd-default-plugins v4 #388

Closed
wants to merge 25 commits into from
Closed

Conversation

cb1kenobi
Copy link
Contributor

@cb1kenobi cb1kenobi commented Jun 27, 2019

DO NOT MERGE until appcelerator-archive/appc-daemon-plugins#9 has been merged

  • Attempt to install the default plugins during postinstall
  • Need to test/fix when plugins dir already has plugins
  • Only go through install process if appcd-default-plugin's package.json has version that is not installed
  • Try to install default plugins at appcd install time by checking directory permissions
  • Only download plugins compatible with current platform

BREAKING CHANGE(appcd-default-plugins): Switched to installing default plugins at runtime to avoid user permissions.
chore(appcd-default-plugins): v4.0.0

https://jira.appcelerator.org/browse/DAEMON-280

appcd status shows the registered plugins:

Plugin       Version  Type      Path                                                                               Node.js  Status                                   Active/Total Requests
android      1.4.0    external  /Users/chris/.appcelerator/appcd/plugins/packages/@appcd/plugin-android/1.4.0      10.16.0  Inactive                                 0 / 0
android      2.0.0    external  /Users/chris/appc/appcd/appc-daemon-plugins/packages/plugin-android                10.16.0  Inactive                                 0 / 0
genymotion   1.4.0    external  /Users/chris/appc/appcd/appc-daemon-plugins/packages/plugin-genymotion             10.16.0  Inactive                                 0 / 0
ios          1.4.0    external  /Users/chris/.appcelerator/appcd/plugins/packages/@appcd/plugin-ios/1.4.0          10.16.0  Inactive                                 0 / 0
ios          2.0.0    external  /Users/chris/appc/appcd/appc-daemon-plugins/packages/plugin-ios                    10.16.0  Inactive                                 0 / 0
jdk          1.4.0    external  /Users/chris/appc/appcd/appc-daemon-plugins/packages/plugin-jdk                    10.16.0  Inactive                                 0 / 0
system-info  1.4.0    external  /Users/chris/.appcelerator/appcd/plugins/packages/@appcd/plugin-system-info/1.4.0  10.16.0  Inactive                                 0 / 0
system-info  2.0.0    external  /Users/chris/appc/appcd/appc-daemon-plugins/packages/plugin-system-info            10.16.0  Inactive                                 0 / 0
titanium     1.5.0    external  /Users/chris/appc/appcd/appc-daemon-plugins/packages/plugin-titanium               10.16.0  Inactive                                 0 / 0
windows      1.4.0    external  /Users/chris/appc/appcd/appc-daemon-plugins/packages/plugin-windows                10.16.0  Inactive: Unsupported platform "darwin"  0 / 0

Copy link
Contributor

@ewanharris ewanharris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will test fully when flagged items in PR body are resolved

packages/appcd-default-plugins/src/index.js Outdated Show resolved Hide resolved
fix: Properly handle file permission errors.
fix: Add support for installed plugins.
@cb1kenobi
Copy link
Contributor Author

cb1kenobi commented Jul 2, 2019

@ewanharris I refactored things and I think I've come up with a viable hack to get the default plugins installed. What do you think?

Assuming the default plugins where successfully installed at postinstall or at a previous appcd startup, subsequent appcd startup times are 0.1 seconds on my machine:

2019-07-02T07:51:14.132Z appcd:default-plugins Found yarn: /Users/chris/appc/appcd/appc-daemon/packages/appcd-default-plugins/node_modules/.bin/yarn
2019-07-02T07:51:14.171Z appcd:default-plugins Found lerna: /Users/chris/appc/appcd/appc-daemon/packages/appcd-default-plugins/node_modules/.bin/lerna
2019-07-02T07:51:14.186Z appcd:default-plugins Found installed plugin @appcd/[email protected]
2019-07-02T07:51:14.188Z appcd:default-plugins Found installed plugin @appcd/[email protected]
2019-07-02T07:51:14.188Z appcd:default-plugins Found installed plugin @appcd/[email protected]
2019-07-02T07:51:14.189Z appcd:default-plugins Found installed plugin @appcd/[email protected]
2019-07-02T07:51:14.190Z appcd:default-plugins Found installed plugin @appcd/[email protected]
2019-07-02T07:51:14.191Z appcd:default-plugins Found installed plugin @appcd/[email protected]
2019-07-02T07:51:14.191Z appcd:default-plugins Found installed plugin @appcd/[email protected]
2019-07-02T07:51:14.192Z appcd:default-plugins Found installed plugin @appcd/[email protected]
2019-07-02T07:51:14.193Z appcd:default-plugins Found installed plugin @appcd/[email protected]
2019-07-02T07:51:14.193Z appcd:default-plugins Found installed plugin @appcd/[email protected]
2019-07-02T07:51:14.205Z appcd:default-plugins Finished in 0.1 seconds

Also, any idea why Jenkins is not liking appcd-logger?

@ewanharris
Copy link
Contributor

@cb1kenobi, I don't think it's Jenkins not liking it, it seems like a genuine bug in the dev flow with this change. To repro

  1. Clean your repo gulp clean --commit
  2. Run yarn or lerna bootstrap

And you'll get the error above, basically it tries to run the postinstall step after it's installed/linked all modules but before it's built the sources so 💥 . I guess maybe we need a short circuit?

…uld fail if gulp build hasn't been run when working from the monorepo.
chore: Fixed eslint warnings.
…>=8.0.0 to >=8.1.0 to fix issue where 8.0.x didn't support 'async_hooks.createHook()', yet appcd-util was using it.

chore(gulp): Updated to [email protected] which added eslint 6 support and added Node.js eslint rules.
fix(telemetry): Fixed live config changes for environment name.
fix(request): Fixed request config setting precedence such that environment variables override config settings.
fix(core): Fixed bug where 'server.hostname' was not being correctly referenced.
@cb1kenobi
Copy link
Contributor Author

Closing due to restructure.

@cb1kenobi cb1kenobi closed this Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants