Skip to content
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

jackson doesn't properly parse anchors and aliases in the managed delivery manifest #1398

Closed
nimakaviani opened this issue Jul 30, 2020 · 1 comment · Fixed by #1427
Closed

Comments

@nimakaviani
Copy link
Member

I am creating this issue as a followup to our conversation during the SIG meeting. We noticed that managed delivery manifests that use anchors and aliases are not properly parsed even though the yaml document is totally valid.

Here is an example manifest.

application: nimakspin
serviceAccount: [email protected]
artifacts: []
hasManagedResources: true
environments:
  - name: testing
    hasManagedResources: true
    resources:
    - &secgrp 
      kind: "ec2/security-group@v1"
      spec:
        moniker:
          app: "nimakspin"
        locations:
          account: "my-aws-account"
          vpc: "eksctl-demo-fargate-cluster/VPC"
          regions:
          - name: "us-west-2"
        description: "test LoadBalancer securityGroup by ALB Ingress Controller"
        inboundRules:
        - protocol: "TCP"
          portRange:
            startPort: 80
            endPort: 80
          blockRange: "0.0.0.0/0"
        - protocol: "TCP"
          portRange:
            startPort: 22
            endPort: 22
          blockRange: "0.0.0.0/0"
  - name: prod
    hasManagedResources: true
    resources:
    - *secgrp

The problem appears to be with Jackson failing to parse aliases and anchors where SnakeYAML parses the yaml document properly.

@luispollo suggested double passing of the yaml document, first into SnakeYAML and then into Jackson in order for the parsing of the manifest to work properly. That can be a relatively easy fix for this.

@luispollo
Copy link
Contributor

Thanks for writing this up, @nimakaviani! Just adding a link to the original issue in Jackson for tracking: FasterXML/jackson-dataformats-text#98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants