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

agent: add back rego error logs #292

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

Redent0r
Copy link

@Redent0r Redent0r commented Jan 14, 2025

Merge Checklist
  • Followed patch format from upstream recommendation: https://github.com/kata-containers/community/blob/main/CONTRIBUTING.md#patch-format
    • Included a single commit in a given PR - at least unless there are related commits and each makes sense as a change on its own.
  • Aware about the PR to be merged using "create a merge commit" rather than "squash and merge" (or similar)
  • The upstream/missing label (or upstream/not-needed) has been set on the PR.
Summary

The aim of this PR is to fix a regression introduced in https://github.com/microsoft/kata-containers/pull/273/files#diff-84f120758564e7adf93c69772f22eb04eaefcde3d30c01ddbe5a906f1611233d where rego error logs were no longer available after that change.

take_prints takes and clear prints per https://github.com/microsoft/regorus/blob/748c11cfa1319c808977194c1657e0fd866269be/src/engine.rs#L848
Add back error logs by not calling take_prints twice.

Test Methodology

tested locally: rego error logs are again printed as expected

@Redent0r Redent0r added the upstream/missing PRs that are yet to be upstreamed label Jan 14, 2025
@Redent0r Redent0r requested review from a team as code owners January 14, 2025 01:20
src/agent/src/policy.rs Outdated Show resolved Hide resolved
@Redent0r Redent0r force-pushed the saulparedes/add_back_rego_error_logs branch from 68c4ca8 to e0060a9 Compare January 14, 2025 01:31
take_prints takes and clear prints per https://github.com/microsoft/regorus/blob/748c11cfa1319c808977194c1657e0fd866269be/src/engine.rs#L848
Add back error logs by not calling take_prints twice.

Signed-off-by: Saul Paredes <[email protected]>
@Redent0r Redent0r force-pushed the saulparedes/add_back_rego_error_logs branch from e0060a9 to c2f84a6 Compare January 14, 2025 17:27
@Redent0r Redent0r merged commit 6e3fd0a into msft-main Jan 14, 2025
45 of 55 checks passed
@Redent0r Redent0r deleted the saulparedes/add_back_rego_error_logs branch January 14, 2025 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream/missing PRs that are yet to be upstreamed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants