-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
kyaml panics on non-ASCII character comments #3417
Comments
Thanks for the report. Will take a look. |
This bug is caused by go-yaml/yaml#538. Looks like yaml library has updated and fixed it. kyaml needs to use a later version of yaml. |
Thank you for investigation! |
Seems that this issue is resolved in kustomize v3.9.2. $ kustomize version
{Version:kustomize/v3.9.2 GitCommit:e98eada7365fc564c9aba392e954f306a9cbf1dd BuildDate:2021-01-21T14:07:31+00:00 GoOs:darwin GoArch:amd64}
$ cat kustomization.yaml
resources:
- a.yaml
$ cat a.yaml
# こんにちは
# 你好
# 안녕하세요
apiVersion: v1
kind: Namespace
metadata:
name: a
$ kustomize build
apiVersion: v1
kind: Namespace
metadata:
name: a |
With version v4.1.2 # 한글(korean)
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: employees
annotations:
nginx.ingress.kubernetes.io/rewrite-target: / kustomize build . > temp.yaml |
I confirmed that, as @iamnogada reported, kustomize v4.1.2 has the same issue. |
I just tried in 4.1.3 and don't get the error. I do get the error in 4.1.2 though, so it looks like it might be fixed (?) @ordovicia Can you give it a try with 4.1.3? |
Adding a note that this is a duplicate of #3358, where they reported that the issue still appears with the following kind of comment:
|
The bug seems to have been fixed in kustomize 4.1.3. Thank you.
resources:
- a.yaml
- b.yaml
# こんにちは
# 你好
# 안녕하세요
apiVersion: v1
kind: Namespace
metadata:
name: a
apiVersion: networking.k8s.io/v1
kind: Ingress # あ
metadata:
name: blog Output:
|
Describe the bug
kustomize v3.9.1 (kyaml enabled by default) panics when a YAML includes non-ASCII character comments.
With
--enable_kyaml=false
,kustomize build
succeeds without panic.Files that can reproduce the issue
kustomization.yaml
:a.yaml
:Any of these non-ASCII lines causes the panic.
Expected output
kustomize build
does not panic and emits a YAML.Actual output
Kustomize version
Platform
macOS 10.15.7
Additional context
The text was updated successfully, but these errors were encountered: