-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
'\t(TAB)' that cannot start any token. (Do not use \t(TAB) for indentation) #5466
Comments
Are you saying that invalid yaml was accepted by an older version of the kubernetes client, but now is not? |
I think so, yes. I only updated the plugin between pipeline run. Same pipeline, same code. |
The likely difference is we now are making direct usage of snakeyaml for the yaml parsing, whereas older versions were using snakeyaml via jackson. This seems to be the official position on tabs http://yaml.org/faq.html - are you able to fix your yaml? |
There are no tabs in my yaml files. There are no "" either. This seems to come from a bad result of an HTTP call. And therfore it's obviously not in Yaml but Html, hence the error I guess. |
Ah, sorry for not following the stacktrace completely. Yes there is an assumption that the body of an error response could be a Status. That attempt to parse is catching serveral exception types, but not YamlEngineException or generally RuntimeException that would catch this. We'll need to catch and convert this and likely add some catch all handling in OperationSupport to address this. UPDATE: In checking with older versions I don't think low-level parsing path has changed. What's different wrt yaml is actually the production, not the parsing. Higher up in OpperationSupport though we used to work directly against a json mapper, rather than a general deserialization method. In this case passing something that is not valid json will be attempted as yaml, which then gives the exception you are seeing. I'll have a fix shortly. |
Describe the bug
After upgrading to the newest version of the plugin kubernetes-plugin for Jenkins; the following error occurred: "'\t(TAB)' that cannot start any token. (Do not use \t(TAB) for indentation)"
https://github.com/jenkinsci
(kubernetes-plugin](https://github.com/jenkinsci/kubernetes-plugin)
Fabric8 Kubernetes Client version
6.8.1
Steps to reproduce
Running a pipeline with
It starts a pod dynamically with a podTemplate.
Expected behavior
No error, the builder pod is starting correctly
Runtime
Kubernetes (vanilla), other (please specify in additional context)
Kubernetes API Server version
other (please specify in additional context)
Environment
other (please specify in additional context)
Fabric8 Kubernetes Client Logs
Additional context
Kubernetes enabled with Docker for desktop (v4.21.1) on Windows 11 (with WSL2)
kubectl version --short
The text was updated successfully, but these errors were encountered: