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

Add array.slice built-in function #1287

Closed
wants to merge 14 commits into from

Conversation

Infi-Knight
Copy link
Contributor

Fixes #1243

Signed-off-by: Ravi Soni soniravi829@gmail.com

Ravi Soni and others added 5 commits March 26, 2019 17:17
Fixes open-policy-agent#1243

Signed-off-by: Ravi Soni <soniravi829@gmail.com>
Signed-off-by: lucperkins <lucperkins@gmail.com>
Signed-off-by: Teemu Koponen <koponen@styra.com>
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
Copy link
Member

@tsandall tsandall left a comment

Choose a reason for hiding this comment

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

@Infi-Knight These changes look good. Please update the language-reference.md file with the new built-in. There should be an existing section for array built-ins. Just add to that section.

topdown/array.go Outdated Show resolved Hide resolved
topdown/array.go Outdated Show resolved Hide resolved
topdown/array.go Outdated Show resolved Hide resolved
topdown/array_test.go Outdated Show resolved Hide resolved
patrick-east and others added 3 commits March 27, 2019 07:54
The tutorial for the admission controller was using an older release of the
kube-mgmt sidecar. This just updates to the latest (as of now) tagged release.

Tested following the full tutorial and all steps work as expected with the new
version being used instead of 0.6.

Signed-off-by: Patrick East <east.patrick@gmail.com>
array.slice will return a copy of the original array instead of
returning errors when the slicing indices are invalid.

Signed-off-by: Ravi Soni <soniravi829@gmail.com>
Signed-off-by: Ravi Soni <soniravi829@gmail.com>
@tsandall
Copy link
Member

@Infi-Knight thanks for my addressing my feedback.

I appreciate the formatting changes you made in the language-reference.md file, but please undo them. The reason is that most people don't have automated formatting of Markdown enabled and we don't want to gate PRs on this. Thanks. Once those changes are undone (and the language-reference.md file has been updated to include a row for the array.slice built-in function) we can merge this.

@Infi-Knight
Copy link
Contributor Author

@Infi-Knight thanks for my addressing my feedback.

I appreciate the formatting changes you made in the language-reference.md file, but please undo them. The reason is that most people don't have automated formatting of Markdown enabled and we don't want to gate PRs on this. Thanks. Once those changes are undone (and the language-reference.md file has been updated to include a row for the array.slice built-in function) we can merge this.

I apologize for this issue. My editor configuration messed it up. Will revert it straight away.

Ravi Soni and others added 6 commits March 28, 2019 07:41
Signed-off-by: Ravi Soni <soniravi829@gmail.com>
Fixes open-policy-agent#1243

Signed-off-by: Ravi Soni <soniravi829@gmail.com>
array.slice will return a copy of the original array instead of
returning errors when the slicing indices are invalid.

Signed-off-by: Ravi Soni <soniravi829@gmail.com>
Signed-off-by: Ravi Soni <soniravi829@gmail.com>
Signed-off-by: Ravi Soni <soniravi829@gmail.com>
@tsandall
Copy link
Member

@Infi-Knight it looks like you have a bunch of conflicts on your branch now. You might want to close this PR and re-open another that's based on the tip of master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants