-
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
Yaml containing aliases rejected due to FasterXML bug #2510
Comments
I've personally bumped into a few issues when serializing and deserializing content from the client. It seems that YAML produced/serialzied by Jackson can't be deserialized again in some circumstances (another example is deserializing YAMLs double curly brackets >> Helm chart template variables). This is something we'll need to look into. |
Hi @rittneje Could you provide a sample of the YAML content that's failing for you so we can create specific tests for this issue before we proceed with a fix? |
apiVersion: v1
kind: Pod
spec:
nodeSelector:
workload: build
tolerations:
- key: nodeType
operator: Equal
value: build
effect: NoSchedule
securityContext:
runAsUser: 1000
runAsGroup: 1000
containers:
- name: ubuntu
image: ubuntu:bionic
imagePullPolicy: Always
command:
- cat
tty: true
resources:
requests: &id001
cpu: 100m
- name: python3
image: python:3.7
imagePullPolicy: Always
command:
- cat
tty: true
resources:
requests: *id001 |
… bug + Fallback to SnakeYAML while deserializing Kubernetes YAML manifests + Refactored SerializationUtils#dumpAsYaml(...) to use SnakeYAML instead of Jackson + Moved `SerializationUtils` to `io.fabric8.kubernetes.client.utils`
… bug + Fallback to SnakeYAML while deserializing Kubernetes YAML manifests + Refactored SerializationUtils#dumpAsYaml(...) to use SnakeYAML instead of Jackson + Moved `SerializationUtils` to `io.fabric8.kubernetes.client.utils`
… bug Modify the way we deserialize Yaml objects. Load them into raw HashMap using SnakeYAML and then use Jackson to convert them to JSON and finally the required object
… bug Modify the way we deserialize Yaml objects. Load them into raw HashMap using SnakeYAML and then use Jackson to convert them to JSON and finally the required object
There is a long-standing bug in the way that FasterXML handles yaml containing aliases. FasterXML/jackson-dataformats-text#98
As a consequence, anyone using perfectly valid yaml containing aliases (which may have been automatically generated via SnakeYaml) will get a mysterious error message like this:
Is the use of FasterXML strictly required? Would it be possible to simply use SnakeYaml directly for parsing, which seems to handle aliases properly?
The text was updated successfully, but these errors were encountered: