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

Regression: Mapping labels fail to unmarshal #3137

Closed
psalaberria002 opened this issue Jan 7, 2021 · 0 comments
Closed

Regression: Mapping labels fail to unmarshal #3137

psalaberria002 opened this issue Jan 7, 2021 · 0 comments
Assignees
Labels
t:bug Something isn't working
Milestone

Comments

@psalaberria002
Copy link
Contributor

psalaberria002 commented Jan 7, 2021

Describe the bug
Mapping labels fail to unmarshal, making Ambassador crash on boot.

time="2021-01-07 19:11:40" level=error msg="goroutine \"/watcher\" exited with error: PANIC: json: cannot unmarshal array into Go struct field MappingSpec.spec.labels of type string" func="github.com/datawire/dlib/dgroup.(*Group).goWorkerCtx.func1.1" file="github.com/datawire/dlib@v1.1.0/dgroup/group.go:374" CMD=entrypoint PID=1 THREAD=/watcher

To Reproduce
Steps to reproduce the behavior:

  1. Add the following Mapping
apiVersion: getambassador.io/v1
kind: Mapping
metadata:
  name: a
spec:
  prefix: /api/[^/]+/projects/[^/]+/a(/.*)?
  prefix_regex: true
  rewrite: ""
  service: "https://a"
  timeout_ms: 10000
  add_response_headers:
    Strict-Transport-Security: max-age=31536000
  retry_policy:
    retry_on: gateway-error
    num_retries: 15
  labels:
    ambassador:
      - d0:
          - a
          - xratelimitid:
              header: "X-Ratelimit-Id"
              omit_if_not_present: true
  1. Apply the mapping

Expected behavior
It should be able to parse it. It's a valid config.

Versions (please complete the following information):

  • Ambassador: 1.10 with AMBASSADOR_LEGACY_MODE=false
@jcornick-alabs jcornick-alabs changed the title Mapping labels fail to unmarshal Regression: Mapping labels fail to unmarshal Jan 13, 2021
@khussey khussey added the t:bug Something isn't working label Jan 18, 2021
@khussey khussey added this to the 2021 Cycle 1 milestone Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants