Skip to content

feat: introduce validation levels for lua#6355

Merged
arkodg merged 1 commit intoenvoyproxy:mainfrom
rudrakhp:disable_lua_enum
Jul 9, 2025
Merged

feat: introduce validation levels for lua#6355
arkodg merged 1 commit intoenvoyproxy:mainfrom
rudrakhp:disable_lua_enum

Conversation

@rudrakhp
Copy link
Member

What type of PR is this?
feat: introduce validation levels for lua

What this PR does / why we need it:
Introduce validation levels so users can disable or have runtime validations on their lua script. Will introduce a compile time validation in a follow up PR.

Which issue(s) this PR fixes:
Related discussion in Slack thread
Related: #6172 #6176

Release Notes: Yes

@rudrakhp rudrakhp marked this pull request as ready for review June 19, 2025 04:05
@rudrakhp rudrakhp requested a review from a team as a code owner June 19, 2025 04:05
@rudrakhp rudrakhp requested a review from a team June 19, 2025 04:05
@codecov
Copy link

codecov bot commented Jun 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.76%. Comparing base (4140f61) to head (92f6d20).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6355      +/-   ##
==========================================
+ Coverage   70.74%   70.76%   +0.01%     
==========================================
  Files         220      220              
  Lines       37594    37595       +1     
==========================================
+ Hits        26596    26604       +8     
+ Misses       9431     9426       -5     
+ Partials     1567     1565       -2     

☔ 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.

@rudrakhp
Copy link
Member Author

/retest

Copy link
Contributor

Choose a reason for hiding this comment

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

any other options instead of Runtime ?

Copy link
Member Author

@rudrakhp rudrakhp Jun 21, 2025

Choose a reason for hiding this comment

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

  1. Runtime, Compile & Disabled
  2. Run, Load & Disabled --> prefer this since it aligns with underlying gopher-lua terminology. Documentation will have necessary explanation for users.
  3. Strict, Syntax & Disabled --> more intuitive for users

@rudrakhp rudrakhp requested review from a team and arkodg June 21, 2025 11:29
@Xunzhuo
Copy link
Member

Xunzhuo commented Jun 25, 2025

/retest

@arkodg arkodg added this to the v1.5.0-rc.1 Release milestone Jul 7, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

should we remove this for now and explain this as the default ?

Copy link
Member Author

@rudrakhp rudrakhp Jul 8, 2025

Choose a reason for hiding this comment

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

Removed default kubebuilder on field and added a comment instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

can we add a line in here mentioning when its needed, e.g. when importing libraries

Copy link
Member Author

@rudrakhp rudrakhp Jul 8, 2025

Choose a reason for hiding this comment

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

Added. Will update once we have the Syntax enum implemented.

Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>
@rudrakhp rudrakhp requested a review from arkodg July 8, 2025 19:52
@arkodg arkodg requested review from a team July 8, 2025 19:52
}

// +kubebuilder:validation:Enum=Strict;Disabled
type LuaValidation string
Copy link
Member

Choose a reason for hiding this comment

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

nit: would it make sense to name it LuaValidationLevel?

@cnvergence
Copy link
Member

LGTM, just left one question :)

@arkodg arkodg merged commit b8ca958 into envoyproxy:main Jul 9, 2025
48 of 50 checks passed
tjvdmolen pushed a commit to tjvdmolen/gateway that referenced this pull request Jul 11, 2025
Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>
Signed-off-by: Tjeerd Jan van der Molen <34071+tjvdmolen@users.noreply.github.com>
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.

4 participants