#979 Keeping client app in sync with Haystack defs

Tyler B. Long Thu 7 Apr

I am authoring a Haystack UI client (nothing open source for now sorry). This application would need to keep itself up to date with the latest Haystack definitions found here when released. I'd like to use the GitHub API request for Get the latest release for my application to check for updates.

Example GET request checking for the latest release:

curl -H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/Project-Haystack/haystack-defs/releases/latest

Tell me whether you think this is a bad idea and whether or not I can rely on it long term.

Brian Frank Sun 10 Apr

That is certainly a viable approach. The latest version is a whole zip with everything (src, docs, and defs). We also post the latest version as just a json, etc file at on the Downloads section.

Is this something you are going to just poll periodically?

What parts of the release do you need? Just the defs.json file?

We could create something much simpler like a version string easily polled on project-haystack.org?

Tyler B. Long Mon 11 Apr

Is this something you are going to just poll periodically?

Yes. When a particular view on the client app is opened by the user, it would poll for a new defs version which is perhaps rate limited to once every 24 hours.

What parts of the release do you need? Just the defs.json file?

Yes, just the defs.json for now.

We could create something much simpler like a version string easily polled on project-haystack.org?

Yes, this would make more sense than going the GitHub route since I would be pulling down assets like src that the app would not be interested in. Having a version string to check would work great.

Brian Frank Tue 12 Apr

Having a version string to check would work great.

I added a simple version API you can query: /version

Tyler B. Long Tue 12 Apr

Brilliant. Thank you much for this.

Login or Signup to reply.