-
Notifications
You must be signed in to change notification settings - Fork 909
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
feat(falco): Provide a parameter for loading lua files from an alternate path #1419
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing this up @admiral0 - I also really needed this for some deployments I was doing this week - I like the general approach but had some comments.
We probably need to add the trailing slash if the user didn't provide it: This does not work
This works
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Radu for sending this PR!
This PR is in the right direction. Anyways, it is not completed yet IMHO.
For example in falco_outputs.cpp
there is this line that needs to be updated too.
falco_common::init(m_lua_main_filename.c_str(), FALCO_SOURCE_LUA_DIR);
Note that the falco_common::init()
is also called by the ctor of falco_engine
that you updated.
/milestone 0.27.0 |
@admiral0 I've updated the release-note line, waiting for your new commits :) |
ac84e3e
to
a5cabff
Compare
/assign @leodido |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd personally prefer to completely remove the need for external files (by embedding them into the binary, as proposed in #1367).
However, I can agree with this approach for now 👍
Just my 2 cents :)
…ate path This will be used by the static build to load lua files from alternate directories that are not tied to the compile flags Signed-off-by: Radu Andries <radu.andries@sysdig.com>
f8a285e
to
aac3ce2
Compare
LGTM label has been added. Git tree hash: a8605020170861c3cef418aee3d381290d6bcf97
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fntlnz, leodido The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This will be used by the static build to load lua files from
alternate directories that are not tied to the compile flags
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area engine
What this PR does / why we need it:
This allows us to provide tarballs of static builds of falco and use
--alternate-lua-dir $(pwd)/lua
to specify where to look for luafiles.
Which issue(s) this PR fixes:
Special notes for your reviewer:
This will improve user experience for users of the static build, because currently that path is hardcoded at compile time.
Does this PR introduce a user-facing change?: