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

Wraps values containing : in runtime_fields test in quotes #63661

Merged
merged 1 commit into from
Oct 14, 2020
Merged

Wraps values containing : in runtime_fields test in quotes #63661

merged 1 commit into from
Oct 14, 2020

Conversation

picandocodigo
Copy link
Member

Backport of #63660

@picandocodigo picandocodigo added :Core/Infra/REST API REST infrastructure and utilities Team:Clients Meta label for clients team labels Oct 14, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/REST API)

@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Oct 14, 2020
@picandocodigo picandocodigo requested a review from nik9000 October 14, 2020 12:11
Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is getting pretty crazy. One of us needs to fix our parser. I don't remember which one is in the wrong here.

@picandocodigo
Copy link
Member Author

Thanks @nik9000! The Ruby parser leverages libyaml to parse YAML, and it seems to only have a problem with this particular format: match: {hits.hits.0._explanation.description: day_of_week:Monday}. The error I see is:

found unexpected ':' while scanning a plain scalar

For something like: key: some:value, it's parsed fine. I even tried a different YAML parser and still got a syntax error from the same syntax. From what I've read so far the solution is "just wrap it with quotes" and "It depends on each implementation". But ideally we'd want to find a way to catch these sooner.

@picandocodigo picandocodigo merged commit cbddff3 into elastic:7.x Oct 14, 2020
@picandocodigo picandocodigo deleted the update_runtime_fields_tests_7x branch October 14, 2020 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/REST API REST infrastructure and utilities Team:Clients Meta label for clients team Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants