docs/website: Improve partial evaluation / data filtering documentation#8625
Open
mmzzuu wants to merge 2 commits into
Open
docs/website: Improve partial evaluation / data filtering documentation#8625mmzzuu wants to merge 2 commits into
mmzzuu wants to merge 2 commits into
Conversation
* added a simple data filtering example to the filtering overview page to better showcase its purpose * explained the metadata annotation for unknowns and how it links to the database table and field names * added a tutorial page to provide a quick demo Fixes: open-policy-agent#8316 Signed-off-by: Manuela Züger <manuela.zueger@ipt.ch>
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
references: open-policy-agent#8316 Signed-off-by: Manuela Züger <manuela.zueger@ipt.ch>
Contributor
|
Hmm looks like the netlify preview is broken here? 😞 Thanks for contributing, I'll have a look in a bit! 🎉 |
| ```rego title="policy.rego" | ||
| package filters | ||
|
|
||
| # METADATA |
Contributor
There was a problem hiding this comment.
This metadata comment is in a bit of a strange place? Did you mean to use the package scope?
| ::: | ||
|
|
||
| ## What is Partial Evaluation? | ||
| ## What is Partial Evaluation? {#what-is-partial-evaluation} |
Contributor
There was a problem hiding this comment.
Unsure if this was needed? the generated fragment looks to be the same?
|
|
||
| The rule is: Directors may see the salaries of employees in their own department. When Alice (Engineering Director) lists employees, the highlighted rows are what she should see: | ||
|
|
||
| <table> |
Contributor
There was a problem hiding this comment.
We can use markdown tables too, might be easier to read for future editors.
| } | ||
| ``` | ||
|
|
||
| ¹ The value of `input.employees.department` is _unknown_ during partial policy evaluation — it refers to a table column in the database. |
Contributor
There was a problem hiding this comment.
We don't tend to use this format for notes. I think a bullet list is fine, but we can also use [^1], [^2] etc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why the changes in this PR are needed?
The issue #8316 outlines that the Partial Evaluation / Data Filtering documentation could benefit from clearer examples and explanations to better enable users to get started adopting the feature.
What are the changes in this PR?