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

Cannot use importstr: ERROR find objects: output: unknown node type: (*ast.ImportStr) #461

Closed
jessesuen opened this Issue Apr 20, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@jessesuen

jessesuen commented Apr 20, 2018

Is this a BUG REPORT or FEATURE REQUEST?: BUG REPORT

/kind bug

What happened:

I have the following components/nginx-configmap.jsonnet which imports two other files as strings:

{
  "kind": "ConfigMap",
  "apiVersion": "v1",
  "metadata": {
    "name": "nginx-configmap"
  },
  "data": {
    "nginx.conf": importstr "./nginx.conf",
    "proxy.conf": importstr "./proxy.conf",
  },
}

When I run this through jsonnet (e.g. jsonnet components/nginx-configmap.jsonnet) it works. However when I run this through ksonnet (e.g. ks show default) I get the following error:

$ ks show default
ERROR find objects: output: unknown node type: (*ast.ImportStr) &{{{/Users/jsuen/ws/ksonnet-examples/configmap-importfile/components/nginx-configmap.jsonnet {9 19} {9 43} 0xc4204414e0} <nil> []} 0xc420426780}

Not sure if this is a ksonnet or go-jsonnet issue.

Anything else we need to know?:

Environment:

  • ksonnet version (use ks version):
$ ks version
ksonnet version: dev-2018-04-17T14:57:47-0700
jsonnet version: v0.10.0
client-go version: 1.8

bryanl added a commit to bryanl/ksonnet that referenced this issue Apr 20, 2018

Updating ksonnet-lib printer to handle importstr
Fixes ksonnet#461

Signed-off-by: bryanl <bryanliles@gmail.com>

@bryanl bryanl closed this in #463 Apr 20, 2018

bryanl added a commit that referenced this issue Apr 20, 2018

Updating ksonnet-lib printer to handle importstr (#463)
Fixes #461

Signed-off-by: bryanl <bryanliles@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment