Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: introduce validation levels for lua - #6355

#6355
Merged
arkodg merged 1 commit into
envoyproxy:mainenvoyproxy/gateway:mainfrom
rudrakhp:disable_lua_enumCopy head branch name to clipboard
Jul 9, 2025
Merged

feat: introduce validation levels for lua#6355
arkodg merged 1 commit into
envoyproxy:mainenvoyproxy/gateway:mainfrom
rudrakhp:disable_lua_enumCopy head branch name to clipboard

Conversation

@rudrakhp

Copy link
Copy Markdown
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

codecov Bot commented Jun 19, 2025

Copy link
Copy Markdown

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
Copy Markdown
Member Author

/retest

Comment thread api/v1alpha1/envoyproxy_types.go Outdated

Copy link
Copy Markdown
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 ?

@rudrakhp rudrakhp Jun 21, 2025

Copy link
Copy Markdown
Member Author

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

Xunzhuo commented Jun 25, 2025

Copy link
Copy Markdown
Member

/retest

@arkodg arkodg added this to the v1.5.0-rc.1 Release milestone Jul 7, 2025
Comment thread api/v1alpha1/envoyproxy_types.go Outdated
Comment thread api/v1alpha1/envoyproxy_types.go Outdated

Copy link
Copy Markdown
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 ?

@rudrakhp rudrakhp Jul 8, 2025

Copy link
Copy Markdown
Member Author

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.

Comment thread api/v1alpha1/envoyproxy_types.go Outdated

Copy link
Copy Markdown
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

@rudrakhp rudrakhp Jul 8, 2025

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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
Copy Markdown
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.