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

Anomaly with YAML anchors in RNode.YNode.Decode #3271

Closed
monopole opened this issue Nov 24, 2020 · 7 comments
Closed

Anomaly with YAML anchors in RNode.YNode.Decode #3271

monopole opened this issue Nov 24, 2020 · 7 comments
Labels
area/kyaml issues for kyaml kind/bug Categorizes issue or PR as related to a bug. triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@monopole
Copy link
Contributor

monopole commented Nov 24, 2020

Trouble when YAML anchors in use.

See listWithAnchors test in these two test sets

@Shell32-Natsu Shell32-Natsu added area/kyaml issues for kyaml kind/bug Categorizes issue or PR as related to a bug. labels Nov 24, 2020
@monopole
Copy link
Contributor Author

Hoping this goes away after we delete all the translation layers after #2506 closes.

monopole added a commit to monopole/kustomize that referenced this issue Nov 25, 2020
The implementations in WNode are supposed to be thin,
as it will be removed once kubernetes-sigs#2506 closes.

The change also makes some addjustments for the
upcoming flip of the enable_kyaml flag, pointing to
issue kubernetes-sigs#3271.
@monopole
Copy link
Contributor Author

Don't think this blocks closing #3304

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 17, 2021
@levsha
Copy link

levsha commented Apr 27, 2021

kustomize still has regression processing YAML anchors:

# cat kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - deployment.yaml
# cat deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
spec:
  template:
    spec:
      containers:
        - name: one
          env:
            - &envvar
              name: VAR1
              value: VAL1
        - name: two
          env:
            - <<: *envvar
              value: VAL2
# bin/kustomize-3.9.4 --enable_kyaml=false build
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
spec:
  template:
    spec:
      containers:
      - env:
        - name: VAR1
          value: VAL1
        name: one
      - env:
        - name: VAR1
          value: VAL2
        name: two
# bin/kustomize-4.1.2 build
Error: map[string]interface {}{"apiVersion":"apps/v1", "kind":"Deployment", "metadata":map[string]interface {}{"name":"test"}, "spec":map[string]interface {}{"template":map[string]interface {}{"spec":map[string]interface {}{"containers":[]interface {}{map[string]interface {}{"env":[]interface {}{map[string]interface {}{"name":"VAR1", "value":"VAL1"}}, "name":"one"}, map[string]interface {}{"env":[]interface {}{map[interface {}]interface {}{"name":"VAR1", "value":"VAL2"}}, "name":"two"}}}}}}: json: unsupported type: map[interface {}]interface {}
#

@levsha
Copy link

levsha commented Apr 27, 2021

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 27, 2021
@KnVerey
Copy link
Contributor

KnVerey commented May 26, 2021

I'm consolidating all the issues related to YAML anchors on this one: #3675. Though they don't all fail with the same error message, they seem to all be related to the switch to kyaml. If you're encountering this issue and YAML anchor support is important to you, please chime in over there.

/close
/triage duplicate

@k8s-ci-robot k8s-ci-robot added the triage/duplicate Indicates an issue is a duplicate of other open issue. label May 26, 2021
@k8s-ci-robot
Copy link
Contributor

@KnVerey: Closing this issue.

In response to this:

I'm consolidating all the issues related to YAML anchors on this one: #3675. Though they don't all fail with the same error message, they seem to all be related to the switch to kyaml. If you're encountering this issue and YAML anchor support is important to you, please chime in over there.

/close
/triage duplicate

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kyaml issues for kyaml kind/bug Categorizes issue or PR as related to a bug. triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

6 participants