GITHub integration

Full integration with git would be really cool to keep track of workflows, dashboards, experience page code and JavaScript inside function nodes.

The Workflow version control is helpful but a bit incomplete in the context of an entire application.

How do you see a Git integration working? Would you be storing device and workflow configuration as JSON objects within a repository? Or did you have something else in mind?

at the moment we have to copy and paste experience page code, workflow configurations, and any javascript from function nodes to and from git to track revisions.

So i didnt have any particilar method in mine, so long as there was a way to track source files without copy and paste.

One of our next big feature pushes will be versioning / staging vs. production status in experience views. We’re envisioning it working similarly to workflow versions, where we would store each “published” version and allow you to set a default version to return to your users while testing “in development” versions without disrupting the current experience. Would that satisfy your requirement?

that would be very helpful. It was be great if there was a way to keep a copy of the versions offline however.

I suggested git because because its so standard and its where all of our other software projects are housed, so its logical to use the same tools.

The main advantage of git being that our team can see incremental changes and compare diffs ,etc. I would presume the source for platform itself would use a revision control system like git so why not the content itself?

Yes please to Git. Visual languages (Labview, Simulink, Losant, etc.) have their strengths, but searching and diffing code are hard.

I had a wee think about how Git could integrate with Losant.

  1. Losant designs and publishes a JSON schema for the Application tree (workflows, globals, etc.)
  2. Losant designs an API that supports a query language for extracting all or part of the tree. Think XSLT + XQuery but simpler and JSON centric.
  3. Third party with appropriate API access recovers snapshots of the tree / sub-tree as JSON snapshots.
  4. Third party denormalises the JSON into a well defined file hierachy inside a Git working repo, ie. JSON to directory of files.
  5. Third party uses normal git commands to detect new, changed, removed content and commits the differences.
  6. (Getting fuzzy here) Third party includes scripts to normalise the file hierarchy back into Losant Application JSON and “publish” into Losant.

I would also love git integration. For me what is currently lacking is a clear UI for releasing and code review. In order to keep workflows reliable when collaborating as a team, what I am looking for is:

  • Be able to see who changed what when (already there with versioning)
  • Allow people to continue development on a flow without being afraid of breaking something. I think the current versioning makes it easy to make changes to a production version without intending to.
  • Once a new version of a flow is ready, see the differences with the current “production” (aka default) version in an easy overview similar to git diff, or github/gitlab/bitbucket pullrequests
  • Allow reviews on a new version, enabling developers to comment on the changes and discuss them with each other, without having to put notes in the flow itself.
  • Allow reviewers to a approve a version. Maybe its enough to limit for a workflow who can change the “default” version.