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

Updated ByteReader to allow white space and comments content after --- when splitting YAML documents #4014

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

brianpursley
Copy link
Member

@brianpursley brianpursley commented Jun 24, 2021

Instead of splitting on \n---\n, split on \n---.*\n regular expression.

Allow (and discard) any white space or comments, and return an error if other content exists on the same line as ---

Fixes #3876

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 24, 2021
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 24, 2021
kyaml/kio/byteio_reader.go Outdated Show resolved Hide resolved
kyaml/kio/byteio_reader.go Outdated Show resolved Hide resolved
@natasha41575 natasha41575 requested review from KnVerey and removed request for justinsb and Shell32-Natsu June 24, 2021 17:36
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 24, 2021
… after --- and throw an error if anything else is detected
@natasha41575
Copy link
Contributor

/lgtm
I'll leave this PR open for a little bit in case others want to take a look.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 25, 2021
@brianpursley brianpursley changed the title Updated ByteReader to allow and discard any content after --- when splitting YAML documents Updated ByteReader to allow white space and comments content after --- when splitting YAML documents Jul 1, 2021
@natasha41575
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brianpursley, natasha41575

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 1, 2021
@k8s-ci-robot k8s-ci-robot merged commit 518a16d into kubernetes-sigs:master Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid build output if resource separator has trailing spaces
3 participants