Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-2215

Upgrade cljs workflows to use updated cljs tools (esp. figwheel-sidecar)

    Details

    • Type: Task
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: SERVER 6.0.0
    • Component/s: None
    • Labels:
      None
    • Release Notes:
      Not Needed
    • QA Risk Assessment:
      Needs Assessment

      Description

      puppetserver and cljs-dashboard-widgets use an older clojurescript dependency along with cljsbuild and figwheel. The method for interacting with figwheel through `lein repl` and to do so the current implementation pulls in lein as a dependency and uses it to run `lein figwheel` in the background, not that there's any docs describing that.

      A lot has changed in the clojurescript ecosystem and we should:

      1. Upgrade to a modern clojurescript - I think we 1.10.x for Java 9 support in the clojurescript compiler.
      2. Use figwheel-sidecar, this is a subproject of lein-figwheel and lets you use a figwheel server directly from the repl, rather than calling the lein task. Upgrading to this lets us remove our dependency on leiningen as a library within our project.clj and should be done in both puppetserver and cljs-dashboard-widgets.
      3. Upgrade our cljsjs dependencies in cljs-dashboard-widgets. cljsjs, besides being a silly name, is how cljs projects pull in js packages that they interopt with. We at least need to update d3 (maybe React as well). AFAICT, d3 isn't automatically being pulled in during cljs development of puppetserver and causing errors, I think this stems from how cljs-dashboard-widgets pulls in its d3 dependency and may require some configuration of externs in puppetserver.
      4. Make figwheel served dashboard interact with a running Puppet Server. Currently you can server a livereloaded dashboard from figwheel but it will automatically connect to the same port that it's served from (which won't have a running puppetserver) or you can run puppetserver from the repl, but then you get any of the figwheel goodness. This might be as simple as threading the url to get metrics from to figwheel when run from the repl.
      5. Finally, almost nothing is actually documented. Developing on the dashboard should be documented in the puppetserver developer docs and how to pull in cljs-dashboard-widgets and set it up correctly should be documented in that repo.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  amy.lazarte Amy Lazarte
                  Reporter:
                  justin Justin Stoller
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: