Forum Discussion

nunemack's avatar
4 years ago

Community Plugin SDK Experiences

We are considering automation around our development process and would be interested in any experiences, both good and bad, from anyone who uses the Community Plugin SDK on a regular basis to help us decide if this a tool that we should be using.

Would anyone care to share some feedback?

  • Inactive User's avatar
    Inactive User

    I guess it depends what kind of automation you're talking about. What are you thinking? I'd really like to know what's being considered.

    I use the SDK almost every day, and while it's a little cumbersome, it gets the job done. I am frustrated that it's based on 5+ year old Node.js code, and concerned for its security because of that. 

    However, we do a lot of customizations, fixes, custom components, etc., and I would absolutely hate having to do the updates in my IDE, then copy and paste into the Studio texteareas. So it's far, far better than that. 

    I'm also curious to know what your timeline is on whatever changes you're making, as well as what will be in place for custom components, etc., once Aurora gets here. 

    Thanks!

  • I also copy paste from Studio into an editor (Sublime Text w/Freemarker syntax, but want to move to IntelliJ). There's a Chrome extension that makes the Studio a lot better to work with: https://chrome.google.com/webstore/detail/lithium-studio-editor-enh/noiffnkgeldhkegbdldaeghijnoghapj?hl=en

    It's still not ideal, but working in Studio is way faster. Going through the SDK, it takes over a minute to see any change posted (lithium push, refresh page, etc). 

    The node version has bugged me for a long time too. I have an open issue on the npm package warning about LTS (which is long since passed lol).

    We have stage, preprod, and prod. All development happens in stage. Once work relating to a specific feature is done, I use lithium export to pull down the latest code.

    We use Github. We have two branches main and stage. Work is completed in  feature branches, so developers push up to their own branch, issue a Pull Request for review against stage.

    When we want to release certain features, we cherry-pick, or straight up merge stage into main. From there, a Jenkins job is kicked off and basically runs the li studio publish to preprod. In preprod, I queue the version up, and go to Publishing in prod... etc.

     

    This has worked for us, as it helps me mitigate what features go out to production, while enabling development work to continue without fear of releasing something by accident.

    I hope that helps/makes sense. Happy to answer any questions or elaborate where needed.

    • nunemack's avatar
      nunemack
      Ace

      kbuchana That process totally makes sense and might work fairly well for us.  Thank you for sharing.  I'll be sure to reach out if we have further questions.

  • Inactive User We are just brainstorming at this point. We have a dev server and a stage server. Just as you described, we currently do our updates in VS Code, then copy and paste into the Studio textareas on dev and then we manually copy/paste between dev and stage when we are ready for QA. 

    In looking at the continuous integration workflow at https://developer.khoros.com/khoroscommunitydevdocs/docs/sdk-developer-workflow , I believe we would want to set this up for both dev and stage such that we could merge code between dev and stage branches in Git and have that trigger a push to studio on Stage.  Do you do anything like this in your environment?

    You mentioned that the SDK can be a bit cumbersome.  Does the push to Studio take long?  Are there any hidden gotchas to look out for?

    As for timeline, that would probably be sometime in December into January.

    We don't have much info on Aurora at this time, so I really have no idea how that will impact our workflow.  That is certainly something to consider.

    Thank you for any wisdom you care to share.  It is much appreciated!

    • Inactive User's avatar
      Inactive User

      Hi, sorry, I misunderstood -- I thought you were from Khoros asking about the future of the SDK. 

      But to answer your question, yes, that's the SDK workflow we use, and we do use Git as well in the workflow. It all works reasonably well -- except when it doesn't. There are occasional random issues that will require you opening a Support ticket. 

      Things to be aware of:

      • Initial setup is often a pain  and will cost you some time to get right. There are different issues you'll run into on Mac and Windows. 
      • You'll have to use an old version of Nodejs. If you use Node for anything else, I'd install Node Version Manager to help make the process of going back and forth easier. (I have to use a different version of Node than the SDK for Angular, Vue, and React).  
      • Push to studio takes about 3-7 minutes, depending on the day and the phase of the moon or the current temperature in Kalamazoo or the hog population in Arkansas that day. So it makes things a little longer to do. But easier than pasting into Studio.
      • You have to renew your SDK plugin token monthly via Studio > Advanced > SDK > Plugin Token
      • Make sure to set strictMode to false in the server.conf.json file. BUT be aware that if you have custom components, you'll occasionally need to set this to true to debug them, but then ignore the errors you get from Khoros' own components that fail on strict mode. 
      • Lots of things about the SDK are like that. A bit wonky, sometimes annoying, and random. But it's better than the alternative. 

      LMK if you need any further input or advice on this. It's a bit confusing to set up and use at first. 

      • nunemack's avatar
        nunemack
        Ace

        Inactive User  Thank you, that is great feedback.  I'll reach out if we have more questions as we get further along in our discussions.

  • Hi nunemack 

     

    I would like to use Community Plugin SDK too, and I would like to know if you were able to set up everything.

    I'm struggling to run gulp at the moment. 

    • IanKl's avatar
      IanKl
      Khoros Alumni (Retired)

      Hi, what are you specifically having trouble with? 

      And are you on Windows or Mac?

      • ebonifacio's avatar
        ebonifacio
        Mentor

        Hi IanKl   

        I followed all the steps on this Getting started with the Plugin SDK .

        After some issues with node versions and permissions, I managed to export the Studio plugin. I have all the files and structure folder on my machine (MacOS).

        I already installed nvm, and I'm using node 8.12 (as someone on a support ticket advised me)

          But when I run gulp, I always have this error:

         

         TypeError in plugin 'run-sequence(watch-text)'
        Message:
            Cannot read property 'map' of undefined
        Stack:
        TypeError: Cannot read property 'map' of undefined
            at Gulp.<anonymous> (/Users/xxx/community/community-project/node_modules/lithium-sdk/gulp/watch.js:111:55)