google / google/go-jsonnet

Concurrency safe `FileImporter`

Open
#733 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.8k
Forks
263
PR merge metrics
No merged PRs in 30d

Description

We embed the jsonnet VM in our CI/CD infrastructure and instantiate a VM per generation cycle, but found that when using the same VM instance for all generations it's quite a bit faster (I expect because of caching as many of the generations use the same files). However, at the same time we found the `FileImporter` to be not concurrency safe. Would you be open to adding locking to the file importer?

As I was writing this it also occurred to me, is the jsonnet VM otherwise concurrency-safe? This particular issue we found quickly during development, but I'm curious if it would be more work than just making `FileImporter` concurrency safe.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.