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

fix: tune jsonnet VM stack trace logging and add test coverage #1037

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thevilledev
Copy link
Contributor

@thevilledev thevilledev commented Jan 15, 2025

  • Set MaxStackTraceSize to 20 for cleaner errors
  • Add test for stack overflow prevention
  • Improve test structure with table-driven pattern

- Set MaxStack to 500 frames to prevent deep recursion
- Set MaxStackTraceSize to 20 for cleaner errors
- Add test for stack overflow prevention
- Improve test structure with table-driven pattern

Signed-off-by: Ville Vesilehto <[email protected]>
@thevilledev thevilledev force-pushed the fix/recursive-jsonnet branch from 2dd2adf to 7428841 Compare January 16, 2025 08:18
Copy link
Member

@boranx boranx left a comment

Choose a reason for hiding this comment

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

It seems jsonnet.MakeVM() returns these values by default, do you think we'd still need to fine-tune it?

@thevilledev thevilledev changed the title fix: set jsonnet VM stack limits and add test coverage fix: tune jsonnet VM stack trace logging and add test coverage Jan 23, 2025
@thevilledev
Copy link
Contributor Author

Thanks, totally missed that. I removed it from the PR but kept the other changes. Also updated the description.

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.

2 participants