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

sjsonnet integration #794

Open
janeklb opened this issue Nov 15, 2021 · 6 comments
Open

sjsonnet integration #794

janeklb opened this issue Nov 15, 2021 · 6 comments
Labels

Comments

@janeklb
Copy link
Contributor

janeklb commented Nov 15, 2021

This issue is raised purely for discovery and discussion purposes.

Databricks have been building a jsonnet implementation that runs on the JVM: sjsonnet. Interestingly, their benchmark advertises a ~200x performance boost over jsonnet, and a ~40x performance boost over go-jsonnet.

Unfortunately, there are no python bindings for sjsonnet and so it wouldn't just be a drop-in replacement into kapitan. Raising this just to highlight the fact that such a thing exists.

A tiny bit of solutionising: a search for python + jvm yields the jvm python module. The docs don't show any examples of how it should/could be used, and there's the fact that it's still beta and does not have a (visible) userbase, so I'm not sure if it even could be a good option... but it is a relatively new project.

@ramaro
Copy link
Member

ramaro commented Dec 6, 2021

Certainly something worth discussing! There's quite a few implementations out there. While I don't think it's worth supporting them at this stage, perhaps we can think of a generic way of running external commands that's a bit more sophisticated than the external input type.

@janeklb
Copy link
Contributor Author

janeklb commented Dec 8, 2021

There really are quite a few implementations out there... I had no idea.

For example, the rust impl jrsonnet has even more impressive (and more robust!) benchmarking results, and it even has python bindings!

@janeklb
Copy link
Contributor Author

janeklb commented Dec 8, 2021

Looks like jrsonnet works out tof the box as a drop-in replacement (eg. pip install jrsonnet works without needing any special build environment, then import rjsonnet as jsonnet and you're good to go) ; unfortunately, it fails to compile my targets with an error that doesn't arise when using C or Golang jsonnet implementations.

Some quick benchmarking results against the kapitan examples:

example gojsonnet jrsonnet
docker ~2.5s ~2.5s
kubernetes ~3.5s 3.2s
terraform ~2.8s exception

So.. barely faster than gojsonnet, and also incomplete (or incompatible?)

@messense
Copy link

unfortunately, it fails to compile my targets with an error that doesn't arise when using C or Golang jsonnet implementations.

Can you share the exception information? We can report the issue to jrsonnet project.

@janeklb
Copy link
Contributor Author

janeklb commented Feb 16, 2022

unfortunately, it fails to compile my targets with an error that doesn't arise when using C or Golang jsonnet implementations.

Can you share the exception information? We can report the issue to jrsonnet project.

Unfortunately I no longer have access to the inventory anymore (moved to a different company) so I’m unable to replicate.

Copy link

This issue is stale because it has been open for 1 year with no activity.
Remove the stale label or comment if this issue is still relevant for you.
If not, please close it yourself.

@github-actions github-actions bot added the Stale label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants