-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(jsonnet): Restore tk.env In a recent refactor we lost `tk.env` respectivley `std.extVar("tanka.dev/environment")` support. For static environment this however is still the way to go for accessing env data from within Jsonnet. This PR restores the functionality and also makes Tanka properly fail with a message when attempting to use `tk.env` from an inline environment * fix(api): Prevent race condition Because jsonnet.Opts includes a `map[string]string`, it is not concurrency-safe, as all goroutines effectively share the same extCode and tlaCode. Modifications of any routine is also reflected onto every other routine. To temporarily combat that, this PR deep-clones jsonnet.Opts before passing it to any goroutine. This is not a good permanent solution, because it can be easily forgotten. We should instead look into ways of fixing the jsonnet package so that such race conditions don't occur at all
- Loading branch information
Showing
5 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters