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

tk env list throws error if environments/envx/sub/main.jsonnet exists #957

Open
strowi opened this issue Nov 18, 2023 · 0 comments
Open
Labels
kind/bug Something isn't working

Comments

@strowi
Copy link
Contributor

strowi commented Nov 18, 2023

Hi,

noticed today after some time spent debugging... if there is a a environments/kafka+kafka/strimzi/main.jsonnet in an environment containing a main.jsonnet tk env list` throws an error like this:

 evaluating jsonnet in path 'environments/kafka+kafka/strimzi/main.jsonnet': RUNTIME ERROR: Field does not exist: ingress
  /tmp/tanka/environments/kafka+kafka/strimzi/kafka-ui.libsonnet:27:67-84  
  Field "KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS" 
  Field "secret"  
  Field "envs"  
  Field "values"  
  /tmp/tanka/vendor/github.com/grafana/jsonnet-libs/tanka-util/helm.libsonnet:46:23-67 thunk <chartData> from <function <anonymous>>
  /tmp/tanka/vendor/github.com/grafana/jsonnet-libs/tanka-util/helm.libsonnet:48:21-30 thunk from <function <anonymous>>
  /tmp/tanka/vendor/github.com/grafana/jsonnet-libs/tanka-util/k8s.libsonnet:43:7-13 thunk from <function <anonymous>>
  /tmp/tanka/vendor/github.com/grafana/jsonnet-libs/tanka-util/k8s.libsonnet:13:21-27  thunk from <function <anonymous>>
  <std>:31:26-27  thunk from <function <anonymous>>
  ...
  <std>:32:16-27  function <anonymous>
  <std>:1613:8-22 function <anonymous>
  <std>:1618:20-35  thunk from <function <anonymous>>
  <std>:1605:10-11  function <isContent>
  <std>:1618:10-36  function <anonymous>
  <std>:(1615:34)-(1619:6)  
  <std>:(1615:34)-(1619:6)  
  /tmp/tanka/environments/kafka+kafka/strimzi:(5:3)-(28:4) function <noDataEnv>
  /tmp/tanka/environments/kafka+kafka/strimzi:30:1-16  $
  During evaluation 

This is environments/kafka+kafka/main.jsonnet:

(import '_globals/main.jsonnet') +
(import './strimzi/main.jsonnet') +
(import './secrets.libsonnet') +
(import './config.libsonnet') +

{
  _config+:: {},
}

Renaming the strimzi/main.jsonnet fixed the error.

@Elfo404 Elfo404 added this to Tanka May 27, 2024
@github-project-automation github-project-automation bot moved this to Triage in Tanka May 27, 2024
@zerok zerok moved this from Triage to Backlog in Tanka May 27, 2024
@zerok zerok added the kind/bug Something isn't working label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants