Skip to content

Conversation

@jvanz
Copy link
Member

@jvanz jvanz commented Sep 24, 2025

Description

The marshalling funcion used to generate the policies file used by policy-server to load the policies is missing the recently added timeoutEvalSeconds field. Therefore, the policy-server is not enforcing the evaluation timeout for the policies. This commit fix the tests to guarantee that the function is working as expected and fix the MarshalJSON code as well.

Fix #1206

Test

make test

The marshalling funcion used to generate the policies file used by
policy-server to load the policies is missing the recently added
timeoutEvalSeconds field. Therefore, the policy-server is not enforcing
the evaluation timeout for the policies. This commit fix the tests to
guarantee that the function is working as expected and fix the
MarshalJSON code as well.

Signed-off-by: José Guilherme Vanz <[email protected]>
@jvanz jvanz self-assigned this Sep 24, 2025
@jvanz jvanz requested a review from a team as a code owner September 24, 2025 17:26
@github-project-automation github-project-automation bot moved this to Pending review in Kubewarden Sep 24, 2025
@jvanz jvanz removed this from Kubewarden Sep 24, 2025
@codecov
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.16%. Comparing base (4dbb413) to head (483b948).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1207      +/-   ##
==========================================
- Coverage   73.27%   73.16%   -0.12%     
==========================================
  Files          30       30              
  Lines        3944     3946       +2     
==========================================
- Hits         2890     2887       -3     
- Misses        890      894       +4     
- Partials      164      165       +1     
Flag Coverage Δ
integration-tests 57.00% <100.00%> (-0.11%) ⬇️
unit-tests 62.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@flavio flavio left a comment

Choose a reason for hiding this comment

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

Good catch

Copy link
Member

@viccuad viccuad left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@viccuad viccuad merged commit 45b1c5e into kubewarden:main Sep 25, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

timeoutEvalSeconds is does block request

3 participants