-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Expected a single document in the stream #3648
Comments
I can reproduce this issue. While processing YAML document, I can see YAML document is parsed correctly; however, since it's just one document this condition is not satisfied: Lines 325 to 329 in ef50b90
This behavior seems to be correct. Since it's only a single document control goes to Single document unmarshal method. But at this point there is still Lines 153 to 156 in ef50b90
Removing leading/trailing Document delimiters |
…ML with single document in presence of document delimiter(`---`) Serialization.unmarshal doesn't handle the case when YAML contains only single document but yet contains a leading or trailing document delimiter(`---`). Trim YAML document delimiters in case of single documents Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ML with single document in presence of document delimiter(`---`) Serialization.unmarshal doesn't handle the case when YAML contains only single document but yet contains a leading or trailing document delimiter(`---`). Trim YAML document delimiters in case of single documents Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ML with single document in presence of document delimiter(`---`) Serialization.unmarshal doesn't handle the case when YAML contains only single document but yet contains a leading or trailing document delimiter(`---`). Trim YAML document delimiters in case of single documents Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ML with single document in presence of document delimiter(`---`) Serialization.unmarshal doesn't handle the case when YAML contains only single document but yet contains a leading or trailing document delimiter(`---`). Trim YAML document delimiters in case of single documents Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ML with single document in presence of document delimiter(`---`) Serialization.unmarshal doesn't handle the case when YAML contains only single document but yet contains a leading or trailing document delimiter(`---`). Trim YAML document delimiters in case of single documents Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Thank you very much @rohanKanojia ! |
@ParriePierre : Np, Would appreciate if you could also review my PR :-) |
…ingle document in presence of document delimiter(`---`) Serialization.unmarshal doesn't handle the case when YAML contains only single document but yet contains a leading or trailing document delimiter(`---`). Trim YAML document delimiters in case of single documents Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Describe the bug
Hello,
Kubernetes-client cannot read documents that contains one ressource and end with "---", snakeyaml throws exception "expected a single document in the stream".
It used to work with kubernetes-client 4.13.3.
Using Kubernetes-client:4.13.0, this used to work.
Fabric8 Kubernetes Client version
5.10.1@latest
Steps to reproduce
Using example LoadMultipleDocumentsFromFileExample, modify the file multiple-document-template.yml to keep only one resource and ending the file with "---" :
snakeyaml throws exception
Expected behavior
Kubernetes-client should be able to serialize YAML files that have only one resource and ends with "---".
Runtime
other (please specify in additional context)
Kubernetes API Server version
other (please specify in additional context)
Environment
Linux
Fabric8 Kubernetes Client Logs
No response
Additional context
Issue is not related to K8S API.
The text was updated successfully, but these errors were encountered: