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

Fix bugs when verifying macro/rule objects. #744

Merged
merged 1 commit into from
Jul 30, 2019
Merged

Conversation

mstemm
Copy link
Contributor

@mstemm mstemm commented Jul 30, 2019

What type of PR is this?

/kind bug

Any specific area of the project related to this PR?

/area engine

What this PR does / why we need it:

Fix a couple of small bugs when verifying macro/rule objects:

  1. Yaml can have document separators "---", and those were mistakenly
    being considered array items.

  2. When reading macros and rules and using array position to find the
    right document offset, the overall object order should be
    used (e.g. this is the 5th object from the file) and not the array
    position (e.g. this is the 3rd rule from the file).

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Fix small bugs when displaying context from rule validation/loading errors.

Fix a couple of small bugs when verifying macro/rule objects:

1) Yaml can have document separators "---", and those were mistakenly
being considered array items.

2) When reading macros and rules and using array position to find the
right document offset, the overall object order should be
used (e.g. this is the 5th object from the file) and not the array
position (e.g. this is the 3rd rule from the file).

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
Copy link
Member

@leodido leodido left a comment

Choose a reason for hiding this comment

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

LGTM

@poiana
Copy link
Contributor

poiana commented Jul 30, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: leodido

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

@poiana
Copy link
Contributor

poiana commented Jul 30, 2019

LGTM label has been added.

Git tree hash: 5966ad3d077e34ee39a9696e5c9705b90eb39f33

@leodido leodido merged commit 46b1a3c into dev Jul 30, 2019
@poiana poiana deleted the fix-error-contexts branch July 30, 2019 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants