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 entity properties to rego evaluation context. #5215

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

blkt
Copy link
Contributor

@blkt blkt commented Dec 17, 2024

Summary

This change adds the entity's properties as defined by the provider to the REGO evaluation context, making it possible to use them as arguments to e.g. data sources.

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Manual tests.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@blkt blkt self-assigned this Dec 17, 2024
@blkt blkt requested a review from a team as a code owner December 17, 2024 11:47
internal/engine/eval/rego/eval.go Show resolved Hide resolved
internal/engine/eval/rego/eval.go Outdated Show resolved Hide resolved
@blkt blkt force-pushed the feat/add-properties-to-rego-engine branch 2 times, most recently from 1b1ea93 to c9876e4 Compare December 17, 2024 12:14
@coveralls
Copy link

coveralls commented Dec 17, 2024

Coverage Status

coverage: 55.013%. first build
when pulling a4dc5db on feat/add-properties-to-rego-engine
into 739607f on main.

@blkt blkt added the hackathon label Dec 17, 2024
@blkt blkt force-pushed the feat/add-properties-to-rego-engine branch from c9876e4 to acbab12 Compare December 17, 2024 17:19
JAORMX
JAORMX previously approved these changes Dec 17, 2024
This change adds the entity's properties as defined by the provider to
the REGO evaluation context, making it possible to use them as
arguments to e.g. data sources.
@blkt blkt force-pushed the feat/add-properties-to-rego-engine branch from acbab12 to a4dc5db Compare December 17, 2024 17:29
@blkt
Copy link
Contributor Author

blkt commented Dec 17, 2024

sorry @JAORMX, linter was complaining.

@blkt blkt merged commit 593a76c into main Dec 17, 2024
26 checks passed
@blkt blkt deleted the feat/add-properties-to-rego-engine branch December 17, 2024 18:04
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